public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Include string.h in elf-bfd.h
@ 2020-09-06  2:36 Saagar Jha
  2020-09-07 10:04 ` Nick Clifton
  0 siblings, 1 reply; 8+ messages in thread
From: Saagar Jha @ 2020-09-06  2:36 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

elf-bfd.h uses functions from <string.h> but doesn’t include it, which causes problems for a configure test that uses it when compiled with a compiler that is picky about missing prototypes (such as macOS’s as of recently). This patch adds the missing include.


[-- Attachment #2: Include-string.h-in-elf-bfd.h.patch --]
[-- Type: application/octet-stream, Size: 1119 bytes --]

From cdeac45356a0020c6468d7ff38e966ccbd6eb636 Mon Sep 17 00:00:00 2001
From: Saagar Jha <saagar@saagarjha.com>
Date: Thu, 13 Aug 2020 22:09:52 -0700
Subject: [PATCH] Include string.h in elf-bfd.h

Some of the configure tests include just this header, and since it uses
functions from string they fail to compile and configure thinks that
binutils is missing ELF support.

bfd/ChangeLog:

	* bfd/elf-bfd.h: Include <string.h>.
---
 bfd/ChangeLog | 4 ++++
 bfd/elf-bfd.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 75bcf55316..26817c7e7a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2020-09-05  Saagar Jha  <saagar@saagarjha.com>
+
+	* bfd/elf-bfd.h: Include <string.h>.
+
 2020-09-04  Alan Modra  <amodra@gmail.com>
 
 	PR 26574
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index eebdf9ac73..32ab3733be 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -26,6 +26,7 @@
 #include "elf/external.h"
 #include "elf/internal.h"
 #include "bfdlink.h"
+#include <string.h>
 
 #ifdef __cplusplus
 extern "C" {
-- 
2.28.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-09-23  9:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-06  2:36 [PATCH] Include string.h in elf-bfd.h Saagar Jha
2020-09-07 10:04 ` Nick Clifton
2020-09-08 22:23   ` Saagar Jha
2020-09-09 12:07     ` Nick Clifton
2020-09-11  5:57       ` Saagar Jha
2020-09-14  9:55         ` Nick Clifton
2020-09-23  7:01           ` Saagar Jha
2020-09-23  9:33             ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).