Browse Source

ujail: add <stdio.h> and <syslog.h> to seccomp.h

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

Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
Etienne CHAMPETIER 8 years ago
parent
commit
9053da98b5
3 changed files with 3 additions and 4 deletions
  1. 0 2
      jail/preload.c
  2. 0 2
      jail/seccomp.c
  3. 3 0
      jail/seccomp.h

+ 0 - 2
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"

+ 0 - 2
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>

+ 3 - 0
jail/seccomp.h

@@ -13,6 +13,9 @@
 #ifndef _JAIL_SECCOMP_H_
 #define _JAIL_SECCOMP_H_
 
+#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__); \