Re: [PATCH] tools/rpcgen: fix build on macos arm64 (stat64 issue)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 12/14/21 11:55, Sergey V. Lobanov wrote:
__DARWIN_ONLY_64_BIT_INO_T is true on macos arm64 so struct stat64
and stat64() are not available. This patch defines stat64 as stat if
__DARWIN_ONLY_64_BIT_INO_T is true

Signed-off-by: Sergey V. Lobanov <sergey@xxxxxxxxxx>
Committed... (tag: nfs-utils-2-5-5-rc5)

steved.
---
  tools/rpcgen/rpc_main.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/tools/rpcgen/rpc_main.c b/tools/rpcgen/rpc_main.c
index e97940b9..277adc6b 100644
--- a/tools/rpcgen/rpc_main.c
+++ b/tools/rpcgen/rpc_main.c
@@ -62,6 +62,12 @@
  #define EXTEND	1		/* alias for TRUE */
  #define DONT_EXTEND	0	/* alias for FALSE */
+#ifdef __APPLE__
+# if __DARWIN_ONLY_64_BIT_INO_T
+#  define stat64 stat
+# endif
+#endif
+
  struct commandline
    {
      int cflag;			/* xdr C routines */





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux