From 49c7dd1ca487e71cfb3c324fe76562424213b4bc Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sun, 2 Apr 2023 22:32:11 +0200 Subject: [PATCH] build: Only emit link warnings for ELF objects --- src/local-link.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/local-link.h b/src/local-link.h index 6782d9a..7e9053b 100644 --- a/src/local-link.h +++ b/src/local-link.h @@ -29,9 +29,13 @@ #include +#ifdef __ELF__ #define libbsd_link_warning(symbol, msg) \ static const char libbsd_emit_link_warning_##symbol[] \ __attribute__((__used__,__section__(".gnu.warning." #symbol))) = msg +#else +#define libbsd_link_warning(symbol, msg) +#endif #ifdef __ELF__ # if __has_attribute(symver)