From 69551c99db208e28e64cb0e7630758261742b972 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <barracuda@macos-powerpc.org>
Date: Wed, 14 Aug 2024 18:14:34 +0800
Subject: [PATCH] posix_file.c: add a missing header

---
 .../core/shared/platform/common/posix/posix_file.c            | 4 ++++
 1 file changed, 4 insertions(+)

diff --git lib/wasm-micro-runtime-WAMR-1.3.0/core/shared/platform/common/posix/posix_file.c lib/wasm-micro-runtime-WAMR-1.3.0/core/shared/platform/common/posix/posix_file.c
index 8c4f7aa9d..262aa887d 100644
--- lib/wasm-micro-runtime-WAMR-1.3.0/core/shared/platform/common/posix/posix_file.c
+++ lib/wasm-micro-runtime-WAMR-1.3.0/core/shared/platform/common/posix/posix_file.c
@@ -7,6 +7,10 @@
 #include "libc_errno.h"
 #include <unistd.h>
 
+#ifdef __APPLE__
+#include <sys/stdio.h> /* renameat */
+#endif
+
 #if !defined(__APPLE__) && !defined(ESP_PLATFORM)
 #define CONFIG_HAS_PWRITEV 1
 #define CONFIG_HAS_PREADV 1
-- 
2.46.0

