From mboxrd@z Thu Jan 1 00:00:00 1970 From: mkl@pengutronix.de (Marc Kleine-Budde) Date: Mon, 1 Jun 2015 17:16:27 +0200 Subject: [lttng-dev] [PATCH] urcu: fix deprecation warning with new glibc In-Reply-To: <1237864258.1418.1433168737082.JavaMail.zimbra@efficios.com> References: <1433164590-9078-1-git-send-email-mkl@pengutronix.de> <1237864258.1418.1433168737082.JavaMail.zimbra@efficios.com> Message-ID: <556C774B.8090206@pengutronix.de> On 06/01/2015 04:25 PM, Mathieu Desnoyers wrote: > ----- On Jun 1, 2015, at 3:16 PM, Marc Kleine-Budde mkl at pengutronix.de wrote: > >> This patch fixes the following warning: >> >> /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE >> are deprecated, use _DEFAULT_SOURCE" [-Wcpp] >> # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" > > And why does this patch just add _DEFAULT_SOURCE without removing _BSD_SOURCE ? > Is it the intended transition path ? Is it documented somewhere ? >From http://man7.org/linux/man-pages/man7/feature_test_macros.7.html: _BSD_SOURCE (deprecated since glibc 2.20) [...] Since glibc 2.20, this macro is deprecated. It now has the same effect as defining _DEFAULT_SOURCE, but generates a com? pile-time warning (unless _DEFAULT_SOURCE is also defined). Use _DEFAULT_SOURCE instead. To allow code that requires _BSD_SOURCE in glibc 2.19 and earlier and _DEFAULT_SOURCE in glibc 2.20 and later to compile without warnings, define both _BSD_SOURCE and _DEFAULT_SOURCE. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 455 bytes Desc: OpenPGP digital signature URL: