diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-01-15 19:20:34 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-01-15 19:20:34 +0000 |
commit | c284fc70e160a7fce3b16791ff9279d4ef0d7361 (patch) | |
tree | d85c66f3db0730033bb334c1ff1624cfc2860d26 /source/lib/replace/replace.c | |
parent | 492afb63d4f74a3f5bbaf1002b7bb0e295a518f6 (diff) | |
download | samba-c284fc70e160a7fce3b16791ff9279d4ef0d7361.tar.gz samba-c284fc70e160a7fce3b16791ff9279d4ef0d7361.tar.xz samba-c284fc70e160a7fce3b16791ff9279d4ef0d7361.zip |
r20818: sync lib/replace with samba4
metze
Diffstat (limited to 'source/lib/replace/replace.c')
-rw-r--r-- | source/lib/replace/replace.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/lib/replace/replace.c b/source/lib/replace/replace.c index e7f47d7d521..9e6c75bd358 100644 --- a/source/lib/replace/replace.c +++ b/source/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 |