This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[PATCH] Include strings.h to make ffs available
- From: Ulf Hermann <ulf dot hermann at qt dot io>
- To: <elfutils-devel at sourceware dot org>
- Date: Thu, 20 Apr 2017 16:33:28 +0200
- Subject: [PATCH] Include strings.h to make ffs available
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=qt.io;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qtcompany.onmicrosoft.com; s=selector1-qt-io; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=OXakQ+dAn5ri9wtKcRfghmw5LOgHYrW4nMV3BS5xB88=; b=s8v/l8ygwpAg14BcJrxB0ZljNJ5V/61dk3kmFJSXtet74FWw9Wd9YjQChCABsWyxU4PM6XXeqPuSCIjT05ivJCkrT5YE4Hrwm+EQ0RqEJnqvry6Iidf8R5E9y5HQOtEjit43bb8l+5MounbGVXJMfEhfOCg+Z9KnYQeUM9xbSf4=
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
We cannot rely on it to be available from any of the other headers.
Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
---
src/ChangeLog | 4 ++++
src/readelf.c | 1 +
2 files changed, 5 insertions(+)
diff --git a/src/ChangeLog b/src/ChangeLog
index 1521d80..cbb77fc 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
+ * readelf.c: Include strings.h.
+
+2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
+
* unstrip.c: Check shnum for 0 before subtracting from it.
2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
diff --git a/src/readelf.c b/src/readelf.c
index 6f6095d..40d4913 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -38,6 +38,7 @@
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <time.h>
#include <unistd.h>
#include <sys/stat.h>
--
2.1.4