summaryrefslogtreecommitdiff
path: root/source3/lib/replace/replace.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/replace/replace.c')
-rw-r--r--source3/lib/replace/replace.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/lib/replace/replace.c b/source3/lib/replace/replace.c
index e7f47d7d52..9e6c75bd35 100644
--- a/source3/lib/replace/replace.c
+++ b/source3/lib/replace/replace.c
@@ -590,3 +590,24 @@ int rep_setenv(const char *name, const char *value, int overwrite)
}
#endif
+#ifndef HAVE_SOCKETPAIR
+int rep_socketpair(int d, int type, int protocol, int sv[2])
+{
+ if (d != AF_UNIX) {
+ errno = EAFNOSUPPORT;
+ return -1;
+ }
+
+ if (protocol != 0) {
+ errno = EPROTONOSUPPORT;
+ return -1;
+ }
+
+ if (type != SOCK_STREAM) {
+ errno = EOPNOTSUPP;
+ return -1;
+ }
+
+ return pipe(sv);
+}
+#endif