Skip to content

Commit 2492dd3

Browse files
authored
[build] [Makefile]: Undefine _GNU_SOURCE for rglfw.c (#4732)
Currently, a warning about _GNU_SOURCE being redefined is emitted when compiling rglfw.c In file included from rglfw.c:99: external/glfw/src/posix_poll.c:27:9: warning: "_GNU_SOURCE" redefined 27 | #define _GNU_SOURCE | ^~~~~~~~~~~ <command-line>: note: this is the location of the previous definition This can be avoided by not defining _GNU_SOURCE on the command line for this file. Defining feature test macros in source code is not really good practice so this should probably reviewed in glfw itself, at least to maybe check #ifdef _GNU_SOURCE first. But for now this change will suffice. Fixes #4725
1 parent 5504983 commit 2492dd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ rcore.o : rcore.c raylib.h rlgl.h utils.h raymath.h rcamera.h rgestures.h
742742

743743
# Compile rglfw module
744744
rglfw.o : rglfw.c
745-
$(CC) $(GLFW_OSX) -c $< $(CFLAGS) $(INCLUDE_PATHS)
745+
$(CC) $(GLFW_OSX) -c $< $(CFLAGS) $(INCLUDE_PATHS) -U_GNU_SOURCE
746746

747747
# Compile shapes module
748748
rshapes.o : rshapes.c raylib.h rlgl.h

0 commit comments

Comments
 (0)