Просмотр исходного кода

[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 год назад
Родитель
Сommit
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"

Загрузка…
Отмена
Сохранить