sysinfo-glibc.patch 758 B

12345678910111213141516171819202122232425
  1. --- btrfs-progs-v5.13.1/common/utils.c.orig 2021-07-30 11:14:58.000000000 -0300
  2. +++ btrfs-progs-v5.13.1/common/utils.c 2021-08-03 22:21:04.639082657 -0300
  3. @@ -24,7 +24,21 @@
  4. #include <sys/mount.h>
  5. #include <sys/types.h>
  6. #include <sys/stat.h>
  7. +
  8. +#ifndef __GLIBC__
  9. +/*
  10. + * linux/sysinfo.h (which gets indirectly included by other kernel headers)
  11. + * conflicts with sys/sysinfo.h on musl, so make sure it doesn't get expanded.
  12. + * We cannot do this unconditionally as E.G. glibc/uClibc rely on the
  13. + * linux/sysinfo.h definition.
  14. + * Musl provides no detection define, so instead detect that we are
  15. + * NOT on glibc/uClibc.
  16. + */
  17. +#define _LINUX_SYSINFO_H
  18. +#endif
  19. +
  20. #include <sys/sysinfo.h>
  21. +
  22. #include <uuid/uuid.h>
  23. #include <fcntl.h>
  24. #include <unistd.h>