From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Yonghong Song <yhs@fb.com>
Cc: <ast@fb.com>, <daniel@iogearbox.net>, <netdev@vger.kernel.org>,
<kernel-team@fb.com>
Subject: Re: [PATCH bpf-next v2] tools/bpf: make libbpf _GNU_SOURCE friendly
Date: Thu, 29 Nov 2018 15:47:31 -0800 [thread overview]
Message-ID: <20181129154731.4e5c0f9f@cakuba.netronome.com> (raw)
In-Reply-To: <20181129233145.2100451-1-yhs@fb.com>
On Thu, 29 Nov 2018 15:31:45 -0800, Yonghong Song wrote:
> During porting libbpf to bcc, I got some warnings like below:
> ...
> [ 2%] Building C object src/cc/CMakeFiles/bpf-shared.dir/libbpf/src/libbpf.c.o
> /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf.c:12:0:
> warning: "_GNU_SOURCE" redefined [enabled by default]
> #define _GNU_SOURCE
> ...
> [ 3%] Building C object src/cc/CMakeFiles/bpf-shared.dir/libbpf/src/libbpf_errno.c.o
> /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf_errno.c: In function ‘libbpf_strerror’:
> /home/yhs/work/bcc2/src/cc/libbpf/src/libbpf_errno.c:45:7:
> warning: assignment makes integer from pointer without a cast [enabled by default]
> ret = strerror_r(err, buf, size);
> ...
>
> bcc is built with _GNU_SOURCE defined and this caused the above warning.
> This patch intends to make libpf _GNU_SOURCE friendly by
> . define _GNU_SOURCE in libbpf.c unless it is not defined
> . undefine _GNU_SOURCE as non-gnu version of strerror_r is expected.
>
> Signed-off-by: Yonghong Song <yhs@fb.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
FWIW :)
next prev parent reply other threads:[~2018-11-30 10:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-29 23:31 [PATCH bpf-next v2] tools/bpf: make libbpf _GNU_SOURCE friendly Yonghong Song
2018-11-29 23:47 ` Jakub Kicinski [this message]
2018-11-30 1:42 ` Daniel Borkmann
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=20181129154731.4e5c0f9f@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=yhs@fb.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