summaryrefslogtreecommitdiff
path: root/git-compat-util.h
diff options
context:
space:
mode:
authorBrian Gernhardt <brian@gernhardtsoftware.com>2013-08-05 11:59:23 -0400
committerJunio C Hamano <gitster@pobox.com>2013-08-05 11:01:09 -0700
commitf2be034c6918e7f5d42da5ad1cf9d3ef51c25a77 (patch)
tree22f1d11d6019d2ff69ff6cbaa02f3e941ba1467d /git-compat-util.h
parentc984938f9c454255012086e1203504dc243a59bd (diff)
downloadgit-f2be034c6918e7f5d42da5ad1cf9d3ef51c25a77.tar.gz
OS X: Fix redeclaration of die warningda/darwin
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>
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 6ebb02967d..d58739426c 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -128,16 +128,6 @@
#include <poll.h>
#endif
-#ifndef NO_OPENSSL
-#ifdef APPLE_COMMON_CRYPTO
-#include "compat/apple-common-crypto.h"
-#else
-#include <openssl/evp.h>
-#include <openssl/hmac.h>
-#endif /* APPLE_COMMON_CRYPTO */
-#include <openssl/x509v3.h>
-#endif /* NO_OPENSSL */
-
#if defined(__MINGW32__)
/* pull in Windows compatibility stuff */
#include "compat/mingw.h"
@@ -329,6 +319,16 @@ extern NORETURN void die_errno(const char *err, ...) __attribute__((format (prin
extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
+#ifndef NO_OPENSSL
+#ifdef APPLE_COMMON_CRYPTO
+#include "compat/apple-common-crypto.h"
+#else
+#include <openssl/evp.h>
+#include <openssl/hmac.h>
+#endif /* APPLE_COMMON_CRYPTO */
+#include <openssl/x509v3.h>
+#endif /* NO_OPENSSL */
+
/*
* Let callers be aware of the constant return value; this can help
* gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,