[OpenWrt-Devel] [PATCH procd v3 05/17] ujail: put #include guard macro in all *.h

Etienne CHAMPETIER champetier.etienne at gmail.com
Fri Nov 27 11:27:04 EST 2015


Signed-off-by: Etienne CHAMPETIER <champetier.etienne at gmail.com>
---
 jail/capabilities.h | 4 ++++
 jail/elf.h          | 3 ++-
 jail/log.h          | 3 +++
 jail/seccomp.h      | 4 ++++
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/jail/capabilities.h b/jail/capabilities.h
index e6699e9..11b8cc2 100644
--- a/jail/capabilities.h
+++ b/jail/capabilities.h
@@ -10,5 +10,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#ifndef _JAIL_CAPABILITIES_H_
+#define _JAIL_CAPABILITIES_H_
 
 int drop_capabilities(const char *file);
+
+#endif
diff --git a/jail/elf.h b/jail/elf.h
index ddbe234..570e4d0 100644
--- a/jail/elf.h
+++ b/jail/elf.h
@@ -10,8 +10,9 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#ifndef _JAIL_ELF_H_
+#define _JAIL_ELF_H_
 
-#ifndef _ELF_H__
 #include <libubox/avl.h>
 #include <libubox/avl-cmp.h>
 
diff --git a/jail/log.h b/jail/log.h
index b1d201e..56c98a0 100644
--- a/jail/log.h
+++ b/jail/log.h
@@ -10,6 +10,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#ifndef _JAIL_LOG_H_
+#define _JAIL_LOG_H_
 
 extern int debug;
 #include <syslog.h>
@@ -25,3 +27,4 @@ extern int debug;
 	if (debug) printf("jail: "fmt, ## __VA_ARGS__); \
 	} while (0)
 
+#endif
diff --git a/jail/seccomp.h b/jail/seccomp.h
index 45eede7..0992b79 100644
--- a/jail/seccomp.h
+++ b/jail/seccomp.h
@@ -10,6 +10,8 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  */
+#ifndef _JAIL_SECCOMP_H_
+#define _JAIL_SECCOMP_H_
 
 #define INFO(fmt, ...) do { \
 	syslog(LOG_INFO,"preload-seccomp: "fmt, ## __VA_ARGS__); \
@@ -17,3 +19,5 @@
 	} while (0)
 
 int install_syscall_filter(const char *argv, const char *file);
+
+#endif
-- 
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