summaryrefslogtreecommitdiff
path: root/src/libunixonacid/unixmessage_put.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-02-19 14:54:44 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-02-19 14:54:44 +0000
commit15eda3d33f9e1160d438d370acd442ef3dbba63f (patch)
tree88f50dd23414f9bee659a6438fa62131825d072d /src/libunixonacid/unixmessage_put.c
parent332d4cbc24ab82cc77bccb0ce2c158c5e86a8fac (diff)
downloadskalibs-15eda3d33f9e1160d438d370acd442ef3dbba63f.tar.xz
Add DragonFly macro; remove nbwaitall and ancilautoclose
Diffstat (limited to 'src/libunixonacid/unixmessage_put.c')
-rw-r--r--src/libunixonacid/unixmessage_put.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/libunixonacid/unixmessage_put.c b/src/libunixonacid/unixmessage_put.c
index 528c3b8..a8701ee 100644
--- a/src/libunixonacid/unixmessage_put.c
+++ b/src/libunixonacid/unixmessage_put.c
@@ -1,9 +1,5 @@
/* ISC license. */
-#include <skalibs/sysdeps.h>
-#ifdef SKALIBS_HASANCILAUTOCLOSE
-#include <unistd.h>
-#endif
#include <string.h>
#include <errno.h>
#include <skalibs/bitarray.h>
@@ -22,24 +18,6 @@ static inline int copyfds (char *s, int const *fds, unsigned int n, unsigned cha
int fd = fds[i] ;
if (fd < 0) return (errno = EINVAL, -1) ;
if (bitarray_peek(bits, i)) fd = - fd - 1 ;
-#ifdef SKALIBS_HASANCILAUTOCLOSE
- else
- {
- fd = dup(fd) ;
- if (fd < 0)
- {
- int e = errno ;
- while (i--)
- {
- s -= sizeof(int) ;
- memcpy((char *)fd, s, sizeof(int)) ;
- if (fd >= 0) (*closecb)(fd, closecbdata) ;
- }
- errno = e ;
- return 0 ;
- }
- }
-#endif
memcpy(s, (char const *)&fd, sizeof(int)) ;
s += sizeof(int) ;
}