summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index e955bb5..10e3ba6 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -295,6 +295,13 @@ extern char *gitbasename(char *);
#endif
#endif
+/* The sentinel attribute is valid from gcc version 4.0 */
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+#define LAST_ARG_MUST_BE_NULL __attribute__((sentinel))
+#else
+#define LAST_ARG_MUST_BE_NULL
+#endif
+
#include "compat/bswap.h"
#ifdef USE_WILDMATCH