Fix compilation on NetBSD.
[paraslash.git] / stdout.c
index 84f2f7cacd3935fd1f60245ff171cbd9f986607d..fe188c9a0f45499af57585a2d04f147916e89072 100644 (file)
--- a/stdout.c
+++ b/stdout.c
@@ -6,6 +6,9 @@
 
 /** \file stdout.c functions that deal with writing to stdout */
 
+#include <dirent.h> /* readdir() */
+#include <assert.h>
+
 #include "para.h"
 #include "string.h"
 #include "list.h"
@@ -23,7 +26,7 @@
  * This function is always successful. If there is data available in the input
  * buffer, it adds \p STDOUT_FILENO to the write fd set of \a s.
  */
-void stdout_pre_select(struct sched *s, struct task *t)
+static void stdout_pre_select(struct sched *s, struct task *t)
 {
        struct stdout_task *sot = t->private_data;
 
@@ -52,7 +55,7 @@ void stdout_pre_select(struct sched *s, struct task *t)
  * appeears to be writable, the data loaded in the input buffer is written to
  * stdout.
  */
-void stdout_post_select(struct sched *s, struct task *t)
+static void stdout_post_select(struct sched *s, struct task *t)
 {
        struct stdout_task *sot = t->private_data;
        ssize_t ret;
@@ -97,6 +100,6 @@ void stdout_set_defaults(struct stdout_task *sot)
        sot->task.post_select = stdout_post_select;
        sot->task.event_handler = stdout_default_event_handler;
        sot->eof = 0;
-       mark_fd_nonblock(STDOUT_FILENO);
+       mark_fd_nonblocking(STDOUT_FILENO);
        sprintf(sot->task.status, "stdout writer");
 }