From 5ca54dc28ef4ee716236cfab12dc06ae135022da Mon Sep 17 00:00:00 2001 From: Lucas Holt Date: Thu, 13 Sep 2018 13:24:31 -0400 Subject: [PATCH] Add midnightbsd serial configuration. --- libgphoto2_port/serial/unix.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libgphoto2_port/serial/unix.c b/libgphoto2_port/serial/unix.c index 095ddfa8a..d47d7ba4f 100644 --- a/libgphoto2_port/serial/unix.c +++ b/libgphoto2_port/serial/unix.c @@ -186,6 +186,13 @@ #define GP_PORT_SERIAL_RANGE_HIGH 11 #endif +/* MidnightBSD */ +#ifdef __MidnightBSD__ +#define GP_PORT_SERIAL_PREFIX "/dev/cuad%x" +#define GP_PORT_SERIAL_RANGE_LOW 0 +#define GP_PORT_SERIAL_RANGE_HIGH (0xf) +#endif + /* Others? */ /* Default */ @@ -419,7 +426,7 @@ gp_port_serial_open (GPPort *dev) } dev->pl->fd = -1; -#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__) +#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__) || defined(__MidnightBSD__) dev->pl->fd = open (port, O_RDWR | O_NOCTTY | O_NONBLOCK); #elif OS2 fd = open (port, O_RDWR | O_BINARY);