summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
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 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;
}