Hi, When compiling xorg code on rawhide, I get a ton of: /usr/include/features.h:145:3: error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" This is caused by xtrans.pc adding _BSD_SOURCE to cflags, so I wrote a patch to stop it from doing this: http://lists.x.org/archives/xorg-devel/2014-March/040840.html This has resulted in some discussion about this, and here: http://lists.x.org/archives/xorg-devel/2014-March/040941.html It was suggested that it would be better if glibc would not issue this warning in some other feature define which also encompasses all the features of the old define is also present. In the xorg case that would be _GNU_SOURCE, but the same argument could be made for _DEFAULT_SOURCE. This way makefiles can simply add, ie: "-D_BSD_SOURCE -D_GNU_SOURCE" and simply have the code work everywhere. Thanks & Regards, Hans
The lists.x.org server seems to be down, so I haven't read the discussions. In general we attempted to do what you suggest. For example if you define _DEFAULT_SOURCE the warnins about _BSD_SOURCE will go away. That is to say that this works without warning: "-D_BSD_SOURCE -D_DEFAULT_SOURCE". See: https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes Your suggestion seems to be that any feature test macro that encompasses whatever is in _BSD_SOURCE should disable the warning?
(In reply to Carlos O'Donell from comment #1) > Your suggestion seems to be that any feature test macro that encompasses > whatever is in _BSD_SOURCE should disable the warning? Yes more or less, I can understand if that is going to be a pain to maintain though, but it would be nice if at least the ubiquitous _GNU_SOURCE would turn of the warning. If I understand you and https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes correctly, I can also get rid of the warning by replacing "-D_BSD_SOURCE" with "-D_BSD_SOURCE -D_DEFAULT_SOURCE" in the cflags in the pc file, correct ? And yes I know it is weird to set these from a pc file, long story.
(In reply to Hans de Goede from comment #2) > If I understand you and > https://sourceware.org/glibc/wiki/Release/2.20#Packaging_Changes correctly, > I can also get rid of the warning by replacing "-D_BSD_SOURCE" with > "-D_BSD_SOURCE -D_DEFAULT_SOURCE" in the cflags in the pc file, correct ? That indeed fixes things, closing this. *** This bug has been marked as a duplicate of bug 1067110 ***