[OpenWrt-Devel] [PATCH procd v2 07/17] ujail: add <stdio.h> and <syslog.h> to seccomp.h

Etienne CHAMPETIER champetier.etienne at gmail.com
Wed Nov 25 12:54:40 EST 2015


headers must include all there dependencies, no more, no less

Signed-off-by: Etienne CHAMPETIER <champetier.etienne at gmail.com>
---
 jail/preload.c | 2 --
 jail/seccomp.c | 2 --
 jail/seccomp.h | 3 +++
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/jail/preload.c b/jail/preload.c
index a1cc0b6..5466f27 100644
--- a/jail/preload.c
+++ b/jail/preload.c
@@ -13,12 +13,10 @@
 
 #define _GNU_SOURCE
 #include <sys/types.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
 #include <dlfcn.h>
-#include <syslog.h>
 
 #include "seccomp.h"
 #include "../preload.h"
diff --git a/jail/seccomp.c b/jail/seccomp.c
index de01fc6..dcd19ec 100644
--- a/jail/seccomp.c
+++ b/jail/seccomp.c
@@ -10,11 +10,9 @@
  * found in the LICENSE file.
  */
 #define _GNU_SOURCE 1
-#include <stdio.h>
 #include <stddef.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <syslog.h>
 
 #include <libubox/utils.h>
 #include <libubox/blobmsg.h>
diff --git a/jail/seccomp.h b/jail/seccomp.h
index 6540246..615cc4d 100644
--- a/jail/seccomp.h
+++ b/jail/seccomp.h
@@ -12,6 +12,9 @@
  */
 #pragma once
 
+#include <stdio.h>
+#include <syslog.h>
+
 #define INFO(fmt, ...) do { \
 	syslog(LOG_INFO,"preload-seccomp: "fmt, ## __VA_ARGS__); \
 	fprintf(stderr,"preload-seccomp: "fmt, ## __VA_ARGS__); \
-- 
1.9.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list