]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/sockpair.c
Fix up abandon merge. Hallvard will holler if I get this wrong. :-)
[openldap] / libraries / liblutil / sockpair.c
index ba42133df6f215db75b7d86ebd83d31c9e219090..e831408c4aef65c4ceac1fa642dfea2c9de04963 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -57,7 +57,12 @@ int lutil_pair( ber_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
 }