0016-extras-ext4_utils-make_ext4fs.c-define-__SANE_USERSP.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. From 5db9529436f13b8c073a0310da3a1107f84645da Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  3. Date: Wed, 4 Dec 2024 20:51:22 +0100
  4. Subject: [PATCH] extras/ext4_utils/make_ext4fs.c: define
  5. __SANE_USERSPACE_TYPES__
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. The Debian patch ppc64el-ftbfs.patch is already defining
  10. __SANE_USERSPACE_TYPES__ in a few files to solve a conflict between
  11. kernel header definitions and local definition of some types, on
  12. powerpc64 and mips64.
  13. However, the Debian patch lacks an update to ext4_utils.c, and has the
  14. definition too late in make_ext4fs.c. This commit therefore fixes
  15. those two remaining issues, fixing:
  16. error: conflicting types for ‘u64’; have ‘long unsigned int’
  17. Upstream: N/A, we're too far from upstream
  18. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  19. ---
  20. extras/ext4_utils/ext4_utils.c | 5 ++++-
  21. extras/ext4_utils/make_ext4fs.c | 4 ++++
  22. 2 files changed, 8 insertions(+), 1 deletion(-)
  23. diff --git a/extras/ext4_utils/ext4_utils.c b/extras/ext4_utils/ext4_utils.c
  24. index e95f5cc..9f6836f 100644
  25. --- a/extras/ext4_utils/ext4_utils.c
  26. +++ b/extras/ext4_utils/ext4_utils.c
  27. @@ -14,6 +14,10 @@
  28. * limitations under the License.
  29. */
  30. +#if defined(__linux__)
  31. +#define __SANE_USERSPACE_TYPES__
  32. +#endif
  33. +
  34. #include "ext4_utils.h"
  35. #include "uuid.h"
  36. #include "allocate.h"
  37. @@ -36,7 +40,6 @@
  38. #endif
  39. #if defined(__linux__)
  40. -#define __SANE_USERSPACE_TYPES__
  41. #include <linux/fs.h>
  42. #elif defined(__APPLE__) && defined(__MACH__)
  43. #include <sys/disk.h>
  44. diff --git a/extras/ext4_utils/make_ext4fs.c b/extras/ext4_utils/make_ext4fs.c
  45. index 3124aed..332a213 100644
  46. --- a/extras/ext4_utils/make_ext4fs.c
  47. +++ b/extras/ext4_utils/make_ext4fs.c
  48. @@ -14,6 +14,10 @@
  49. * limitations under the License.
  50. */
  51. +#if defined(__linux__)
  52. +#define __SANE_USERSPACE_TYPES__
  53. +#endif
  54. +
  55. #include "make_ext4fs.h"
  56. #include "ext4_utils.h"
  57. #include "allocate.h"
  58. --
  59. 2.47.0