Permalink
Browse files

Fix extern bug with DEFINE_GLOBALS.

The old way defined app_context many times, and relied on gcc's lenient behavior to work correctly. This breaks down with Clang on recent MacOS. This one-character bugfix makes it work on both platforms.
  • Loading branch information...
1 parent 310dfe3 commit 33c9118284425fe5ef00dfa76ae86e9b9feab764 @PeterScott PeterScott committed with Jul 26, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/common.h
View
@@ -82,7 +82,7 @@ typedef struct AppContext_ {
struct HttpHandlerContext_ *http_handler_context;
} AppContext;
-#ifdef DEFINE_GLOBALS
+#ifndef DEFINE_GLOBALS
extern AppContext app_context;
#else
AppContext app_context;

0 comments on commit 33c9118

Please sign in to comment.