Re: [ROOT] Debian compilation...

From: Jiri Masik (masik@pc203b.fzu.cz)
Date: Thu Jan 09 2003 - 22:35:22 MET


Matthew Bellis <bellim@hadron3.phys.rpi.edu> writes:

> g++ -O1 -pipe -Wall -fPIC -Iinclude -DHAVE_CONFIG -D_REENTRANT
> -DR__SHADOWPW     -DR__SRP_1_1 -o rootd/src/rootd.o -c
> rootd/src/rootd.cxx
> rootd/src/rootd.cxx: In function `int setresgid(unsigned int, unsigned
> int,    unsigned int)':
> rootd/src/rootd.cxx:327: `int setresgid(unsigned int, unsigned int,
> unsigned    int)' was declared `extern' and later `static'
> /usr/include/unistd.h:658: previous declaration of `int
> setresgid(unsigned int,    unsigned int, unsigned int)'
> rootd/src/rootd.cxx: In function `int setresuid(unsigned int, unsigned
> int,    unsigned int)':
> rootd/src/rootd.cxx:334: `int setresuid(unsigned int, unsigned int,
> unsigned    int)' was declared `extern' and later `static'
> /usr/include/unistd.h:654: previous declaration of `int
> setresuid(unsigned int,    unsigned int, unsigned int)'
> make: *** [rootd/src/rootd.o] Error 1

Hi Matthew,

as a quick fix remove the lines
#if !defined(__hpux)
static int setresgid(gid_t r, gid_t e, gid_t)
{
   if (setgid(r) == -1)
      return -1;
   return setegid(e);
}

static int setresuid(uid_t r, uid_t e, uid_t)
{
   if (setuid(r) == -1)
      return -1;
   return seteuid(e);
}
#endif

from rootd/src/rootd.cxx. It should compile then. Fons please can you
protect this define, setresgid/setresuid prototype has been added to
newer libc6 headers (libc6 2.3.1) 

cheers

Jiri



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:08 MET