pkgsrc/graphics/gphoto/patches/patch-aa

22 lines
901 B
Text

$NetBSD: patch-aa,v 1.3 2006/05/12 12:26:58 joerg Exp $
--- canon/serial.c.orig 2006-05-06 12:21:45.000000000 +0000
+++ canon/serial.c
@@ -121,7 +121,7 @@ int canon_serial_init(const char *devnam
D(printf("canon_init_serial(): devname %s\n", devname));
- #ifdef __FreeBSD__
+ #if defined(__FreeBSD__) || (defined(__DragonFly__) && !defined(O_SYNC))
fd = open(devname, O_RDWR | O_NOCTTY | O_NONBLOCK);
#else
fd = open(devname, O_RDWR | O_NOCTTY | O_SYNC | O_NONBLOCK);
@@ -143,7 +143,7 @@ int canon_serial_init(const char *devnam
newtio.c_cflag = (newtio.c_cflag & ~CSIZE) | CS8;
/* Set into raw, no echo mode */
- #if defined(__FreeBSD__) || defined(__NetBSD__)
+ #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
newtio.c_iflag &= ~(IGNBRK | IGNCR | INLCR | ICRNL |
IXANY | IXON | IXOFF | INPCK | ISTRIP);
#else