[dpdk-stable] [PATCH 18.11 1/1] build: enable BSD features visibility for FreeBSD

Luca Boccassi bluca at debian.org
Wed Sep 25 20:03:11 CEST 2019


On Wed, 2019-09-25 at 18:12 +0100, Kevin Traynor wrote:
> From: Marcin Smoczynski <
> marcinx.smoczynski at intel.com
> >
> 
> [ upstream commit 28188cee2aa0b72d401d3e56942d0db9c7b9e654]
> 
> When a component uses either XOPEN_SOURCE or POSIX_C_SOURCE macro
> explicitly in its build recipe, it restricts visibility of a non
> POSIX
> features subset, such as IANA protocol numbers (IPPROTO_* macros).
> Non standard features are enabled by default for DPDK both for Linux
> thanks to _GNU_SOURCE and for FreeBSD thanks to __BSD_VISIBLE.
> However
> using XOPEN_SOURCE or POSIX_(C_)SOURCE in a component causes
> __BSD_VISIBLE to be defined to 0 for FreeBSD, causing different
> feature
> sets visibility for Linux and FreeBSD. It restricts from using
> IPPROTO
> macros in public headers, such as rte_ip.h, despite the fact they are
> already widely used in sources.
> 
> Add __BSD_VISIBLE macro specified unconditionally for FreeBSD targets
> which enforces feature sets visibility unification between Linux and
> FreeBSD.
> 
> Add single -D_GNU_SOURCE to config/meson.build as a project argument
> instead of adding separate directive for each project subtree.
> 
> This patch solves the problem of build breaks for [1] on FreeBSD [2]
> following the discussion [3].
> 
> [1] 
> https://mails.dpdk.org/archives/dev/2019-May/131885.html
> 
> [2] 
> http://mails.dpdk.org/archives/test-report/2019-May/082263.html
> 
> [3] 
> https://mails.dpdk.org/archives/dev/2019-May/132110.html
> 
> 
> [18.11]
> The following 18.11 branch commit needs __BSD_VISIBLE to be defined,
> so backporting this commit to 18.11 branch.
> 
> Fixes: 54e4657b2385 ("net: define IPv4 IHL and VHL")
> 
> Signed-off-by: Marcin Smoczynski <
> marcinx.smoczynski at intel.com
> >
> Acked-by: Konstantin Ananyev <
> konstantin.ananyev at intel.com
> >
> ---
>  app/meson.build               | 3 ---
>  config/meson.build            | 8 ++++++++
>  drivers/meson.build           | 3 ---
>  examples/meson.build          | 3 ---
>  lib/meson.build               | 3 ---
>  meson.build                   | 6 +++++-
>  mk/target/generic/rte.vars.mk | 5 +++++
>  7 files changed, 18 insertions(+), 13 deletions(-)

Acked-by: Luca Boccassi <bluca at debian.org>

-- 
Kind regards,
Luca Boccassi


More information about the stable mailing list