#ifdef ONLCR
| ONLCR
#endif
- | OCRNL | ONOCR | ONLRET);
+#ifdef OCRNL
+ | OCRNL
+#endif
+#ifdef ONOCR
+ | ONOCR
+#endif
+#ifdef ONLRET
+ | ONLRET
+#endif
+ );
options.c_cc[VMIN] = 1;
options.c_cc[VTIME] = 0;
*/
finished = TRUE;
} else if (ret < 0) {
+#ifdef EAGAIN
+ if (errno == EAGAIN)
+ return 1; /* spurious */
+#endif
+#ifdef EWOULDBLOCK
+ if (errno == EWOULDBLOCK)
+ return 1; /* spurious */
+#endif
perror("read serial port");
exit(1);
} else if (ret > 0) {
serial_provide_logctx,
serial_unthrottle,
serial_cfg_info,
- 1
+ "serial",
+ PROT_SERIAL,
+ 0
};