0003-Use-fcntl-h-for-dev_t-mode_t.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From b1a0aef9978d4a41e7e601c277d4fb1b0cfbed89 Mon Sep 17 00:00:00 2001
  2. From: Dave Jones <davej@codemonkey.org.uk>
  3. Date: Thu, 26 Aug 2021 11:17:34 -0400
  4. Subject: [PATCH] Use fcntl.h for dev_t & mode_t
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Should fix:
  9. In file included from /usr/include/bits/statx.h:31,
  10. from /usr/include/sys/stat.h:446,
  11. from include/files.h:3,
  12. from include/shm.h:6,
  13. from syscalls/x86/modify_ldt.c:12:
  14. /usr/include/linux/stat.h:57:2: error: unknown type name ‘__s64’
  15. __s64 tv_sec;
  16. ^~~~~
  17. /usr/include/linux/stat.h:58:2: error: unknown type name ‘__u32’
  18. __u32 tv_nsec;
  19. ^~~~~
  20. /usr/include/linux/stat.h:59:2: error: unknown type name ‘__s32’
  21. __s32 __reserved;
  22. ^~~~~
  23. /usr/include/linux/stat.h:101:2: error: unknown type name ‘__u32’
  24. __u32 stx_mask; /* What results were written [uncond] */
  25. [Retrieved from:
  26. https://github.com/kernelslacker/trinity/commit/b1a0aef9978d4a41e7e601c277d4fb1b0cfbed89]
  27. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  28. ---
  29. include/files.h | 2 +-
  30. 1 file changed, 1 insertion(+), 1 deletion(-)
  31. diff --git a/include/files.h b/include/files.h
  32. index 2a8e0e2d..ba3cc98f 100644
  33. --- a/include/files.h
  34. +++ b/include/files.h
  35. @@ -1,6 +1,6 @@
  36. #pragma once
  37. -#include <sys/stat.h>
  38. +#include <fcntl.h>
  39. #include "fd.h"
  40. unsigned long get_o_flags(void);