aboutsummaryrefslogtreecommitdiffstats
path: root/executor
diff options
context:
space:
mode:
Diffstat (limited to 'executor')
-rw-r--r--executor/common_fuchsia.h4
-rw-r--r--executor/common_linux.h4
2 files changed, 8 insertions, 0 deletions
diff --git a/executor/common_fuchsia.h b/executor/common_fuchsia.h
index 19bdd280c..cb29f715e 100644
--- a/executor/common_fuchsia.h
+++ b/executor/common_fuchsia.h
@@ -272,3 +272,7 @@ static int do_sandbox_none(void)
return 0;
}
#endif
+
+// Ugly way to work around gcc's "error: function called through a non-compatible type".
+// The macro is used in generated C code.
+#define CAST(f) ({void* p = (void*)f; p; })
diff --git a/executor/common_linux.h b/executor/common_linux.h
index 0cc94555f..bf8db5502 100644
--- a/executor/common_linux.h
+++ b/executor/common_linux.h
@@ -4857,6 +4857,10 @@ static void setup_802154()
#if GOARCH_s390x
#include <sys/mman.h>
+// Ugly way to work around gcc's "error: function called through a non-compatible type".
+// Simply casting via (void*) inline does not work b/c gcc sees through a chain of casts.
+// The macro is used in generated C code.
+#define CAST(f) ({void* p = (void*)f; p; })
#endif
#if SYZ_EXECUTOR || __NR_syz_fuse_handle_req