[openwrt/openwrt] arm-trusted-firmware-tools: fix build on macOS/Darwin

LEDE Commits lede-commits at lists.infradead.org
Mon Aug 14 03:29:13 PDT 2023


dangole pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/f241408f1843915500fd14e4bfaa7c08a5ff1039

commit f241408f1843915500fd14e4bfaa7c08a5ff1039
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Jul 31 12:41:13 2023 +0200

    arm-trusted-firmware-tools: fix build on macOS/Darwin
    
    Resolve conflicts with the uuid type from darwin system headers
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 16c37ba9136ff431c7e3c97cc27e4ea166b8020a)
---
 .../patches/002-darwin_compile.patch                | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/package/boot/arm-trusted-firmware-tools/patches/002-darwin_compile.patch b/package/boot/arm-trusted-firmware-tools/patches/002-darwin_compile.patch
new file mode 100644
index 0000000000..6bc8192f44
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-tools/patches/002-darwin_compile.patch
@@ -0,0 +1,21 @@
+--- a/tools/fiptool/fiptool.c
++++ b/tools/fiptool/fiptool.c
+@@ -3,7 +3,7 @@
+  *
+  * SPDX-License-Identifier: BSD-3-Clause
+  */
+-
++#define _DARWIN_C_SOURCE
+ #ifndef _MSC_VER
+ #include <sys/mount.h>
+ #endif
+@@ -18,6 +18,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <unistd.h>
++
++#define uuid_t fiptool_uuid_t
+ 
+ #include "fiptool.h"
+ #include "tbbr_config.h"




More information about the lede-commits mailing list