This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [pushed] Fix missing "struct iovec" definition on some x86-linux. (was: "[PATCH 7/7 v2] Tidy #include lists")


> > > This commit tidies up the #include lists in {i386,amd64}-linux-nat.c,
> > > removing headers that are no longer required and reordering some
> > > lines so that both files roughly match.  Additionally, an unused
> > > definition was removed from the middle of the #include list in
> > > i386-linux-nat.c.
> > 
> > Unfortunately, this patch broke GDB builds on some GNU/Linux
> > distros. I fixed the issue I got by applying the attached patch.
> 
> Thanks for fixing this Joel.

Of course! As it happens, we need to do the same for amd64-linux-nat.c
as well. It makes sense, not sure why I didn't think of that before.
Attached is the patch I just pushed.

gdb/ChangeLog:

        * amd64-linux-nat.c: Add <sys/uio.h> #include.

-- 
Joel
>From 35782f1465dd014737fcf6c82bdf733598a5c9b8 Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Wed, 10 Sep 2014 09:06:50 -0400
Subject: [PATCH] Add <sys/uio.h> #include back in amd64-linux-nat.c.

This include is needed to access the definition of "struct iovec".

gdb/ChangeLog:

        * amd64-linux-nat.c: Add <sys/uio.h> #include.
---
 gdb/ChangeLog         | 4 ++++
 gdb/amd64-linux-nat.c | 1 +
 2 files changed, 5 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 93a3931..2d20b1c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2014-09-10  Joel Brobecker  <brobecker@adacore.com>
+
+	* amd64-linux-nat.c: Add <sys/uio.h> #include.
+
 2014-09-09  Doug Evans  <xdje42@gmail.com>
 
 	PR guile/17367
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index a00fbd6..09a4dfd 100644
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -22,6 +22,7 @@
 #include "inferior.h"
 #include "regcache.h"
 #include "elf/common.h"
+#include <sys/uio.h>
 #include <sys/ptrace.h>
 #include <asm/prctl.h>
 #include <sys/reg.h>
-- 
1.9.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]