50 lines
1.7 KiB
Diff
50 lines
1.7 KiB
Diff
|
From 8c223daf10319f15570a74ed83a1d655fdbd4a7b Mon Sep 17 00:00:00 2001
|
|||
|
Message-Id: <8c223daf10319f15570a74ed83a1d655fdbd4a7b.1592540443.git.baruch@tkos.co.il>
|
|||
|
From: Baruch Siach <baruch@tkos.co.il>
|
|||
|
Date: Fri, 19 Jun 2020 07:10:24 +0300
|
|||
|
Subject: [PATCH] stress-ng.h: suppress kernel sysinfo.h
|
|||
|
|
|||
|
The kernel sysinfo.h (indirectly included from genetlink.h) defines
|
|||
|
struct sysinfo. This collides with musl libc definition of the same
|
|||
|
struct.
|
|||
|
|
|||
|
Fixes this build issue:
|
|||
|
|
|||
|
In file included from .../arm-buildroot-linux-musleabihf/sysroot/usr/include/linux/kernel.h:5,
|
|||
|
from .../arm-buildroot-linux-musleabihf/sysroot/usr/include/linux/netlink.h:5,
|
|||
|
from .../arm-buildroot-linux-musleabihf/sysroot/usr/include/linux/genetlink.h:6,
|
|||
|
from stress-ng.h:464,
|
|||
|
from stress-access.c:25:
|
|||
|
.../arm-buildroot-linux-musleabihf/sysroot/usr/include/linux/sysinfo.h:8:8: error: redefinition of ‘struct sysinfo’
|
|||
|
struct sysinfo {
|
|||
|
^~~~~~~
|
|||
|
In file included from stress-ng.h:389,
|
|||
|
from stress-access.c:25:
|
|||
|
.../arm-buildroot-linux-musleabihf/sysroot/usr/include/sys/sysinfo.h:10:8: note: originally defined here
|
|||
|
struct sysinfo {
|
|||
|
^~~~~~~
|
|||
|
|
|||
|
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
|||
|
---
|
|||
|
Upstream status: https://github.com/ColinIanKing/stress-ng/pull/69
|
|||
|
|
|||
|
stress-ng.h | 2 ++
|
|||
|
1 file changed, 2 insertions(+)
|
|||
|
|
|||
|
diff --git a/stress-ng.h b/stress-ng.h
|
|||
|
index 1a662938c1d9..e8aa0efe7527 100644
|
|||
|
--- a/stress-ng.h
|
|||
|
+++ b/stress-ng.h
|
|||
|
@@ -387,6 +387,8 @@
|
|||
|
|
|||
|
#if defined(HAVE_SYS_SYSINFO_H)
|
|||
|
#include <sys/sysinfo.h>
|
|||
|
+/* Suppress kernel sysinfo to avoid collision with musl */
|
|||
|
+#define _LINUX_SYSINFO_H
|
|||
|
#endif
|
|||
|
|
|||
|
#if defined(HAVE_SYS_SYSMACROS_H)
|
|||
|
--
|
|||
|
2.27.0
|
|||
|
|