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

1d949dd773

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>
This commit is contained in:
Julius Werner 2020-08-19 18:14:43 -07:00 committed by Commit Bot
parent fefcaa653f
commit 927a952612
1 changed files with 7 additions and 0 deletions

View File

@ -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