0004-Use-the-generic-fcntl.h-header-Currently-the-fcntl.h.patch 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. From fc003fe211ae03e911c0a4d1f823788bbbce1900 Mon Sep 17 00:00:00 2001
  2. From: Nick Kossifidis <mickflemm@gmail.com>
  3. Date: Mon, 29 Oct 2018 12:36:18 +0200
  4. Subject: [PATCH 4/5] Use the generic fcntl.h header Currently the fcntl.h
  5. header uses different macros from those on upstream Linux. On upstream Linux there is no arch-specific fcntl.h, the generic one is used. As a result various syscalls using these macros fail, an example being BusyBox where any call to opendir() will fail because O_DIRECTORY id is different between the headers used here (probably coming from arm64) and the generic headers used by the kernel. Simple delete the arch-specific fcntl.h and let musl use the generic header as well.
  6. ---
  7. arch/riscv32/bits/fcntl.h | 38 --------------------------------------
  8. arch/riscv64/bits/fcntl.h | 38 --------------------------------------
  9. 2 files changed, 76 deletions(-)
  10. delete mode 100644 arch/riscv32/bits/fcntl.h
  11. delete mode 100644 arch/riscv64/bits/fcntl.h
  12. diff --git a/arch/riscv32/bits/fcntl.h b/arch/riscv32/bits/fcntl.h
  13. deleted file mode 100644
  14. index 92787976..00000000
  15. --- a/arch/riscv32/bits/fcntl.h
  16. +++ /dev/null
  17. @@ -1,38 +0,0 @@
  18. -#define O_CREAT 0100
  19. -#define O_EXCL 0200
  20. -#define O_NOCTTY 0400
  21. -#define O_TRUNC 01000
  22. -#define O_APPEND 02000
  23. -#define O_NONBLOCK 04000
  24. -#define O_DSYNC 010000
  25. -#define O_SYNC 04010000
  26. -#define O_RSYNC 04010000
  27. -#define O_DIRECTORY 040000
  28. -#define O_NOFOLLOW 0100000
  29. -#define O_CLOEXEC 02000000
  30. -
  31. -#define O_ASYNC 020000
  32. -#define O_DIRECT 0200000
  33. -#define O_LARGEFILE 0400000
  34. -#define O_NOATIME 01000000
  35. -#define O_PATH 010000000
  36. -#define O_TMPFILE 020040000
  37. -#define O_NDELAY O_NONBLOCK
  38. -
  39. -#define F_DUPFD 0
  40. -#define F_GETFD 1
  41. -#define F_SETFD 2
  42. -#define F_GETFL 3
  43. -#define F_SETFL 4
  44. -#define F_GETLK 5
  45. -#define F_SETLK 6
  46. -#define F_SETLKW 7
  47. -#define F_SETOWN 8
  48. -#define F_GETOWN 9
  49. -#define F_SETSIG 10
  50. -#define F_GETSIG 11
  51. -
  52. -#define F_SETOWN_EX 15
  53. -#define F_GETOWN_EX 16
  54. -
  55. -#define F_GETOWNER_UIDS 17
  56. diff --git a/arch/riscv64/bits/fcntl.h b/arch/riscv64/bits/fcntl.h
  57. deleted file mode 100644
  58. index 92787976..00000000
  59. --- a/arch/riscv64/bits/fcntl.h
  60. +++ /dev/null
  61. @@ -1,38 +0,0 @@
  62. -#define O_CREAT 0100
  63. -#define O_EXCL 0200
  64. -#define O_NOCTTY 0400
  65. -#define O_TRUNC 01000
  66. -#define O_APPEND 02000
  67. -#define O_NONBLOCK 04000
  68. -#define O_DSYNC 010000
  69. -#define O_SYNC 04010000
  70. -#define O_RSYNC 04010000
  71. -#define O_DIRECTORY 040000
  72. -#define O_NOFOLLOW 0100000
  73. -#define O_CLOEXEC 02000000
  74. -
  75. -#define O_ASYNC 020000
  76. -#define O_DIRECT 0200000
  77. -#define O_LARGEFILE 0400000
  78. -#define O_NOATIME 01000000
  79. -#define O_PATH 010000000
  80. -#define O_TMPFILE 020040000
  81. -#define O_NDELAY O_NONBLOCK
  82. -
  83. -#define F_DUPFD 0
  84. -#define F_GETFD 1
  85. -#define F_SETFD 2
  86. -#define F_GETFL 3
  87. -#define F_SETFL 4
  88. -#define F_GETLK 5
  89. -#define F_SETLK 6
  90. -#define F_SETLKW 7
  91. -#define F_SETOWN 8
  92. -#define F_GETOWN 9
  93. -#define F_SETSIG 10
  94. -#define F_GETSIG 11
  95. -
  96. -#define F_SETOWN_EX 15
  97. -#define F_GETOWN_EX 16
  98. -
  99. -#define F_GETOWNER_UIDS 17
  100. --
  101. 2.20.1