Skip to content

Commit f2be034

Browse files
Benabikgitster
authored andcommitted
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 <[email protected]> Reviewed-by: Jeremy Huddleston Sequoia <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c984938 commit f2be034

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

git-compat-util.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,6 @@
128128
#include <poll.h>
129129
#endif
130130

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-
141131
#if defined(__MINGW32__)
142132
/* pull in Windows compatibility stuff */
143133
#include "compat/mingw.h"
@@ -329,6 +319,16 @@ extern NORETURN void die_errno(const char *err, ...) __attribute__((format (prin
329319
extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));
330320
extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));
331321

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+
332332
/*
333333
* Let callers be aware of the constant return value; this can help
334334
* gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,

0 commit comments

Comments
 (0)