diff --git a/src/include/platform.h b/src/include/platform.h index f8f75f0d..6433a2bf 100644 --- a/src/include/platform.h +++ b/src/include/platform.h @@ -36,6 +36,13 @@ #include "MHD_config.h" +#ifndef BUILDING_MHD_LIB +#ifdef _MHD_EXTERN +#undef _MHD_EXTERN +#endif /* _MHD_EXTERN */ +#define _MHD_EXTERN extern +#endif /* BUILDING_MHD_LIB */ + #define _XOPEN_SOURCE_EXTENDED 1 #if OS390 #define _OPEN_THREADS diff --git a/src/microhttpd/Makefile.am b/src/microhttpd/Makefile.am index 61d2109d..02153a06 100644 --- a/src/microhttpd/Makefile.am +++ b/src/microhttpd/Makefile.am @@ -20,6 +20,9 @@ libmicrohttpd_la_SOURCES = \ internal.c internal.h \ memorypool.c memorypool.h \ response.c response.h +libmicrohttpd_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -DBUILDING_MHD_LIB=1 libmicrohttpd_la_LDFLAGS = \ $(MHD_LIB_LDFLAGS) \ -version-info @LIB_VERSION_CURRENT@:@LIB_VERSION_REVISION@:@LIB_VERSION_AGE@ diff --git a/src/microspdy/Makefile.am b/src/microspdy/Makefile.am index 3a343ddc..52929ee2 100644 --- a/src/microspdy/Makefile.am +++ b/src/microspdy/Makefile.am @@ -29,6 +29,10 @@ libmicrospdy_la_SOURCES = \ libmicrospdy_la_LDFLAGS = \ $(SPDY_LIB_LDFLAGS) +libmicrospdy_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -DBUILDING_MHD_LIB=1 + libmicrospdy_la_CFLAGS = -Wextra \ $(SPDY_LIB_CFLAGS)