Show a patch.

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

{
    "id": 43967,
    "url": "http://patches.dpdk.org/api/patches/43967/",
    "web_url": "http://patches.dpdk.org/patch/43967/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<75211b619a8677996601f53fc28d5c637fdac5e9.1535543250.git.anatoly.burakov@intel.com>",
    "date": "2018-08-29T11:56:15",
    "name": "[1/7] linuxapp: build with _GNU_SOURCE defined by default",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "8130944d55496aa242f9580b15f7d759755ccc80",
    "submitter": {
        "id": 4,
        "url": "http://patches.dpdk.org/api/people/4/",
        "name": "Burakov, Anatoly",
        "email": "anatoly.burakov@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/patch/43967/mbox/",
    "series": [
        {
            "id": 1091,
            "url": "http://patches.dpdk.org/api/series/1091/",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1091",
            "date": "2018-08-29T11:56:14",
            "name": "Improve core EAL musl compatibility",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/1091/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43967/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43967/checks/",
    "tags": {},
    "headers": {
        "X-Mailman-Version": "2.1.15",
        "X-ExtLoop1": "1",
        "Errors-To": "dev-bounces@dpdk.org",
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Mailer": "git-send-email 1.7.0.7",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3E2834C9C;\n\tWed, 29 Aug 2018 13:56:29 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id B028F5A\n\tfor <dev@dpdk.org>; Wed, 29 Aug 2018 13:56:26 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 Aug 2018 04:56:25 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga002.jf.intel.com with ESMTP; 29 Aug 2018 04:56:24 -0700",
            "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tw7TBuNf8028619; Wed, 29 Aug 2018 12:56:24 +0100",
            "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id w7TBuMdT010309;\n\tWed, 29 Aug 2018 12:56:22 +0100",
            "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id w7TBuMow010305;\n\tWed, 29 Aug 2018 12:56:22 +0100"
        ],
        "References": [
            "<cover.1535543250.git.anatoly.burakov@intel.com>",
            "<cover.1535543250.git.anatoly.burakov@intel.com>"
        ],
        "X-Amp-File-Uploaded": "False",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<75211b619a8677996601f53fc28d5c637fdac5e9.1535543250.git.anatoly.burakov@intel.com>",
        "X-IronPort-AV": "E=Sophos;i=\"5.53,303,1531810800\"; d=\"scan'208\";a=\"87292407\"",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Precedence": "list",
        "From": "Anatoly Burakov <anatoly.burakov@intel.com>",
        "X-Original-To": "patchwork@dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "In-Reply-To": [
            "<cover.1535543250.git.anatoly.burakov@intel.com>",
            "<cover.1535543250.git.anatoly.burakov@intel.com>"
        ],
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "To": "dev@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "Date": "Wed, 29 Aug 2018 12:56:15 +0100",
        "Cc": "Jasvinder Singh <jasvinder.singh@intel.com>,\n\tCristian Dumitrescu <cristian.dumitrescu@intel.com>,\n\tThomas Monjalon <thomas@monjalon.net>, dpdk@stormmq.com",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH 1/7] linuxapp: build with _GNU_SOURCE defined by\n\tdefault"
    },
    "content": "We use _GNU_SOURCE all over the place, but often times we miss\ndefining it, resulting in broken builds on musl. Rather than\nfixing every library's and driver's and application's makefile,\nfix it by simply defining _GNU_SOURCE by default for all\nLinuxapp builds.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\n---\n app/meson.build                      |  9 ++++++++-\n drivers/bus/pci/linux/Makefile       |  2 --\n drivers/meson.build                  |  6 ++++++\n drivers/net/softnic/conn.c           |  1 -\n examples/meson.build                 |  6 ++++++\n lib/librte_eal/linuxapp/eal/Makefile | 16 ----------------\n lib/meson.build                      |  6 ++++++\n mk/exec-env/linuxapp/rte.vars.mk     |  2 ++\n test/test/meson.build                |  5 +++++\n 9 files changed, 33 insertions(+), 20 deletions(-)",
    "diff": "diff --git a/app/meson.build b/app/meson.build\nindex 99e0b93ec..c9a52a22b 100644\n--- a/app/meson.build\n+++ b/app/meson.build\n@@ -11,13 +11,20 @@ apps = ['pdump',\n # for BSD only\n lib_execinfo = cc.find_library('execinfo', required: false)\n \n+default_cflags = machine_args\n+\n+# on Linux, specify -D_GNU_SOURCE unconditionally\n+if host_machine.system() == 'linux'\n+\tdefault_cflags += '-D_GNU_SOURCE'\n+endif\n+\n foreach app:apps\n \tbuild = true\n \tname = app\n \tallow_experimental_apis = false\n \tsources = []\n \tincludes = []\n-\tcflags = machine_args\n+\tcflags = default_cflags\n \tobjs = [] # other object files to link against, used e.g. for\n \t          # instruction-set optimized versions of code\n \ndiff --git a/drivers/bus/pci/linux/Makefile b/drivers/bus/pci/linux/Makefile\nindex 96ea1d540..90404468b 100644\n--- a/drivers/bus/pci/linux/Makefile\n+++ b/drivers/bus/pci/linux/Makefile\n@@ -4,5 +4,3 @@\n SRCS += pci.c\n SRCS += pci_uio.c\n SRCS += pci_vfio.c\n-\n-CFLAGS += -D_GNU_SOURCE\ndiff --git a/drivers/meson.build b/drivers/meson.build\nindex f94e2fe67..7ff97ef4e 100644\n--- a/drivers/meson.build\n+++ b/drivers/meson.build\n@@ -15,6 +15,12 @@ default_cflags = machine_args\n if cc.has_argument('-Wno-format-truncation')\n \tdefault_cflags += '-Wno-format-truncation'\n endif\n+\n+# on Linux, specify -D_GNU_SOURCE unconditionally\n+if host_machine.system() == 'linux'\n+\tdefault_cflags += '-D_GNU_SOURCE'\n+endif\n+\n foreach class:driver_classes\n \tdrivers = []\n \tstd_deps = []\ndiff --git a/drivers/net/softnic/conn.c b/drivers/net/softnic/conn.c\nindex 990cf40fc..8b6658088 100644\n--- a/drivers/net/softnic/conn.c\n+++ b/drivers/net/softnic/conn.c\n@@ -8,7 +8,6 @@\n #include <unistd.h>\n #include <sys/types.h>\n \n-#define __USE_GNU\n #include <sys/socket.h>\n \n #include <sys/epoll.h>\ndiff --git a/examples/meson.build b/examples/meson.build\nindex 4ee7a1114..70c22eb62 100644\n--- a/examples/meson.build\n+++ b/examples/meson.build\n@@ -22,6 +22,12 @@ default_cflags = machine_args\n if cc.has_argument('-Wno-format-truncation')\n \tdefault_cflags += '-Wno-format-truncation'\n endif\n+\n+# on Linux, specify -D_GNU_SOURCE unconditionally\n+if host_machine.system() == 'linux'\n+\tdefault_cflags += '-D_GNU_SOURCE'\n+endif\n+\n foreach example: examples\n \tname = example\n \tbuild = true\ndiff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile\nindex fd92c75c2..bfee453bc 100644\n--- a/lib/librte_eal/linuxapp/eal/Makefile\n+++ b/lib/librte_eal/linuxapp/eal/Makefile\n@@ -85,22 +85,6 @@ SRCS-y += rte_cycles.c\n \n CFLAGS_eal_common_cpuflags.o := $(CPUFLAGS_LIST)\n \n-CFLAGS_eal.o := -D_GNU_SOURCE\n-CFLAGS_eal_interrupts.o := -D_GNU_SOURCE\n-CFLAGS_eal_vfio_mp_sync.o := -D_GNU_SOURCE\n-CFLAGS_eal_timer.o := -D_GNU_SOURCE\n-CFLAGS_eal_lcore.o := -D_GNU_SOURCE\n-CFLAGS_eal_memalloc.o := -D_GNU_SOURCE\n-CFLAGS_eal_thread.o := -D_GNU_SOURCE\n-CFLAGS_eal_log.o := -D_GNU_SOURCE\n-CFLAGS_eal_common_log.o := -D_GNU_SOURCE\n-CFLAGS_eal_hugepage_info.o := -D_GNU_SOURCE\n-CFLAGS_eal_common_whitelist.o := -D_GNU_SOURCE\n-CFLAGS_eal_common_options.o := -D_GNU_SOURCE\n-CFLAGS_eal_common_thread.o := -D_GNU_SOURCE\n-CFLAGS_eal_common_lcore.o := -D_GNU_SOURCE\n-CFLAGS_rte_cycles.o := -D_GNU_SOURCE\n-\n # workaround for a gcc bug with noreturn attribute\n # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603\n ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)\ndiff --git a/lib/meson.build b/lib/meson.build\nindex eb91f100b..4c1577571 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -30,6 +30,12 @@ default_cflags = machine_args\n if cc.has_argument('-Wno-format-truncation')\n \tdefault_cflags += '-Wno-format-truncation'\n endif\n+\n+# on Linux, specify -D_GNU_SOURCE unconditionally\n+if host_machine.system() == 'linux'\n+\tdefault_cflags += '-D_GNU_SOURCE'\n+endif\n+\n foreach l:libraries\n \tbuild = true\n \tname = l\ndiff --git a/mk/exec-env/linuxapp/rte.vars.mk b/mk/exec-env/linuxapp/rte.vars.mk\nindex 3129edc8c..91b778fcc 100644\n--- a/mk/exec-env/linuxapp/rte.vars.mk\n+++ b/mk/exec-env/linuxapp/rte.vars.mk\n@@ -17,6 +17,8 @@ else\n EXECENV_CFLAGS  = -pthread\n endif\n \n+EXECENV_CFLAGS += -D_GNU_SOURCE\n+\n EXECENV_LDLIBS  =\n EXECENV_ASFLAGS =\n \ndiff --git a/test/test/meson.build b/test/test/meson.build\nindex b1dd6eca2..c81fca439 100644\n--- a/test/test/meson.build\n+++ b/test/test/meson.build\n@@ -242,6 +242,11 @@ if cc.has_argument('-Wno-format-truncation')\n     cflags += '-Wno-format-truncation'\n endif\n \n+# on Linux, specify -D_GNU_SOURCE unconditionally\n+if host_machine.system() == 'linux'\n+\tdefault_cflags += '-D_GNU_SOURCE'\n+endif\n+\n test_dep_objs = []\n compress_test_dep = dependency('zlib', required: false)\n if compress_test_dep.found()\n",
    "prefixes": [
        "1/7"
    ]
}