Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers)
Subject: [lttng-dev] [PATCH] urcu: fix deprecation warning with new glibc
Date: Mon, 1 Jun 2015 15:25:28 +0000 (UTC)	[thread overview]
Message-ID: <1110938568.1498.1433172328929.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <556C774B.8090206@pengutronix.de>



----- On Jun 1, 2015, at 5:16 PM, Marc Kleine-Budde mkl at pengutronix.de wrote:

> 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.

Cool, thanks for the patch!

Mathieu

> 
> 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   |

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



      reply	other threads:[~2015-06-01 15:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 13:16 Marc Kleine-Budde
2015-06-01 14:25 ` Mathieu Desnoyers
2015-06-01 15:16   ` Marc Kleine-Budde
2015-06-01 15:25     ` Mathieu Desnoyers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1110938568.1498.1433172328929.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox