aboutsummaryrefslogtreecommitdiffstats
path: root/pw.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-06-08 16:56:25 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-06-08 16:56:25 -0700
commitf783a3d9b01b1214c3f928deddc86ae5a746ebd4 (patch)
tree5ad35446c17d0fc27798073699cd2ad04fd6751b /pw.c
parentdd79082a94b62e0d8c398dcfad19449e72c542da (diff)
downloadpw-f783a3d9b01b1214c3f928deddc86ae5a746ebd4.tar.gz
pw-f783a3d9b01b1214c3f928deddc86ae5a746ebd4.tar.bz2
pw-f783a3d9b01b1214c3f928deddc86ae5a746ebd4.zip
MacOS port.
- The poll function is broken on Darwin (won't handle devices). We make a macpoll out of select and use that. - Makefile adds _D_DARWIN_C_SOURCE to CFLAGS.
Diffstat (limited to 'pw.c')
-rw-r--r--pw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pw.c b/pw.c
index 68bf58c..23a7beb 100644
--- a/pw.c
+++ b/pw.c
@@ -44,6 +44,9 @@
#include <errno.h>
#include <signal.h>
#include <regex.h>
+#ifdef _DARWIN_C_SOURCE
+#include "macpoll.h"
+#endif
#define ctrl(ch) ((ch) & 0x1f)
#define BS 8