OS X: Fix redeclaration of die warning
compat/apple-common-crypto.h uses die() in one of its macros, but was included in git-compat-util.h before the definition of die. Fix by simply moving the relevant block after the die/error/warning declarations. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Brian Gernhardt committed
Aug 5, 2013 at 11:59 UTC
f2be034c6918e7f5d42da5ad1cf9d3ef51c25a77
1 file changed
+10
-10
git-compat-util.h
+10
-10
@@ -128,16 +128,6 @@
128
#include <poll.h>
129
#endif
130
131
-#ifndef NO_OPENSSL
132
-#ifdef APPLE_COMMON_CRYPTO
133
-#include "compat/apple-common-crypto.h"
134
-#else
135
-#include <openssl/evp.h>
136
-#include <openssl/hmac.h>
137
-#endif /* APPLE_COMMON_CRYPTO */
138
-#include <openssl/x509v3.h>
139
-#endif /* NO_OPENSSL */
140
-
131
#if defined(__MINGW32__)
132
/* pull in Windows compatibility stuff */
133
#include "compat/mingw.h"
@@ -329,6 +319,16 @@ extern NORETURN void die_errno(const char *err, ...) __attribute__((format (prin
319
extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
320
extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
321
322
+#ifndef NO_OPENSSL
323
+#ifdef APPLE_COMMON_CRYPTO
324
+#include "compat/apple-common-crypto.h"
325
+#else
326
+#include <openssl/evp.h>
327
+#include <openssl/hmac.h>
328
+#endif /* APPLE_COMMON_CRYPTO */
329
+#include <openssl/x509v3.h>
330
+#endif /* NO_OPENSSL */
331
+
332
/*
333
* Let callers be aware of the constant return value; this can help
334
* gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,