Change 14339 by jhi@alpha on 2002/01/19 02:56:26

        Don't do socketpair udp unless you've got all what it takes.

Affected files ...

.... //depot/perl/util.c#317 edit

Differences ...

==== //depot/perl/util.c#317 (text) ====
Index: perl/util.c
--- perl/util.c.~1~     Fri Jan 18 20:00:07 2002
+++ perl/util.c Fri Jan 18 20:00:07 2002
@@ -4025,7 +4025,11 @@
     return s;
 }
 
-#if !defined(HAS_SOCKETPAIR) && defined(HAS_SOCKET)
+#if !defined(HAS_SOCKETPAIR) && defined(HAS_SOCKET) && defined(AF_INET) && 
+defined(PF_INET) && defined(SOCK_DGRAM)
+#   define EMULATE_SOCKETPAIR_UDP
+#endif
+
+#ifdef EMULATE_SOCKETPAIR_UDP
 static int
 S_socketpair_udp (int fd[2]) {
     dTHX;
@@ -4191,8 +4195,10 @@
         return -1;
     }
 
+#ifdef EMULATE_SOCKETPAIR_UDP
     if (type == SOCK_DGRAM)
         return S_socketpair_udp (fd);
+#endif
 
     listener = PerlSock_socket (AF_INET, type, 0);
     if (listener == -1)
End of Patch.

Reply via email to