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

Re: help: uid_t structure !



Nuno Carvalho wrote:
  >  I am trying to compile one file called xpriv.c which belongs to the
  >Radio Track install ! Unfortunally i get that:
  >
  >------------------------------------------------
  >xpriv.c: In function `give_up_root`:
  >xpriv.c:30: `uid_t` undeclared (first use this function)
  >xpriv.c:30: (Each undeclared identifier is reported only once
  >xpriv.c:30: for each function it appears in.)
  >xpriv.c:30: parse error before `uid`
  >xpriv.c:33: `uid` undeclared (first use this function) 
  >
  >-----------------------------------------------
  >
  > The code is:
  >
  >---------------------------
  >#include <unistd.h>
  >#include <stdio.h>
  >
  >int give_up_root(void) 
  >{
  >   /* get the real uid and give up root */
  >   uid_t uid;
  >   int err;
  >
  >   uid=getuid();
  >   err=seteuid(uid);
  >   return (err);
  >}
  >-----------------------------
  >
  >What is going wrong ?
  >
  > uid_t structure isn`t already defined ?

You also need:

#include <sys/types.h>

I am reporting this as a bug in the manpage of getuid and setuid against
manpages-dev.


-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "Therefore being justified by faith, we have peace with
      God through our Lord Jesus Christ."       Romans 5:1 



--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: