honggfuzz/0003-linux-bfd-cover-include-diagnostics.h-with-__has_inc.patch
Martin Pluskal 20cb796de7 Accepting request 999245 from home:cgiboudeaux:branches:devel:tools
- Update to 2.5
  * fixed build for Android NDK >= 23
  * fixed build for CygWin
  * improved hfuzz-cc, so it supports -x correctly
  * error returned if unknown cmd-line parameters are provided
  * support for thread CPU pinning
  * various fixes for *BSD
  * increased number of dictionary entries (to 8192)
- Add upstream changes to fix build with recent binutils:
  * 0001-Always-pass-4-arguments-to-init_disassemble_info-no-.patch
  * 0002-linux-bfd-use-DIAGNOSTIC_ERROR_SWITCH-define-to-figu.patch
  * 0003-linux-bfd-cover-include-diagnostics.h-with-__has_inc.patch

OBS-URL: https://build.opensuse.org/request/show/999245
OBS-URL: https://build.opensuse.org/package/show/devel:tools/honggfuzz?expand=0&rev=25
2022-08-29 06:57:05 +00:00

30 lines
745 B
Diff

From 6a757bb7a091d64b145d4e1a9b6c50f6b3ed51ea Mon Sep 17 00:00:00 2001
From: Robert Swiecki <robert@swiecki.net>
Date: Mon, 6 Jun 2022 18:11:28 +0200
Subject: [PATCH 3/3] linux/bfd: cover #include <diagnostics.h> with
__has_include, because it appeared in 2018 only
---
linux/bfd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/linux/bfd.c b/linux/bfd.c
index e9d9c2b..adae590 100644
--- a/linux/bfd.c
+++ b/linux/bfd.c
@@ -26,7 +26,11 @@
#include "linux/bfd.h"
#include <bfd.h>
+#if defined __has_include
+#if __has_include(<diagnostics.h>)
#include <diagnostics.h>
+#endif /* __has_include(<diagnostics.h>) */
+#endif /* defined __has_include */
#include <dis-asm.h>
#include <inttypes.h>
#include <pthread.h>
--
2.37.2