From patchwork Thu Sep 13 01:05:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 146589 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp17610ljw; Wed, 12 Sep 2018 18:05:44 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZvr0R1h5dXbryeba+KuQh+11yMn1zg+0xSbJtguAo/pOawvsT8rXHnH+/BK7UqvzUSWBMi X-Received: by 2002:a62:990f:: with SMTP id d15-v6mr4974664pfe.162.1536800744376; Wed, 12 Sep 2018 18:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536800744; cv=none; d=google.com; s=arc-20160816; b=pC9wzn1c4v0htgG73qiuRS6aAvuuOuYl3X/g4ishy3KM5sW55mYoVSI1q+kYUUqEyH 5+dMls3JKG24OBzl+ITgsy0zBgUs5gLCQPjlqSE16bR53xwsOsv/cQ+EzmyzreBifp8w V3CiBk/XCTbT00paJxrUmHH+xW9DP3WKC+076ykEFVy5A+eDUN6cKunrCZaWR3DR8lqu v+9b0SV4xJKhG/JjKFzzaQh0cIieTz+HdHaUFO8gg+iAvoF3aySR4jAFu20nwwvsbcFi vWEPiHmF/ClHeAyKYUZcAvplCiWqqZe+JCSyoBBDpLXIDeOfO89DzRtJ82nLoiQmkJjd VCxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :cc:mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=47eS7945VE8pckpINA3L45wOpZOftgE65fxEf4Z7ewY=; b=j1E7RfXgVsLCOIZshetQtpjK1NcfKMrTphtreAAfTkfh60IPkokptTX081zEBKrqJ7 ffq/wBKAevjmPw/K59g2V9dJoQN7NFJge4Yzf8S3OzmD2i+BMLIZaleR880cB/yztY0m HoCaMMenl0BrdZH5pF6n5ReOki1cNDBoTIIhmhh98W9tD0CYtXMYhKci4da6FyE6cdM9 cpmzWck1riZQzPrM7CtmmBDTV4hemBYcShh/wP/wTz7dAGr1RFD0j7Bzp2KxUPauUL7e udFCBsLQzJs2M28HRi1oot1TlFwcGGkLfujeaZXQiScSRTbV89T6CVaIwQXSzraB10Xc eDKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="p/kCf3i9"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id i19-v6si2728052pgj.140.2018.09.12.18.05.44; Wed, 12 Sep 2018 18:05:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b="p/kCf3i9"; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 001D679861; Thu, 13 Sep 2018 01:05:40 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mail.openembedded.org (Postfix) with ESMTP id 426B878F5C for ; Thu, 13 Sep 2018 01:05:40 +0000 (UTC) Received: by mail-pg1-f178.google.com with SMTP id 7-v6so1916912pgf.2 for ; Wed, 12 Sep 2018 18:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=h6rO5VtblqGdVPSCulbsqQKWzTJyoD/P7QVbPrB1gQg=; b=p/kCf3i9WWF9lgTBKyRk3bMYMajqrBWJXoFDPeOkvPEpvtwqzb4D6Pb1xNh+yNtCMT gzsA2QB4+F1LtsVNml/2EKGszMGWVtEhiRYXPv3BD98NsPceIxpbv90ic8TmaS8qgTZt GSA24nSYXaVr63PMaTagEP48tMmUVzx2R3mKrT7pi3MOhIGz+WsWCJfTe9lG3x/eTuWv a2DZc6wQDbPOUlmNgw6BQlR69VMyQ7AF7x5aoBjpGAr/ERae3fNQ74x2Jy/RLLTyi3Xd M0BNsyQm0z3hZftOSuSPkoCQSNlw7i5B5lv1e6UOI2Z6M30+Ex8fzPUVSw04FMT3EWi6 pExg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=h6rO5VtblqGdVPSCulbsqQKWzTJyoD/P7QVbPrB1gQg=; b=sOgJavPSLMyRTP/aQFuEKxSK1qWNOBdEkidCo5b9VMyh6fJPAC9McW0PI5dGW8QQou XQ+5siIxv78MusXi/oooBVNKh6dvanIPHr/GUL+arkQpD4dJGLVKCH7WO5pusOVhMRAk ur+uYYUKFqSXjzsTKztnf8klBbw01ofAz7YkjxZM/kELd+X01Va/ghac9yvaTAfm76Jf Snj/lJjEfSlGq5/eUDHD62tS9oouo636urzNx9m/9/UFoLAKhHhwkJ1RF4xgPwpbuPY+ 5AVmGdqoI+5oeAFW7XlrQncoFRrbXaG4c9IQX6dcS4BPuZIZUaNZupyEPDRz54Zy85YQ B3bA== X-Gm-Message-State: APzg51DuxGKCL9p8FzfPlKMaEygDRTHpzvVDt+z2ljtWftGRkdEWsfp8 78ZJz7Net+ZFKm+2FrR2KpwvYcZD X-Received: by 2002:a62:c008:: with SMTP id x8-v6mr4918983pff.149.1536800740644; Wed, 12 Sep 2018 18:05:40 -0700 (PDT) Received: from localhost.localdomain ([2601:646:877f:9499::2887]) by smtp.gmail.com with ESMTPSA id f13-v6sm2664935pgs.92.2018.09.12.18.05.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 18:05:40 -0700 (PDT) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Wed, 12 Sep 2018 18:05:30 -0700 Message-Id: <20180913010531.41241-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Cc: Bruce Ashfield Subject: [OE-core] [PATCH 1/2] linux-libc-headers: Include linux/stddef.h in linux/swab.h X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This helps compiling bpf tests using non-glibc C libraries e.g. musl Signed-off-by: Khem Raj Cc: Bruce Ashfield --- ...linux-stddef.h-in-swab.h-uapi-header.patch | 44 +++++++++++++++++++ .../linux-libc-headers_4.18.bb | 1 + 2 files changed, 45 insertions(+) create mode 100644 meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch -- 2.19.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core Acked-by: Bruce Ashfield diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch new file mode 100644 index 0000000000..9d17daa70f --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-include-linux-stddef.h-in-swab.h-uapi-header.patch @@ -0,0 +1,44 @@ +From 9708dc74d9f49488d669e070982f6224a888d61a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 12 Sep 2018 17:08:58 -0700 +Subject: [PATCH] include linux/stddef.h in swab.h uapi header + +swab.h uses __always_inline without including the header where it is +defined, this is exposed by musl based distributions where this macro is +not defined by system C library headers unlike glibc where it is defined +in sys/cdefs.h and that header gets pulled in indirectly via + +features.h -> sys/cdefs.h + +and features.h gets pulled in a lot of headers. Therefore it may work in +cases where features.h is includes but not otherwise. + +Adding linux/stddef.h here ensures that __always_inline is always +defined independent of which C library is used in userspace + +Upstream-Status: Submitted [https://lkml.org/lkml/2018/9/13/78] + +Signed-off-by: Khem Raj +Cc: Philippe Ombredanne +Cc: Kate Stewart +Cc: Greg Kroah-Hartman +Cc: Thomas Gleixner +--- + include/uapi/linux/swab.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/uapi/linux/swab.h b/include/uapi/linux/swab.h +index 23cd84868cc3..acddbe50a20d 100644 +--- a/include/uapi/linux/swab.h ++++ b/include/uapi/linux/swab.h +@@ -3,6 +3,7 @@ + #define _UAPI_LINUX_SWAB_H + + #include ++#include + #include + #include + +-- +2.19.0 + diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb index e38872bb91..eb7bee72b0 100644 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.18.bb @@ -6,6 +6,7 @@ SRC_URI_append_libc-musl = "\ file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \ file://0001-libc-compat.h-musl-_does_-define-IFF_LOWER_UP-DORMAN.patch \ file://0001-if_ether-move-muslc-ethhdr-protection-to-uapi-file.patch \ + file://0001-include-linux-stddef.h-in-swab.h-uapi-header.patch \ " SRC_URI[md5sum] = "bee5fe53ee1c3142b8f0c12c0d3348f9"