Skip to content

Commit

Permalink
virtual: workaround -Wundef in <ffi.h> on macOS 12
Browse files Browse the repository at this point in the history
Signed-off-by: Daiki Ueno <dueno@redhat.com>
  • Loading branch information
ueno committed Mar 17, 2023
1 parent 16addb7 commit 929ebba
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions p11-kit/virtual.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,21 @@
*/
#define LIBFFI_FREE_CLOSURES 0

/*
* Work around for <ffitarget.h> on macOS 12 where it doesn't define
* necessary platform-dependent macros, such as FFI_GO_CLOSURES.
*/
#ifdef __APPLE__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundef"
#endif

#include "ffi.h"

#ifdef __APPLE__
#pragma clang diagnostic pop
#endif

#endif

/* There are 90 functions in PKCS#11 3.0, with a maximum of 9 args */
Expand Down

0 comments on commit 929ebba

Please sign in to comment.