arm-trusted-firmware-tools: fix build on macOS/Darwin
authorFelix Fietkau <nbd@nbd.name>
Mon, 31 Jul 2023 10:41:13 +0000 (12:41 +0200)
committerFelix Fietkau <nbd@nbd.name>
Sat, 12 Aug 2023 14:45:47 +0000 (16:45 +0200)
Resolve conflicts with the uuid type from darwin system headers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/boot/arm-trusted-firmware-tools/patches/002-darwin_compile.patch [new file with mode: 0644]

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 (file)
index 0000000..6bc8192
--- /dev/null
@@ -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"