From 76d4821295209d61f256262c1077c4d80161e550 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Sat, 10 Sep 2011 03:43:35 +0200 Subject: [PATCH] * Moved OS X definitions to CMakeLists.txt, so we can easily re-merge upstream of miniupnp. --- thirdparty/libportfwd/CMakeLists.txt | 6 ++++-- thirdparty/libportfwd/third-party/miniupnpc-1.6/miniupnpc.c | 4 ---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/thirdparty/libportfwd/CMakeLists.txt b/thirdparty/libportfwd/CMakeLists.txt index 4d0900963..7c53626fc 100644 --- a/thirdparty/libportfwd/CMakeLists.txt +++ b/thirdparty/libportfwd/CMakeLists.txt @@ -16,9 +16,11 @@ INCLUDE_DIRECTORIES( ${MINIUPNP_DIR} include ${QT_INCLUDES} ) SET( CMAKE_C_FLAGS ${CLEAN_C_FLAGS} ) ADD_DEFINITIONS( -DPORTFWDDLLEXPORT_PRO ) +if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + ADD_DEFINITIONS( -DMACOSX -D_DARWIN_C_SOURCE ) +endif () ADD_LIBRARY(tomahawk_portfwd SHARED - # the needed bits of miniupnpc (no python module, no tests, no cli) ${MINIUPNP_DIR}/connecthostport.c ${MINIUPNP_DIR}/igd_desc_parse.c @@ -57,6 +59,6 @@ INSTALL( TARGETS tomahawk_portfwd # ) #TARGET_LINK_LIBRARIES(portfwd-demo portfwd) -# INSTALL(TARGETS portfwd ARCHIVE DESTINATION lib${LIB_SUFFIX}) +#INSTALL(TARGETS portfwd ARCHIVE DESTINATION lib${LIB_SUFFIX}) #INSTALL(TARGETS portfwd-demo RUNTIME DESTINATION bin) #INSTALL(DIRECTORY include/portfwd DESTINATION include PATTERN "*~" EXCLUDE) diff --git a/thirdparty/libportfwd/third-party/miniupnpc-1.6/miniupnpc.c b/thirdparty/libportfwd/third-party/miniupnpc-1.6/miniupnpc.c index d87f469cd..bd46a2421 100644 --- a/thirdparty/libportfwd/third-party/miniupnpc-1.6/miniupnpc.c +++ b/thirdparty/libportfwd/third-party/miniupnpc-1.6/miniupnpc.c @@ -16,10 +16,6 @@ #endif #endif -#ifdef __APPLE__ -#define _DARWIN_C_SOURCE -#endif - #include #include #include