diff --git a/Makefile.common b/Makefile.common index 75b68aac..aa016073 100644 --- a/Makefile.common +++ b/Makefile.common @@ -160,6 +160,7 @@ ifeq ($(SYSTEM_MINIZIP), 1) CFLAGS += $(shell pkg-config --cflags minizip) LDFLAGS += $(shell pkg-config --libs minizip) else + PLATCFLAGS += -DNOCRYPT -DNOUNCRYPT INCFLAGS += $(MINIZIP_INCFLAGS) SOURCES_C += $(MINIZIP_SOURCES_C) endif @@ -177,6 +178,9 @@ ifeq ($(SYSTEM_ZLIB), 1) CFLAGS += $(shell pkg-config --cflags zlib) LDFLAGS += $(shell pkg-config --libs zlib) else +ifneq (,$(findstring unix,$(platform))) + PLATCFLAGS += -DHAVE_UNISTD_H +endif INCFLAGS += $(ZLIB_INCFLAGS) SOURCES_C += $(ZLIB_SOURCES_C) endif diff --git a/libretro/libretro.c b/libretro/libretro.c index 1938b75a..53031638 100644 --- a/libretro/libretro.c +++ b/libretro/libretro.c @@ -441,7 +441,7 @@ static void emu_step_initialize(void) plugin_connect_all(); } -static void* EmuThreadFunction(void* param) +static void EmuThreadFunction() { uint32_t netplay_port = 0; uint16_t netplay_player = 1; @@ -484,8 +484,13 @@ static void* EmuThreadFunction(void* param) // Unset emuThreadRunning = false; } +} - return NULL; +static void* EmuThreadWrapper(void* param) +{ + (void)param; + EmuThreadFunction(); + return NULL; } static void reinit_gfx_plugin(void) @@ -2027,7 +2032,7 @@ void retro_run (void) { if(!emuThreadRunning) { - pthread_create(&emuThread, NULL, &EmuThreadFunction, NULL); + pthread_create(&emuThread, NULL, &EmuThreadWrapper, NULL); emuThreadRunning = true; } }