repack: retain the return value of pack-objects
[gitweb.git] / git-compat-util.h
index 9f1eacaaae8d85f6391457143b74797a4d62a1f4..115cb1da42cc314f75a5b032d90798e5a2ce68c5 100644 (file)
@@ -300,6 +300,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