From patchwork Sat Jan 6 22:30:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 856469 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CIUqeo7E"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zDbpz2r0Dz9s0g for ; Sun, 7 Jan 2018 09:31:04 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:Message-Id: Date:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=BYs4lEHgQuo8kuici026UgAFBLrLnWv+nJpsegbGzoY=; b=CIUqeo7E1K0PJY SYf/0ICq7avpKDxBIMf0rdUir+eAfWA7ybGaYC8+28jGPXpRPQfXow5iSwj5+OljrcK1wO2J67zk/ 3k1uPZN+oDPGZpIVxXsYMNB3V7XTGl5AZxptXxCzpcOTXEnh5HtcHmWBhkXGUOw1c9sm23K/k2jRw DGQkIrEk7HtgDOMrr7XqRUV5KLLbJfwZTHbccqag9ewwbpeK1+uuyi1rz57eoyeUrHzlVjdgsPpYO 3G/x5By7hOeginEaqWApXBzN1XBgWw8pKVo3DDMrzTrrgFFRgeS01eQSB0Vy++Vy04xC8PExLKzCO PSN4SOw9ByNmNbGtcyGw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eXwzL-0007f8-1B; Sat, 06 Jan 2018 22:30:51 +0000 Received: from mx2.mailbox.org ([80.241.60.215]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eXwzF-0007de-W1 for lede-dev@lists.infradead.org; Sat, 06 Jan 2018 22:30:49 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 713AB40F1E; Sat, 6 Jan 2018 23:30:28 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id J3JMZ4ZdfJNY; Sat, 6 Jan 2018 23:30:22 +0100 (CET) From: Hauke Mehrtens To: lede-dev@lists.infradead.org Date: Sat, 6 Jan 2018 23:30:20 +0100 Message-Id: <20180106223020.3778-1-hauke@hauke-m.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180106_143046_202406_53ECD59A X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [80.241.60.215 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Subject: [LEDE-DEV] [PATCH v2] Add additional uapi guards for Linux kernel header files X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org With Linux kernel 4.16 it will be possible to guard more parts of the Linux header files from a libc. Make use of this in musl to guard all the structures and other definitions from the Linux header files which are also defined by the header files provided by musl. This will make musl compile with the unmodified Linux kernel user space headers. This extends the definitions done in commit 04983f227238 ("make netinet/in.h suppress clashing definitions from kernel headers") The needed patches were recently accepted into the netdev tree and will be integrated in Linux 4.16: https://patchwork.ozlabs.org/patch/854342/ https://patchwork.ozlabs.org/patch/855293/ --- include/net/if.h | 7 +++++++ include/netinet/if_ether.h | 1 + include/sys/xattr.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/include/net/if.h b/include/net/if.h index 2f2fcc10..0ee48cd7 100644 --- a/include/net/if.h +++ b/include/net/if.h @@ -125,6 +125,13 @@ struct ifconf { #define ifc_req ifc_ifcu.ifcu_req #define _IOT_ifconf _IOT(_IOTS(struct ifconf),1,0,0,0,0) +#define __UAPI_DEF_IF_IFCONF 0 +#define __UAPI_DEF_IF_IFMAP 0 +#define __UAPI_DEF_IF_IFNAMSIZ 0 +#define __UAPI_DEF_IF_IFREQ 0 +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 0 +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0 + #endif #ifdef __cplusplus diff --git a/include/netinet/if_ether.h b/include/netinet/if_ether.h index d9a131aa..c2c6e944 100644 --- a/include/netinet/if_ether.h +++ b/include/netinet/if_ether.h @@ -133,5 +133,6 @@ do { \ (enaddr)[5] = ((uint8_t *)ipaddr)[3]; \ } while(0) +#define __UAPI_DEF_ETHHDR 0 #endif diff --git a/include/sys/xattr.h b/include/sys/xattr.h index 6479fcc6..52e3dd89 100644 --- a/include/sys/xattr.h +++ b/include/sys/xattr.h @@ -24,6 +24,8 @@ int removexattr(const char *, const char *); int lremovexattr(const char *, const char *); int fremovexattr(int, const char *); +#define __UAPI_DEF_XATTR 0 + #ifdef __cplusplus } #endif