# New Ticket Created by  Markus Amslser 
# Please include the string:  [perl #34126]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34126 >


With this patch the tiny webserver from # 34121 runs also on linux 
(tested on debian testing).

depends on #34120

Markus

Changelog:
  - fix bind, listen, accept on unix
  - remove some debug output

Index: io/io_unix.c
===================================================================
RCS file: /cvs/public/parrot/io/io_unix.c,v
retrieving revision 1.57
diff -u -u -r1.57 io_unix.c
--- io/io_unix.c        1 Feb 2005 09:43:20 -0000       1.57
+++ io/io_unix.c        13 Feb 2005 17:32:46 -0000
@@ -661,7 +661,6 @@
 
     sa.sin_port = htons(port);
 
-    fprintf(stderr, "sockaddr_in: port %d\n", port);
     return string_make(interpreter, &sa, sizeof(struct sockaddr),
             "iso-8859-1", 0);
 }
@@ -692,7 +691,6 @@
         io = PIO_new(interpreter, PIO_F_SOCKET, 0, PIO_F_READ|PIO_F_WRITE);
         io->fd = sock;
         io->remote.sin_family = fam;
-        fprintf(stderr, "socket: fd = %d\n", sock);
         return io;
     }
     perror("socket:");
@@ -1163,13 +1161,19 @@
     PIO_unix_socket,
     PIO_unix_connect,
     PIO_unix_send,
-    PIO_unix_recv
+    PIO_unix_recv,
+    PIO_unix_bind,
+    PIO_unix_listen,
+    PIO_unix_accept
 #else
     0, /* no poll */
     0, /* no socket */
     0, /* no connect */
     0, /* no send */
-    0 /* no recv */
+    0, /* no recv */
+    0, /* no bind */
+    0, /* no listen */
+    0  /* no accept */
 #endif
 };
 

Reply via email to