瀏覽代碼

[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
pull/4734/head
Peter0x44 3 月之前
committed by GitHub
父節點
當前提交
2492dd3d0a
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: B5690EEEBB952194
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/Makefile

+ 1
- 1
src/Makefile 查看文件

@ -742,7 +742,7 @@ rcore.o : rcore.c raylib.h rlgl.h utils.h raymath.h rcamera.h rgestures.h
# Compile rglfw module
rglfw.o : rglfw.c
$(CC) $(GLFW_OSX) -c $< $(CFLAGS) $(INCLUDE_PATHS)
$(CC) $(GLFW_OSX) -c $< $(CFLAGS) $(INCLUDE_PATHS) -U_GNU_SOURCE
# Compile shapes module
rshapes.o : rshapes.c raylib.h rlgl.h

Loading…
取消
儲存