linux-headers: export architecture-specific userspace ABI headers from source
@@ -0,0 +1,29 @@
1+From 8e69b663d6ddef132041a1186f081fdd74d4a31d Mon Sep 17 00:00:00 2001
2+From: rofl0r <retnyg@gmx.net>
3+Date: Mon, 20 Jan 2014 21:31:34 +0100
4+Subject: [PATCH 3/3] remove inclusion of sysinfo.h in kernel.h
5+
6+the declaration of struct sysinfo clashes with userspace.
7+it's not quite clear why that header was included from kernel.h,
8+as none of its functionality is needed.
9+---
10+Signed-off-by: Khem Raj <raj.khem@gmail.com>
11+Upstream-Status: Submitted
12+
13+ include/uapi/linux/kernel.h | 2 ++
14+ 1 file changed, 2 insertions(+)
15+
16+diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
17+index fadf2db71fe8..813800ed141f 100644
18+--- a/include/uapi/linux/kernel.h
19++++ b/include/uapi/linux/kernel.h
20+@@ -2,7 +2,9 @@
21+ #ifndef _UAPI_LINUX_KERNEL_H
22+ #define _UAPI_LINUX_KERNEL_H
23+
24++#ifdef __GLIBC__
25+ #include <linux/sysinfo.h>
26++#endif
27+ #include <linux/const.h>
28+
29+ #endif /* _UAPI_LINUX_KERNEL_H */
@@ -0,0 +1,32 @@
1+defpkgbuild(linux-headers,
2+ #:pkgname, "linux-headers",
3+ #:pkgver, "6.6",
4+ #:pkgrel, 1,
5+ #:pkgdesc, "Linux userspace ABI headers for compiling Vinix programs",
6+ #:arch, [#:x86-64, #:aarch64],
7+ #:license, "GPL-2.0-only WITH Linux-syscall-note",
8+ #:url, "https://kernel.org/",
9+ #:source, ["https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.6.tar.xz",
10+ "revert-broken-uapi.patch", "0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch"],
11+ #:sha256sums, ["d926a06c63dd8ac7df3f86ee1ffc2ce2a3b81a2d168484e76b5b389aba8e56d0",
12+ "b7a4fa8cb01645f1e96cd165d89e637de90594e39a5848003c386d6424b1def2",
13+ "e9827c3f919866bb63b05b9eeacfc8e04f560f467c9456e7b283f432b5dc9a7e"],
14+ #:prepare, fn() {
15+ for-each(fn(patch) {
16+ run("patch", "--batch", "--fuzz=0", "-d", "linux-6.6", "-p1", "-i", string-append("../", patch))
17+ }, list("revert-broken-uapi.patch", "0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch"))
18+ },
19+ #:build, fn() {
20+ run("make", "-C", "linux-6.6", "headers")
21+ },
22+ #:package, fn() {
23+ run("make", "-C", "linux-6.6", "headers_install", string-append("INSTALL_HDR_PATH=", pkgdir(), "/usr"))
24+ ; libdrm supplies its own DRM interface headers in the graphics sysroot.
25+ run("rm", "-rf", string-append(pkgdir(), "/usr/include/drm"))
26+ run("test", "-s", string-append(pkgdir(), "/usr/include/asm/unistd.h"))
27+ run("test", "-s", string-append(pkgdir(), "/usr/include/linux/vt.h"))
28+ run("install", "-Dm644", "linux-6.6/LICENSES/exceptions/Linux-syscall-note",
29+ string-append(pkgdir(), "/usr/share/licenses/linux-headers/Linux-syscall-note"))
30+ run("install", "-Dm644", "linux-6.6/LICENSES/preferred/GPL-2.0",
31+ string-append(pkgdir(), "/usr/share/licenses/linux-headers/GPL-2.0"))
32+ })
@@ -0,0 +1,18 @@
1+Revert 1fe8e0f074c77aa41aaa579345a9e675acbebfa9
2+diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
3+index 1046f55..777b6cd 100644
4+--- a/include/uapi/linux/if_tunnel.h
5++++ b/include/uapi/linux/if_tunnel.h
6+@@ -2,9 +2,6 @@
7+ #define _UAPI_IF_TUNNEL_H_
8+
9+ #include <linux/types.h>
10+-#include <linux/if.h>
11+-#include <linux/ip.h>
12+-#include <linux/in6.h>
13+ #include <asm/byteorder.h>
14+
15+
16+--
17+cgit v1.1
18+