summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-10-17 00:01:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:21:15 -0500
commitf442ad8083d67e6bdf01894097126cd7ac3757d6 (patch)
treeaa02c90dd4b92912f527307d5795087f44caa3be /source4/torture
parent411ed1194a59cc68c4a6ad926cacfe2ddf4762cd (diff)
downloadsamba-f442ad8083d67e6bdf01894097126cd7ac3757d6.tar.gz
samba-f442ad8083d67e6bdf01894097126cd7ac3757d6.tar.bz2
samba-f442ad8083d67e6bdf01894097126cd7ac3757d6.zip
r19356: Reapply portability fix..
(This used to be commit a48d1b2d16cb4edf5e10937427b1a757e0c5b822)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/subunit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/torture/subunit.c b/source4/torture/subunit.c
index 2ec01218ed..299ca3f015 100644
--- a/source4/torture/subunit.c
+++ b/source4/torture/subunit.c
@@ -92,7 +92,11 @@ static pid_t piped_child(char* const command[], int *f_in)
pid_t pid;
int sock[2];
- if (socketpair(PF_UNIX, SOCK_STREAM, AF_LOCAL, sock) == -1) {
+#ifdef HAVE_SOCKETPAIR
+ if (socketpair(AF_UNIX, SOCK_STREAM, 0, sock) == -1) {
+#else
+ if (pipe(sock) == -1) {
+#endif
DEBUG(0, ("socketpair: %s", strerror(errno)));
return -1;
}