summaryrefslogtreecommitdiff
path: root/futility
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2020-08-19 18:14:43 -0700
committerCommit Bot <commit-bot@chromium.org>2020-08-25 08:07:34 +0000
commit927a95261259382ef0e167babcd997d3bfb6f1fd (patch)
treeffef54eb4d54c9efb0fa351fd5266c56794c9039 /futility
parentfefcaa653f2c7a79aa0270d8b2ef7cb290a6f225 (diff)
downloadvboot-927a95261259382ef0e167babcd997d3bfb6f1fd.tar.gz
futility: Work around clang/GCC problem with libzip headers
I don't even want to get into why this is needed. I'm so tired of having to deal with new clang-specific toolchain bullshit 2-3 times a year. libzip did this https://github.com/nih-at/libzip/commit/1d949dd77339fb59605dc8f3a30f76604d693795 and then we upreved to it in CL:2245845 and now building upstream coreboot in a Chrome OS chroot is broken. I have to get back to wasting time on the other three random things that broke when I ran repo sync, so someone please just approve... BRANCH=None BUG=None TEST=None Signed-off-by: Julius Werner <jwerner@chromium.org> Change-Id: Ic578e8f8e47f7fafd98d8c3148cbe24d9156886b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2366053 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'futility')
-rw-r--r--futility/updater_archive.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/futility/updater_archive.c b/futility/updater_archive.c
index 36873a68..218499e4 100644
--- a/futility/updater_archive.c
+++ b/futility/updater_archive.c
@@ -17,6 +17,13 @@
#include <unistd.h>
#ifdef HAVE_LIBZIP
+#ifndef __clang__
+/* If libzip headers were built for Clang but later get included with GCC you
+ need this. This check should really be in libzip but apparently they think
+ it's fine to ship compiler-specific system headers or something... */
+#define _Nullable
+#define _Nonnull
+#endif
#include <zip.h>
#endif