From 0a4fc92c77c0386d69f910e7e9fb8b3ac8a29521 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 16 May 2014 00:07:59 +1000 Subject: ctdb-header: Protect against multiple includes Signed-off-by: Amitay Isaacs Reviewed-by: Michael Adam --- ctdb/include/internal/cmdline.h | 3 +++ ctdb/include/internal/idtree.h | 4 ++++ ctdb/lib/util/debug.h | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/ctdb/include/internal/cmdline.h b/ctdb/include/internal/cmdline.h index 785595ee6c..67704c614e 100644 --- a/ctdb/include/internal/cmdline.h +++ b/ctdb/include/internal/cmdline.h @@ -1,3 +1,5 @@ +#ifndef CTDB_CMDLINE_H +#define CTDB_CMDLINE_H extern struct poptOption popt_ctdb_cmdline[]; @@ -5,3 +7,4 @@ extern struct poptOption popt_ctdb_cmdline[]; struct ctdb_context *ctdb_cmdline_init(struct event_context *ev); +#endif /* CTDB_CMDLINE_H */ diff --git a/ctdb/include/internal/idtree.h b/ctdb/include/internal/idtree.h index 259af91005..d60817a1a8 100644 --- a/ctdb/include/internal/idtree.h +++ b/ctdb/include/internal/idtree.h @@ -1,3 +1,6 @@ +#ifndef IDTREE_H +#define IDTREE_H + struct idr_context *idr_init(TALLOC_CTX *mem_ctx); int idr_get_new(struct idr_context *idp, void *ptr, int limit); int idr_get_new_above(struct idr_context *idp, void *ptr, int starting_id, int limit); @@ -5,3 +8,4 @@ int idr_get_new_random(struct idr_context *idp, void *ptr, int limit); void *idr_find(struct idr_context *idp, int id); int idr_remove(struct idr_context *idp, int id); +#endif /* IDTREE_H */ diff --git a/ctdb/lib/util/debug.h b/ctdb/lib/util/debug.h index 27490a3dbf..d5a215aff3 100644 --- a/ctdb/lib/util/debug.h +++ b/ctdb/lib/util/debug.h @@ -17,6 +17,9 @@ along with this program; if not, see . */ +#ifndef UTIL_DEBUG_H +#define UTIL_DEBUG_H + void (*do_debug_v)(const char *, va_list ap); const char *debug_extra; void (*do_debug_add_v)(const char *, va_list ap); @@ -25,3 +28,4 @@ void do_debug(const char *format, ...) PRINTF_ATTRIBUTE(1, 2); void do_debug_add(const char *format, ...) PRINTF_ATTRIBUTE(1, 2); void dump_data(int level, const uint8_t *buf1, size_t len); +#endif /* UTIL_DEBUG_H */ -- cgit