Fixes the build on Darwin since struct statfs is in sys/mount.h
and sys/vfs.h doesn't even exist. Just conditionally include all the
headers.
[kzak@redhat.com: - removed lib/pidfd-utils.c change]
Signed-off-by: Karel Zak <kzak@redhat.com>
#ifndef UTIL_LINUX_STATFS_MAGIC_H
#define UTIL_LINUX_STATFS_MAGIC_H
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
#ifdef HAVE_SYS_STATFS_H
# include <sys/statfs.h>
#endif
+#ifdef HAVE_SYS_VFS_H
+# include <sys/vfs.h>
+#endif
+
+#ifdef HAVE_SYS_MOUNT_H
+# include <sys/mount.h>
+#endif
+
/*
* If possible then don't depend on internal libc __SWORD_TYPE type.
*/