get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/53406/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 53406,
    "url": "http://patches.dpdk.org/api/patches/53406/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190514140416.4192-2-marcinx.smoczynski@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20190514140416.4192-2-marcinx.smoczynski@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190514140416.4192-2-marcinx.smoczynski@intel.com",
    "date": "2019-05-14T14:04:16",
    "name": "[v2,1/1] build: enable BSD features visibility for FreeBSD",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e995dc297b61d74d87bc7670df58daee9011f12e",
    "submitter": {
        "id": 1293,
        "url": "http://patches.dpdk.org/api/people/1293/?format=api",
        "name": "Marcin Smoczynski",
        "email": "marcinx.smoczynski@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190514140416.4192-2-marcinx.smoczynski@intel.com/mbox/",
    "series": [
        {
            "id": 4655,
            "url": "http://patches.dpdk.org/api/series/4655/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4655",
            "date": "2019-05-14T14:04:15",
            "name": "Enable BSD features visibility for FreeBSD",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/4655/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/53406/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/53406/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 819F77CEB;\n\tTue, 14 May 2019 16:06:05 +0200 (CEST)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby dpdk.org (Postfix) with ESMTP id B8D832F7D\n\tfor <dev@dpdk.org>; Tue, 14 May 2019 16:06:02 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t14 May 2019 07:06:02 -0700",
            "from msmoczyx-mobl.ger.corp.intel.com ([10.104.12.183])\n\tby fmsmga001.fm.intel.com with ESMTP; 14 May 2019 07:06:00 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Marcin Smoczynski <marcinx.smoczynski@intel.com>",
        "To": "bruce.richardson@intel.com,\n\tthomas@monjalon.net",
        "Cc": "dev@dpdk.org, konstantin.ananyev@intel.com, adrien.mazarguil@6wind.com, \n\tMarcin Smoczynski <marcinx.smoczynski@intel.com>",
        "Date": "Tue, 14 May 2019 16:04:16 +0200",
        "Message-Id": "<20190514140416.4192-2-marcinx.smoczynski@intel.com>",
        "X-Mailer": "git-send-email 2.21.0.windows.1",
        "In-Reply-To": "<20190514140416.4192-1-marcinx.smoczynski@intel.com>",
        "References": "<20190514140416.4192-1-marcinx.smoczynski@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 1/1] build: enable BSD features visibility for\n\tFreeBSD",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "When a component uses either XOPEN_SOURCE or POSIX_C_SOURCE macro\nexplicitly in its build recipe, it restricts visibility of a non POSIX\nfeatures subset, such as IANA protocol numbers (IPPROTO_* macros).\nNon standard features are enabled by default for DPDK both for Linux\nthanks to _GNU_SOURCE and for FreeBSD thanks to __BSD_VISIBLE. However\nusing XOPEN_SOURCE or POSIX_(C_)SOURCE in a component causes\n__BSD_VISIBLE to be defined to 0 for FreeBSD, causing different feature\nsets visibility for Linux and FreeBSD. It restricts from using IPPROTO\nmacros in public headers, such as rte_ip.h, despite the fact they are\nalready widely used in sources.\n\nAdd __BSD_VISIBLE macro specified unconditionally for FreeBSD targets\nwhich enforces feature sets visibility unification between Linux and\nFreeBSD.\n\nAdd single -D_GNU_SOURCE to config/meson.build as a project argument\ninstead of adding separate directive for each project subtree.\n\nThis patch solves the problem of build breaks for [1] on FreeBSD [2]\nfollowing the discussion [3].\n\n[1] https://mails.dpdk.org/archives/dev/2019-May/131885.html\n[2] http://mails.dpdk.org/archives/test-report/2019-May/082263.html\n[3] https://mails.dpdk.org/archives/dev/2019-May/132110.html\n\nSigned-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>\n---\n app/meson.build               | 3 ---\n config/meson.build            | 8 ++++++++\n drivers/meson.build           | 3 ---\n examples/meson.build          | 3 ---\n lib/meson.build               | 3 ---\n meson.build                   | 6 +++++-\n mk/target/generic/rte.vars.mk | 5 +++++\n 7 files changed, 18 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/app/meson.build b/app/meson.build\nindex 2b9fdef74..b0e6afbbe 100644\n--- a/app/meson.build\n+++ b/app/meson.build\n@@ -22,9 +22,6 @@ lib_execinfo = cc.find_library('execinfo', required: false)\n \n default_cflags = machine_args\n \n-# specify -D_GNU_SOURCE unconditionally\n-default_cflags += '-D_GNU_SOURCE'\n-\n foreach app:apps\n \tbuild = true\n \tname = app\ndiff --git a/config/meson.build b/config/meson.build\nindex 0d25646f5..b77c87811 100644\n--- a/config/meson.build\n+++ b/config/meson.build\n@@ -187,3 +187,11 @@ install_headers('rte_config.h', subdir: get_option('include_subdir_arch'))\n \n # enable VFIO only if it is linux OS\n dpdk_conf.set('RTE_EAL_VFIO', is_linux)\n+\n+# specify -D_GNU_SOURCE unconditionally\n+add_project_arguments('-D_GNU_SOURCE', language: 'c')\n+\n+# specify -D__BSD_VISIBLE for FreeBSD\n+if is_freebsd\n+\tadd_project_arguments('-D__BSD_VISIBLE', language: 'c')\n+endif\ndiff --git a/drivers/meson.build b/drivers/meson.build\nindex 4c444f495..dc47b45ec 100644\n--- a/drivers/meson.build\n+++ b/drivers/meson.build\n@@ -21,9 +21,6 @@ if cc.has_argument('-Wno-format-truncation')\n \tdefault_cflags += '-Wno-format-truncation'\n endif\n \n-# specify -D_GNU_SOURCE unconditionally\n-default_cflags += '-D_GNU_SOURCE'\n-\n foreach class:dpdk_driver_classes\n \tdrivers = []\n \tstd_deps = []\ndiff --git a/examples/meson.build b/examples/meson.build\nindex 1a6134f12..6e18ca8ec 100644\n--- a/examples/meson.build\n+++ b/examples/meson.build\n@@ -31,9 +31,6 @@ if cc.has_argument('-Wno-format-truncation')\n \tdefault_cflags += '-Wno-format-truncation'\n endif\n \n-# specify -D_GNU_SOURCE unconditionally\n-default_cflags += '-D_GNU_SOURCE'\n-\n foreach example: examples\n \tname = example\n \tbuild = true\ndiff --git a/lib/meson.build b/lib/meson.build\nindex e067ce5ea..dd7c94c03 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -41,9 +41,6 @@ endif\n \n enabled_libs = [] # used to print summary at the end\n \n-# -D_GNU_SOURCE unconditionally\n-default_cflags += '-D_GNU_SOURCE'\n-\n foreach l:libraries\n \tbuild = true\n \tname = l\ndiff --git a/meson.build b/meson.build\nindex 46f9c5683..05c816a9e 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -64,6 +64,10 @@ configure_file(output: build_cfg,\n dpdk_drivers = ['-Wl,--whole-archive'] + dpdk_drivers + ['-Wl,--no-whole-archive']\n \n pkg = import('pkgconfig')\n+pkg_extra_cflags = ['-include', 'rte_config.h'] + machine_args\n+if is_freebsd\n+\tpkg_extra_cflags += ['-D__BSD_VISIBLE']\n+endif\n pkg.generate(name: meson.project_name(),\n \tfilebase: 'lib' + meson.project_name().to_lower(),\n \tversion: meson.project_version(),\n@@ -76,7 +80,7 @@ pkg.generate(name: meson.project_name(),\n Note that CFLAGS might contain an -march flag higher than typical baseline.\n This is required for a number of static inline functions in the public headers.''',\n \tsubdirs: [get_option('include_subdir_arch'), '.'],\n-\textra_cflags: ['-include', 'rte_config.h'] + machine_args\n+\textra_cflags: pkg_extra_cflags\n )\n \n # final output, list all the libs and drivers to be built\ndiff --git a/mk/target/generic/rte.vars.mk b/mk/target/generic/rte.vars.mk\nindex 25a578ad7..5f00a0bfa 100644\n--- a/mk/target/generic/rte.vars.mk\n+++ b/mk/target/generic/rte.vars.mk\n@@ -111,6 +111,11 @@ endif\n # always define _GNU_SOURCE\n CFLAGS += -D_GNU_SOURCE\n \n+# define __BSD_VISIBLE when building for FreeBSD\n+ifeq ($(CONFIG_RTE_EXEC_ENV_FREEBSD),y)\n+CFLAGS += -D__BSD_VISIBLE\n+endif\n+\n export CFLAGS\n export LDFLAGS\n \n",
    "prefixes": [
        "v2",
        "1/1"
    ]
}