diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-01-15 19:10:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:09 -0500 |
commit | 2f66beb8adf679ed1e2e36f9c808c43f095e23cf (patch) | |
tree | b7f486b40393da6ddc53a921d518160dbf9032f1 /source3/lib/replace/replace.c | |
parent | 2ae539f5665ee9a849bad97cfb5ecc10cce3e766 (diff) | |
download | samba-2f66beb8adf679ed1e2e36f9c808c43f095e23cf.tar.gz samba-2f66beb8adf679ed1e2e36f9c808c43f095e23cf.tar.bz2 samba-2f66beb8adf679ed1e2e36f9c808c43f095e23cf.zip |
r20817: sync lib/replace with samba4
metze
(This used to be commit 352ee730308bbc151a742938818c9b8b3a6e8014)
Diffstat (limited to 'source3/lib/replace/replace.c')
-rw-r--r-- | source3/lib/replace/replace.c | 21 |
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 |