bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: comiling error in exec


From: Alfred M. Szmidt
Subject: Re: comiling error in exec
Date: Thu, 12 Feb 2004 15:07:49 +0100 (MET)

   ../../exec/exec.c: In function `check_elf_phdr':
   ../../exec/exec.c:931: error: `PT_GNU_STACK' undeclared (first use in this 
function)
   ../../exec/exec.c:931: error: (Each undeclared identifier is reported only 
once
   ../../exec/exec.c:931: error: for each function it appears in.)

You are using a old version of the GNU C library.  PT_GNU_STACK got
introduced into glibc by the following:

,----[ libc/ChangeLog ]
| 2003-06-05  Roland McGrath  <roland@redhat.com>
| 
|         * elf/elf.h (PT_GNU_STACK): New macro.
`----

Not sure what the correct fix is.  One way is to have configure.in
check for PT_GNU_STACK, and then do:

,----
| #ifndef HAVE_ELF_H__PT_GNU_STACK
| #defin PT_GNU_STACK ...
| #endif
`----

Somewhere in a config.h header, but this requires the use of
autoheader.  Roland or Marucs, what would you prefer?


Anyway, for the impatient, here is a patch that will make exec compile
again.

*** exec.c.~1.88.~        Thu Feb 12 02:29:06 2004
--- exec.c      Thu Feb 12 22:44:47 2004
***************
*** 40,45 ****
--- 40,51 ----
  #include <sys/param.h>
  #include <unistd.h>
  
+ #include <elf.h>
+ 
+ #ifndef PT_GNU_STACK
+ #define PT_GNU_STACK    0x6474e551      /* Indicates stack executability */
+ #endif
+ 
  mach_port_t procserver;    /* Our proc port.  */
  
  /* Standard exec data for secure execs.  */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]