summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2002-07-20 06:50:47 +0000
committerAndrew Bartlett <abartlet@samba.org>2002-07-20 06:50:47 +0000
commitb96de65b26c55247f4d0f218f0e3a4ceebb4fa26 (patch)
tree9720d05b528612aac71bc856b381f481b5e11348 /source3
parent5e0cffda3e2de6112f1b3f4046daa948f8d95e91 (diff)
downloadsamba-b96de65b26c55247f4d0f218f0e3a4ceebb4fa26.tar.gz
samba-b96de65b26c55247f4d0f218f0e3a4ceebb4fa26.tar.bz2
samba-b96de65b26c55247f4d0f218f0e3a4ceebb4fa26.zip
Add a wrapper for dup2() to our system.c
Andrew Bartlett (This used to be commit b24b6307f6b40e559aec441e0ebab8f666b87d9f)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/system.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 8b2ba800f5..edda54a78d 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1219,6 +1219,16 @@ const char *sys_dlerror(void)
#endif
}
+int sys_dup2(int oldfd, int newfd)
+{
+#if defined(HAVE_DUP2)
+ return dup2(oldfd, newfd);
+#else
+ errno = ENOSYS;
+ return -1;
+#endif
+}
+
/**************************************************************************
Wrapper for Admin Logs.
****************************************************************************/