Closed Bug 1461614 Opened 7 years ago Closed 7 years ago

"_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror,-W#warnings]

Categories

(Core :: WebRTC, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

With clang trunk + --enable-warnings-as-error In file included from /var/lib/jenkins/workspace/firefox-clang-last/media/mtransport/third_party/nrappkit/src/log/r_log.c:47: In file included from /var/lib/jenkins/workspace/firefox-clang-last/media/mtransport/third_party/nrappkit/src/log/r_log.h:44: In file included from /var/lib/jenkins/workspace/firefox-clang-last/obj-x86_64-pc-linux-gnu/dist/system_wrappers/syslog.h:3: In file included from /usr/include/syslog.h:1: In file included from /usr/include/x86_64-linux-gnu/sys/syslog.h:35: In file included from /var/lib/jenkins/workspace/firefox-clang-last/obj-x86_64-pc-linux-gnu/dist/system_wrappers/features.h:3: /usr/include/features.h:148:3: error: "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror,-W#warnings] # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" Not sure why it is starting to fail now.
With gcc 8: In file included from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/system_wrappers/features.h:3, from /usr/include/x86_64-linux-gnu/sys/syslog.h:35, from /usr/include/syslog.h:1, from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/system_wrappers/syslog.h:3, from /root/firefox-gcc-last/media/mtransport/third_party/nrappkit/src/log/r_log.h:44, from /root/firefox-gcc-last/media/mtransport/third_party/nrappkit/src/log/r_log.c:47: /usr/include/features.h:184: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" ^~~~~~~
Blocks: build-gcc-8
Status: NEW → ASSIGNED
Rank: 25
Priority: -- → P3
Comment on attachment 8975769 [details] Bug 1461614 - Use _DEFAULT_SOURCE on top of _BSD_SOURCE to remove a warning caused by the glibc https://reviewboard.mozilla.org/r/243982/#review250072 ::: media/mtransport/third_party/nrappkit/src/log/r_log.c:44 (Diff revision 1) > > static char *RCSSTRING __UNUSED__ ="$Id: r_log.c,v 1.10 2008/11/25 22:25:18 adamcain Exp $"; > > > #ifdef LINUX > -#define _BSD_SOURCE > +#define _DEFAULT_SOURCE I'm wondering if the better thing to do here is to maintain backward compatibility by adding _DEFAULT_SOURCE to the existing _BSD_SOURCE. From what I found online it looks like you can define both and the compiler should be happy.
Comment on attachment 8975769 [details] Bug 1461614 - Use _DEFAULT_SOURCE on top of _BSD_SOURCE to remove a warning caused by the glibc https://reviewboard.mozilla.org/r/243982/#review250398 LGTM. Thank you!
Attachment #8975769 - Flags: review?(drno) → review+
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/55ca88db8ba9 Use _DEFAULT_SOURCE on top of _BSD_SOURCE to remove a warning caused by the glibc r=drno
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: