소스 검색

[rglfw] fix: supress warning: "_GNU_SOURCE" redefined

When compiling rglfw.c with GCC or Clang following warning appears:

In file included from rglfw.c:99:
external/glfw/src/posix_poll.c:27:9: warning: "_GNU_SOURCE" redefined
   27 | #define _GNU_SOURCE
      |         ^~~~~~~~~~~

This commit suppresses said warning by checking,
if _GNU_SOURCE has NOT been defined, and only then defining it.

Since said macro has been always defined in posix_poll and wl_window,
this commit does not change any behavior at all (it just suppresses the
warning, that's it).
pull/4720/head
sleeptightAnsiC 1 년 전
부모
커밋
69b7d67e46
2개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. +3
    -1
      src/external/glfw/src/posix_poll.c
  2. +3
    -1
      src/external/glfw/src/wl_window.c

+ 3
- 1
src/external/glfw/src/posix_poll.c 파일 보기

@ -24,7 +24,9 @@
//
//========================================================================
#define _GNU_SOURCE
#if !defined(_GNU_SOURCE)
#define _GNU_SOURCE
#endif
#include "internal.h"

+ 3
- 1
src/external/glfw/src/wl_window.c 파일 보기

@ -25,7 +25,9 @@
//
//========================================================================
#define _GNU_SOURCE
#if !defined(_GNU_SOURCE)
#define _GNU_SOURCE
#endif
#include "internal.h"

불러오는 중...
취소
저장