浏览代码

Merge pull request #230 from OdnetninI/develop

Examples Linux Physics Fix
Ray 8 年之前
父节点
当前提交
c46989a1d9
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      examples/Makefile

+ 7 - 0
examples/Makefile

@@ -497,6 +497,13 @@ audio_module_playing: audio_module_playing.c
 audio_raw_stream: audio_raw_stream.c
 audio_raw_stream: audio_raw_stream.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS)
 
 
+# Linux Fix to timespect from 
+ifeq ($(PLATFORM),PLATFORM_DESKTOP)
+    ifeq ($(PLATFORM_OS),LINUX)
+        CFLAGS += -D_POSIX_C_SOURCE=199309L
+    endif
+endif
+
 # compile [physac] example - physics demo
 # compile [physac] example - physics demo
 physics_demo: physics_demo.c
 physics_demo: physics_demo.c
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -lpthread -D$(PLATFORM) $(WINFLAGS)
 	$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -lpthread -D$(PLATFORM) $(WINFLAGS)