]> git.sur5r.net Git - openldap/commitdiff
NT has no dup() for sockets, imported from devel
authorKurt Zeilenga <kurt@openldap.org>
Wed, 3 Jan 2001 22:28:56 +0000 (22:28 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 3 Jan 2001 22:28:56 +0000 (22:28 +0000)
libraries/liblutil/sockpair.c

index 648009d315f7eb24c6a882d135b6ca2fdf067334..172df1d3caa9381bcb4d469e4153df75e385b828 100644 (file)
@@ -56,7 +56,12 @@ int lutil_pair( LBER_SOCKET_T sds[2] )
                return rc;
        }
 
-       sds[0] = sds[1] = sd;
+       sds[0] = sd;
+#if !HAVE_WINSOCK
+       sds[1] = dup( sds[0] );
+#else
+       sds[1] = sds[0];
+#endif
        return 0;
 #endif
 }