summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-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;
}