From: Jagger Date: Fri, 11 Mar 2016 01:45:43 +0000 (+0100) Subject: Correct (non-resrved) header guards X-Git-Tag: 1.2~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eff4796c951c6c64ea18b266032b773350b9b32c;p=platform%2Fupstream%2Fnsjail.git Correct (non-resrved) header guards --- diff --git a/Makefile b/Makefile index cd5a64f..8f3439b 100644 --- a/Makefile +++ b/Makefile @@ -69,7 +69,21 @@ cmdline.o: cmdline.h common.h log.h util.h contain.o: contain.h common.h log.h mount.h net.h util.h uts.h log.o: log.h common.h mount.o: mount.h common.h log.h -net.o: net.h common.h log.h +net.o: net.h common.h log.h /usr/include/libnl3/netlink/route/link.h +net.o: /usr/include/libnl3/netlink/netlink.h +net.o: /usr/include/libnl3/netlink/netlink-compat.h +net.o: /usr/include/libnl3/netlink/version.h +net.o: /usr/include/libnl3/netlink/errno.h +net.o: /usr/include/libnl3/netlink/types.h +net.o: /usr/include/libnl3/netlink/handlers.h +net.o: /usr/include/libnl3/netlink/netlink-kernel.h +net.o: /usr/include/libnl3/netlink/socket.h +net.o: /usr/include/libnl3/netlink/object.h +net.o: /usr/include/libnl3/netlink/utils.h /usr/include/libnl3/netlink/list.h +net.o: /usr/include/libnl3/netlink/cache.h /usr/include/libnl3/netlink/msg.h +net.o: /usr/include/libnl3/netlink/attr.h /usr/include/libnl3/netlink/addr.h +net.o: /usr/include/libnl3/netlink/data.h +net.o: /usr/include/libnl3/netlink/route/link/macvlan.h sandbox.o: sandbox.h common.h log.h seccomp/bpf-helper.h subproc.o: subproc.h common.h contain.h log.h net.h sandbox.h user.h util.h user.o: user.h common.h log.h util.h diff --git a/cmdline.h b/cmdline.h index 2cd4dc7..706811c 100644 --- a/cmdline.h +++ b/cmdline.h @@ -19,8 +19,8 @@ */ -#ifndef _CMDLINE_H -#define _CMDLINE_H +#ifndef NS_CMDLINE_H +#define NS_CMDLINE_H #include #include diff --git a/common.h b/common.h index 8165c0a..3c3e396 100644 --- a/common.h +++ b/common.h @@ -19,8 +19,8 @@ */ -#ifndef _COMMON_H -#define _COMMON_H +#ifndef NS_COMMON_H +#define NS_COMMON_H #include #include @@ -38,7 +38,7 @@ #ifdef __clang__ static void __attribute__ ((unused)) _clang_cleanup_func(void (^*dfunc) (void)) { - (*dfunc) (); + (*dfunc) (); } #define DEFER(a) void (^_STRMERGE(__defer_f_, __COUNTER__))(void) __attribute__((cleanup(_clang_cleanup_func))) __attribute__((unused)) = ^{ a; } @@ -126,4 +126,4 @@ struct nsjconf_t { TAILQ_HEAD(mountptslist, mounts_t) mountpts; }; -#endif /* _COMMON_H */ +#endif /* NS_COMMON_H */ diff --git a/contain.h b/contain.h index 4a57da9..1ea0e99 100644 --- a/contain.h +++ b/contain.h @@ -19,8 +19,8 @@ */ -#ifndef _CONTAIN_H -#define _CONTAIN_H +#ifndef NS_CONTAIN_H +#define NS_CONTAIN_H #include @@ -29,4 +29,4 @@ bool containSetupFD(struct nsjconf_t *nsjconf, int fd_in, int fd_out, int fd_err, int fd_log); bool containContain(struct nsjconf_t *nsjconf); -#endif /* _CONTAIN_H */ +#endif /* NS_CONTAIN_H */ diff --git a/log.h b/log.h index 04181b3..f685039 100644 --- a/log.h +++ b/log.h @@ -19,8 +19,8 @@ */ -#ifndef _LOG_H -#define _LOG_H +#ifndef NS_LOG_H +#define NS_LOG_H #include #include @@ -59,4 +59,4 @@ void logStop(int sig); void logRedirectLogFD(int fd); void logDirectlyToFD(const char *msg); -#endif /* _LOG_H */ +#endif /* NS_LOG_H */ diff --git a/mount.h b/mount.h index 3f75973..67efdbd 100644 --- a/mount.h +++ b/mount.h @@ -19,8 +19,8 @@ */ -#ifndef _MOUNT_H -#define _MOUNT_H +#ifndef NS_MOUNT_H +#define NS_MOUNT_H #include @@ -28,4 +28,4 @@ bool mountInitNs(struct nsjconf_t *nsjconf); -#endif /* _MOUNT_H */ +#endif /* NS_MOUNT_H */ diff --git a/net.h b/net.h index 8b541aa..db1040f 100644 --- a/net.h +++ b/net.h @@ -19,8 +19,8 @@ */ -#ifndef _NET_H -#define _NET_H +#ifndef NS_NET_H +#define NS_NET_H #include #include diff --git a/nsjail.h b/nsjail.h index a5d3145..7c3d7b9 100644 --- a/nsjail.h +++ b/nsjail.h @@ -20,8 +20,8 @@ */ -#ifndef _NSJAIL_H -#define _NSJAIL_H +#ifndef NS_NSJAIL_H +#define NS_NSJAIL_H #include "common.h" diff --git a/sandbox.h b/sandbox.h index 17291ab..b28cc14 100644 --- a/sandbox.h +++ b/sandbox.h @@ -19,8 +19,8 @@ */ -#ifndef _SANDBOX_H -#define _SANDBOX_H +#ifndef NS_SANDBOX_H +#define NS_SANDBOX_H #include @@ -28,4 +28,4 @@ bool sandboxApply(struct nsjconf_t *nsjconf); -#endif /* _SANDBOX_H */ +#endif /* NS_SANDBOX_H */ diff --git a/subproc.h b/subproc.h index 27866bf..ce25ca4 100644 --- a/subproc.h +++ b/subproc.h @@ -19,8 +19,8 @@ */ -#ifndef _PROC_H -#define _PROC_H +#ifndef NS_PROC_H +#define NS_PROC_H #include "common.h" @@ -32,4 +32,4 @@ void subprocKillAll(struct nsjconf_t *nsjconf); /* Returns the exit code of the first failing subprocess, or 0 if none fail */ int subprocReap(struct nsjconf_t *nsjconf); -#endif /* _PROC_H */ +#endif /* NS_PROC_H */ diff --git a/user.h b/user.h index c79135c..4ef208b 100644 --- a/user.h +++ b/user.h @@ -19,8 +19,8 @@ */ -#ifndef _USER_H -#define _USER_H +#ifndef NS_USER_H +#define NS_USER_H #include @@ -28,4 +28,4 @@ bool userInitNsFromParent(struct nsjconf_t *nsjconf, pid_t pid); -#endif /* _USER_H */ +#endif /* NS_USER_H */ diff --git a/util.h b/util.h index 7e9d88a..d9de66b 100644 --- a/util.h +++ b/util.h @@ -19,8 +19,8 @@ */ -#ifndef _UTIL_H -#define _UTIL_H +#ifndef NS_UTIL_H +#define NS_UTIL_H #include #include @@ -32,4 +32,4 @@ ssize_t utilWriteToFd(int fd, const void *buf, size_t len); ssize_t utilReadFromFd(int fd, void *buf, size_t len); bool utilWriteBufToFile(char *filename, const void *buf, size_t len, int open_flags); -#endif /* _UTIL_H */ +#endif /* NS_UTIL_H */ diff --git a/uts.h b/uts.h index 7382808..73b52be 100644 --- a/uts.h +++ b/uts.h @@ -19,8 +19,8 @@ */ -#ifndef _UTS_H -#define _UTS_H +#ifndef NS_UTS_H +#define NS_UTS_H #include #include @@ -29,4 +29,4 @@ bool utsInitNs(struct nsjconf_t *nsjconf); -#endif /* _UTS_H */ +#endif /* NS_UTS_H */