src/irc.c
changeset 5 7c7fc8906920
parent 2 6a2e88214b80
child 6 7eb12be31bb5
--- a/src/irc.c
+++ b/src/irc.c
@@ -61,7 +61,16 @@
     /*
      * rw mode,but many seek errors ...
      */
+#ifdef NETBSD
+    /* BEGIN OF STREAM */
+    stream = fdopen (csocket, "r+");
+#else
+    /* END OF STREAM */
     stream = fdopen (csocket, "a+");
+#endif
+    csocket = fileno(stream);
+
+    printf ("Using filedescriptor %d for stream operations\n", csocket);
     return stream;
 }