]> git.armaanb.net Git - sic.git/blobdiff - sic.c
fix include: include sys/select.h for select(2) and FD_(ZERO|SET)
[sic.git] / sic.c
diff --git a/sic.c b/sic.c
index ce6d2160020c9287e07eb796da22a5abe473db5e..774f357aff161655e710fd60d26e79be871d1d24 100644 (file)
--- a/sic.c
+++ b/sic.c
@@ -1,4 +1,6 @@
  /* See LICENSE file for license details. */
+#include <sys/select.h>
+
 #include <ctype.h>
 #include <errno.h>
 #include <stdarg.h>
@@ -22,6 +24,8 @@ static char channel[256];
 static time_t trespond;
 static FILE *srv;
 
+#undef strlcpy
+#include "strlcpy.c"
 #include "util.c"
 
 static void
@@ -182,6 +186,10 @@ main(int argc, char *argv[]) {
        setbuf(stdout, NULL);
        setbuf(srv, NULL);
        setbuf(stdin, NULL);
+#ifdef __OpenBSD__
+       if (pledge("stdio", NULL) == -1)
+               eprint("error: pledge:");
+#endif
        for(;;) { /* main loop */
                FD_ZERO(&rd);
                FD_SET(0, &rd);