mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
Fix missing "struct iovec" definition on some x86-linux.
The following patch...
commit 3116063bd6
Date: Fri Jun 27 09:52:29 2014 +0100
Subject: Tidy #include lists
... introduced a build failure on certain x86 GNU/Linux distributions
(reproduced on SuSE 10 and RHES4) due to "struct iovec" not being
defined. This struct is defined in <sys/uio.h>, which used to be
explicitly included, but no longer is after the commit above was
applied.
[...]/i386-linux-nat.c: In function 'fetch_xstateregs':
[...]/i386-linux-nat.c:325:16: error: storage size of 'iov' isn't known
[...]/i386-linux-nat.c: In function 'store_xstateregs':
[...]/i386-linux-nat.c:348:16: error: storage size of 'iov' isn't known
make[2]: *** [i386-linux-nat.o] Error 1
It seems to be working on newer GNU/Linux distros thanks to indirect
inclusion of <sys/uio.h>, but it does not work on some other versions
of the same distros. This is why indirect includes of public APIs
should be avoided if at all possible.
This patch fixes the issue by adding the explicit include back.
gdb/ChangeLog:
* i386-linux-nat.c, x86-linux-nat.c: Add <sys/uio.h> #include.
This commit is contained in:
parent
d7adf9603b
commit
72fde3dfe9
@ -1,3 +1,7 @@
|
||||
2014-09-09 Joel Brobecker <brobecker@adacore.com>
|
||||
|
||||
* i386-linux-nat.c, x86-linux-nat.c: Add <sys/uio.h> #include.
|
||||
|
||||
2014-09-08 Doug Evans <xdje42@gmail.com>
|
||||
|
||||
PR 17247
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "regcache.h"
|
||||
#include "elf/common.h"
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/uio.h>
|
||||
#include "gregset.h"
|
||||
#include "gdb_proc_service.h"
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <sys/ptrace.h>
|
||||
#include <sys/user.h>
|
||||
#include <sys/procfs.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include "x86-nat.h"
|
||||
#include "linux-nat.h"
|
||||
|
Loading…
Reference in New Issue
Block a user