openbsd-ports/graphics/gphoto/patches/patch-ac

38 lines
955 B
Plaintext

--- ./canon/serial.c.orig Wed Nov 10 18:17:45 1999
+++ ./canon/serial.c Wed Nov 10 18:45:39 1999
@@ -12,12 +12,16 @@
*
****************************************************************************/
+#include "config.h"
#include <stdio.h>
#include <unistd.h>
#include <termios.h>
#include <fcntl.h>
#include <sys/time.h>
#include <errno.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#include "util.h"
@@ -62,7 +66,7 @@
D(printf("canon_init_serial(): devname %s\n", devname));
- #ifdef __FreeBSD__
+ #ifdef BSD
fd = open(devname, O_RDWR | O_NOCTTY | O_NONBLOCK);
#else
fd = open(devname, O_RDWR | O_NOCTTY | O_SYNC | O_NONBLOCK);
@@ -84,7 +88,7 @@
newtio.c_cflag = (newtio.c_cflag & ~CSIZE) | CS8;
/* Set into raw, no echo mode */
- #ifdef __FreeBSD__
+ #ifdef BSD
newtio.c_iflag &= ~(IGNBRK | IGNCR | INLCR | ICRNL |
IXANY | IXON | IXOFF | INPCK | ISTRIP);
#else