You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to compile d206041 under GNU/Linux, I get a compiler warning which is treated as error:
In file included from /usr/include/assert.h:35:0,
from /home/wuzzy/src/cdogs-sdl/git/src/cdogs/utils.h:52,
from /home/wuzzy/src/cdogs-sdl/git/src/cdogs/utils.c:50:
/usr/include/features.h:148:3: Fehler: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror=cpp]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
^
[ 23%] cc1: Alle Warnungen werden als Fehler behandelt
src/tests/CMakeFiles/autosave_test.dir/build.make:192: recipe for target 'src/tests/CMakeFiles/autosave_test.dir/__/cdogs/utils.c.o' failed
make[2]: *** [src/tests/CMakeFiles/autosave_test.dir/__/cdogs/utils.c.o] Error 1
CMakeFiles/Makefile2:443: recipe for target 'src/tests/CMakeFiles/autosave_test.dir/all' failed
make[1]: *** [src/tests/CMakeFiles/autosave_test.dir/all] Error 2
(“Fehler:” is German for “Error:”. “Alle Warnungen werden als Fehler behandelt” is German for “All warnings are treated as errors”.)
I could fix this by changing line 49 of utils.c from #define _BSD_SOURCE to #define _DEFAULT_SOURCE.
The text was updated successfully, but these errors were encountered:
Looks like _DEFAULT_SOURCE was added in glibc 2.19 and _BSD_SOURCE deprecated in version 2.20. Both these versions are quite new so I think we'll need to test for the existence of _DEFAULT_SOURCE before using it.
When I try to compile d206041 under GNU/Linux, I get a compiler warning which is treated as error:
(“Fehler:” is German for “Error:”. “Alle Warnungen werden als Fehler behandelt” is German for “All warnings are treated as errors”.)
I could fix this by changing line 49 of
utils.c
from#define _BSD_SOURCE
to#define _DEFAULT_SOURCE
.The text was updated successfully, but these errors were encountered: