aboutsummaryrefslogtreecommitdiffstats
path: root/executor/common_linux.h
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2022-09-06 10:03:40 +0200
committerDmitry Vyukov <dvyukov@google.com>2022-09-06 17:21:01 +0200
commit5fc30c371cdabb1a4e941ad8dc0f8ac631696f04 (patch)
tree5d6687204a9836a2049e90518129345f0208fb1b /executor/common_linux.h
parent65aea2b994281900c86e05e385151383b53a791f (diff)
Revert "pkg/csource: inline void* cast into generated code"
This reverts commit 922294abb4c0bc72b24d8526d625110d73fa1b5a. The commit reported to cause old warnings on s390x: https://github.com/google/syzkaller/commit/922294abb4c0bc72b24d8526d625110d73fa1b5a#commitcomment-83096994
Diffstat (limited to 'executor/common_linux.h')
-rw-r--r--executor/common_linux.h4
1 files changed, 4 insertions, 0 deletions
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