[package] uhttpd:
[openwrt/svn-archive/archive.git] / package / uhttpd / src / uhttpd-utils.h
index c7a6c90beb4fc014377dc55623e20744d8c855ce..43a74e561602a5ccb09769b66622ee1748dadf97 100644 (file)
@@ -33,6 +33,9 @@
 #define foreach_header(i, h) \
        for( i = 0; (i + 1) < (sizeof(h) / sizeof(h[0])) && h[i]; i += 2 )
 
+#define fd_cloexec(fd) \
+       fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC)
+
 struct path_info {
        char *root;
        char *phys;