summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-10-16 21:32:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:21:14 -0500
commitd490e27304d7754d7a069afe6b9fb180b108999c (patch)
tree9d0a0262b100443b1f19db095e1096f3a878cc63
parent4177cf9926a62c3026fbd5c5323cbdd1f0f361bd (diff)
downloadsamba-d490e27304d7754d7a069afe6b9fb180b108999c.tar.gz
samba-d490e27304d7754d7a069afe6b9fb180b108999c.tar.bz2
samba-d490e27304d7754d7a069afe6b9fb180b108999c.zip
r19346: AF_LOCAL isn't defined on all platforms.
(This used to be commit e9bd6f28d830ed7ead1412a26b532538cd1450e0)
-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 72e39101e2..3cad622d6f 100644
--- a/source4/torture/subunit.c
+++ b/source4/torture/subunit.c
@@ -72,7 +72,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;
}