Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build with musl libc #979

Merged
merged 1 commit into from Feb 16, 2017
Merged

Conversation

baruchsiach
Copy link
Contributor

Suppress inclusion of linux/sysinfo.h to fix redefinition of struct sysinfo
that musl libc defines in sys/sysinfo.h, which least to the following build
failure (paths abbreviated):

In file included from .../usr/include/linux/kernel.h:4:0,
from .../usr/include/linux/ethtool.h:16,
from psutil/_psutil_linux.c:35:
.../usr/include/linux/sysinfo.h:7:8: error: redefinition of ‘struct sysinfo’
struct sysinfo {
^
In file included from psutil/_psutil_linux.c:21:0:
.../usr/include/sys/sysinfo.h:10:8: note: originally defined here
struct sysinfo {
^

Fixes #872

Suppress inclusion of linux/sysinfo.h to fix redefinition of struct sysinfo
that musl libc defines in sys/sysinfo.h, which least to the following build
failure (paths abbreviated):

In file included from .../usr/include/linux/kernel.h:4:0,
                 from .../usr/include/linux/ethtool.h:16,
                 from psutil/_psutil_linux.c:35:
.../usr/include/linux/sysinfo.h:7:8: error: redefinition of ‘struct sysinfo’
 struct sysinfo {
        ^
In file included from psutil/_psutil_linux.c:21:0:
.../usr/include/sys/sysinfo.h:10:8: note: originally defined here
 struct sysinfo {
        ^

Fixes giampaolo#872
@giampaolo
Copy link
Owner

Thanks!

@giampaolo giampaolo merged commit 72f6afc into giampaolo:master Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

psutil fails to compile against MUSL C library
2 participants