diff --git src/CMakeLists.txt src/CMakeLists.txt index a1d9e3a..d82dac8 100644 --- src/lsl/src/CMakeLists.txt +++ src/lsl/src/CMakeLists.txt @@ -11,6 +11,14 @@ ENDIF ( EXISTS ${libSpringLobby_BINARY_DIR}/libSpringLobby_config.h OR EXISTS INCLUDE_DIRECTORIES(${libSpringLobby_SOURCE_DIR}/lib) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) +INCLUDE (CheckFunctionExists) + +SET(CMAKE_REQUIRED_INCLUDES stdio.h) +CHECK_FUNCTION_EXISTS(fmemopen HAVE_FMEMOPEN) +IF(HAVE_FMEMOPEN) + ADD_DEFINITIONS(-DHAVE_FMEMOPEN) +ENDIF(HAVE_FMEMOPEN) + add_subdirectory( lslutils ) if (LSLSERVER) add_subdirectory( lsl ) diff --git src/lslunitsync/image.cpp src/lslunitsync/image.cpp index fbc4591..e26215c 100644 --- src/lsl/src/lslunitsync/image.cpp +++ src/lsl/src/lslunitsync/image.cpp @@ -14,7 +14,7 @@ #include -#ifdef WIN32 +#if !defined(HAVE_FMEMOPEN) #include //! we need our own fmemopen implementation since its posix only FILE* fmemopen(void* data, size_t size, const char* mode)