From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10717 Path: news.gmane.org!.POSTED!not-for-mail From: Felix Janda Newsgroups: gmane.linux.lib.musl.general Subject: kernel header compatibility Date: Tue, 8 Nov 2016 20:11:45 -0500 Message-ID: <20161109011145.GA31880@nyan> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1478654265 12231 195.159.176.226 (9 Nov 2016 01:17:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 9 Nov 2016 01:17:45 +0000 (UTC) User-Agent: Mutt/1.6.1 (2016-04-27) To: musl@lists.openwall.com Original-X-From: musl-return-10730-gllmg-musl=m.gmane.org@lists.openwall.com Wed Nov 09 02:17:42 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1c4HVy-0000Jp-9Z for gllmg-musl@m.gmane.org; Wed, 09 Nov 2016 02:17:22 +0100 Original-Received: (qmail 23581 invoked by uid 550); 9 Nov 2016 01:17:22 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 22516 invoked from network); 9 Nov 2016 01:17:20 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline Xref: news.gmane.org gmane.linux.lib.musl.general:10717 Archived-At: The recent commit 04983f2272382af92eb8f8838964ff944fbb8258 (make netinet/in.h suppress clashing definitions from kernel headers) intends to address some of the conflicts between the kernel and musl libc headers. Namely it tries to allow the inclusion of kernel headers after libc header by defining __UAP_DEF_* macros. However this doesn't work because the relevant linux headers include , which unconditionally redefines the constants. For example #include #include leads to #define __UAPI_DEF_IN_ADDR 0 // from #define __UAPI_DEF_IN_ADDR 1 // from So we still get two conflicting definitions of struct in6_addr. By adding the hack "#define _LIBC_COMPAT_H" to , this particular example compiles. Maybe the kernel people can be convinced to add #ifdef guards around all of the (non glibc) __UAPI_* definitions in . Felix