cxong / cdogs-sdl

Classic overhead run-and-gun game
https://cxong.github.io/cdogs-sdl/
GNU General Public License v2.0
891 stars 114 forks source link

GCW-Zero commit broke building #551

Closed ghost closed 6 years ago

ghost commented 6 years ago

After a make clean and another try, it outputs

[ 47%] Building C object src/cdogs/CMakeFiles/cdogs.dir/utils.c.o
In file included from /usr/include/assert.h:35:0,
                 from /home/username/Projekte/cdogs-sdl/src/cdogs/utils.h:51,
                 from /home/username/Projekte/cdogs-sdl/src/cdogs/utils.c:51:
/usr/include/features.h:183:3: error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror=cpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^~~~~~~
cc1: all warnings being treated as errors

GCC version is 7.2.0 on an OS based on Ubuntu 17.10.

It is probably related to this SO answer, a glibc feature (?) that apparently requires you to #define _DEFAULT_SOURCE as well.

ghost commented 6 years ago

@cxong Tested it and I can confirm that inserting #define _DEFAULT_SOURCE fixes it. If I remember correctly you develop CDogs SDL under OS X and this is a glibc shenanigan.

Pull request: https://github.com/cxong/cdogs-sdl/pull/552

ghost commented 6 years ago

Thanks.