aboutsummaryrefslogtreecommitdiffstats
path: root/package/uhttpd/src/uhttpd-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'package/uhttpd/src/uhttpd-utils.h')
-rw-r--r--package/uhttpd/src/uhttpd-utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/uhttpd/src/uhttpd-utils.h b/package/uhttpd/src/uhttpd-utils.h
index c7a6c90beb..43a74e5616 100644
--- a/package/uhttpd/src/uhttpd-utils.h
+++ b/package/uhttpd/src/uhttpd-utils.h
@@ -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;