stress-ng.h: suppress kernel sysinfo.h #69
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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