This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 10/11] libctf: add some missing #includes.
- From: Nick Alcock <nick dot alcock at oracle dot com>
- To: binutils at sourceware dot org
- Cc: indu dot bhagat at oracle dot com, jose dot marchesi at oracle dot com, nick dot alcock at oracle dot com
- Date: Mon, 16 Dec 2019 22:53:56 +0000
- Subject: [PATCH 10/11] libctf: add some missing #includes.
- References: <20191216225357.87247-1-nick.alcock@oracle.com>
Causes warnings on (at least) recent FreeBSD.
libctf/
* ctf-create.c: Include <unistd.h>.
* ctf-open-bfd.c: Likewise.
---
libctf/ChangeLog | 5 +++++
libctf/ctf-create.c | 1 +
libctf/ctf-open-bfd.c | 1 +
3 files changed, 7 insertions(+)
diff --git a/libctf/ChangeLog b/libctf/ChangeLog
index 5666eebc60..f172cbf864 100644
--- a/libctf/ChangeLog
+++ b/libctf/ChangeLog
@@ -1,3 +1,8 @@
+2019-12-16 Nick Alcock <nick.alcock@oracle.com>
+
+ * ctf-create.c: Include <unistd.h>.
+ * ctf-open-bfd.c: Likewise.
+
2019-12-16 Nick Alcock <nick.alcock@oracle.com>
PR libctf/25120
diff --git a/libctf/ctf-create.c b/libctf/ctf-create.c
index a63c213d33..b875075f50 100644
--- a/libctf/ctf-create.c
+++ b/libctf/ctf-create.c
@@ -21,6 +21,7 @@
#include <sys/param.h>
#include <assert.h>
#include <string.h>
+#include <unistd.h>
#include <zlib.h>
#ifndef roundup
diff --git a/libctf/ctf-open-bfd.c b/libctf/ctf-open-bfd.c
index b40d3778d0..3264fc9a3e 100644
--- a/libctf/ctf-open-bfd.c
+++ b/libctf/ctf-open-bfd.c
@@ -25,6 +25,7 @@
#include <errno.h>
#include <string.h>
#include <fcntl.h>
+#include <unistd.h>
#include <elf.h>
#include <bfd.h>
#include "swap.h"
--
2.24.1.242.gb57e918ca5