This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Compilation Problem
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jason Morris <jhmorris3486 at yahoo dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 5 Jun 2006 12:59:24 +0930
- Subject: Re: Compilation Problem
- References: <20060604144203.62252.qmail@web81114.mail.mud.yahoo.com>
On Sun, Jun 04, 2006 at 07:42:03AM -0700, Jason Morris wrote:
> ../../binutils-060604/bfd/elf.c:7938: error: syntax
> error before 'pid_t'
Presumably this is because you are missing a "pid_t" type. Please try
the following patch.
* elf.c (elfcore_grok_nto_status): Use long instead of pid_t.
(elfcore_grok_nto_regs, elfcore_grok_nto_note): Likewise.
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.341
diff -u -p -r1.341 elf.c
--- bfd/elf.c 1 Jun 2006 03:45:58 -0000 1.341
+++ bfd/elf.c 5 Jun 2006 03:07:07 -0000
@@ -7935,7 +7931,7 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf
}
static bfd_boolean
-elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid)
+elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, long *tid)
{
void *ddata = note->descdata;
char buf[100];
@@ -7967,7 +7963,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_
elf_tdata (abfd)->core_lwpid = *tid;
/* Make a ".qnx_core_status/%d" section. */
- sprintf (buf, ".qnx_core_status/%ld", (long) *tid);
+ sprintf (buf, ".qnx_core_status/%ld", *tid);
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
@@ -7988,7 +7984,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_
static bfd_boolean
elfcore_grok_nto_regs (bfd *abfd,
Elf_Internal_Note *note,
- pid_t tid,
+ long tid,
char *base)
{
char buf[100];
@@ -7996,7 +7992,7 @@ elfcore_grok_nto_regs (bfd *abfd,
asection *sect;
/* Make a "(base)/%d" section. */
- sprintf (buf, "%s/%ld", base, (long) tid);
+ sprintf (buf, "%s/%ld", base, tid);
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
@@ -8029,7 +8025,7 @@ elfcore_grok_nto_note (bfd *abfd, Elf_In
/* Every GREG section has a STATUS section before it. Store the
tid from the previous call to pass down to the next gregs
function. */
- static pid_t tid = 1;
+ static long tid = 1;
switch (note->type)
{
--
Alan Modra
IBM OzLabs - Linux Technology Centre