openbsd-ports/geo/gpsbabel/patches/patch-gbser_posix_c
sasano 44055a0cf1 update to gpsbabel 1.4.4
- add patch to open serial port with non-blocking mode
  (useful for USB-GPS dongle)
2013-01-05 06:18:06 +00:00

12 lines
461 B
Plaintext

--- gbser_posix.c.orig Tue Jul 26 10:56:33 2011
+++ gbser_posix.c Tue Dec 25 21:52:11 2012
@@ -142,7 +142,7 @@ void* gbser_init(const char* port_name)
if (0 == strcmp(port_name, "-")) {
h->fd = 0;
return h;
- } else if (h->fd = open(port_name, O_RDWR | O_NOCTTY), h->fd == -1) {
+ } else if (h->fd = open(port_name, O_RDWR | O_NOCTTY | O_NDELAY), h->fd == -1) {
warning("Failed to open port (%s)\n", strerror(errno));
goto failed;
}