[Pkg-shadow-devel] Building shadow uid_t not defined

Nicolas François nicolas.francois at centraliens.net
Thu Mar 12 22:12:23 UTC 2009


On Thu, Mar 12, 2009 at 04:42:50PM +0200, fn42551 at fmi.uni-sofia.bg wrote:
> I'm trying to compile shadow  './configure' completed successfully,
> but 'make' prints the following error:
> gcc -DHAVE_CONFIG_H -I. -I.. -I../lib -g -O2 -MT xgetpwnam.o -MD -MP -MF
> .deps/xgetpwnam.Tpo -c -o xgetpwnam.o xgetpwnam.c
> In file included from xgetpwnam.c:52:
> ../lib/pwio.h:37: error: parse error before "uid"
> It seems that 'uid_t' has not been defined.  I search for its definition and
> found that 'uid_t' is conditionally typedef'ed in /usr/include/pwd.h.  The
> condition is '#if defined __USE_XOPEN || defined __USE_XOPEN2K'.  I remember
> building this version of shadow without any problem before.  How can I build
> it again?

What is your system? (and what libc?)
Also do you have a getpwent or getpwuid manpage for this system?
Does it indicate any macro to be defined before the inclusion of
<sys/types.h> and <pwd.h>?

To fix you problem, you can probably define one of these variables, but
that could give incompatible definitions.
Another idea could be to find another file in the shadow source which uses
some uid_t and look at the included files.
(A first idea could be to include <unistd.h> in lib/pwio.h before

Best Regards,

More information about the Pkg-shadow-devel mailing list