diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-19 02:56:26 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-01-19 02:56:26 +0000 |
commit | 199de01a14d955a594a64803f2f0cb5c757c2b43 (patch) | |
tree | a4e6150a12bd75e07a85025a626a6f961a498873 | |
parent | d108ee1c9f6b1bc580c17109b52142bc42db90ac (diff) | |
download | perl-199de01a14d955a594a64803f2f0cb5c757c2b43.tar.gz |
Don't do socketpair udp unless you've got all what it takes.
p4raw-id: //depot/perl@14339
-rw-r--r-- | util.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -4025,7 +4025,11 @@ Perl_new_vstring(pTHX_ char *s, SV *sv) 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 @@ Perl_my_socketpair (int family, int type, int protocol, int fd[2]) { 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) |