diff --git a/ChangeLog b/ChangeLog index 408f728a..33b3e295 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-04-06 Nicolas François + + * lib/sgetspent.c: Only compile ifndef HAVE_SGETSPENT + 2009-04-06 Nicolas François * lib/sgetspent.c: Replace strtol() by getlong(). Also detect more diff --git a/lib/sgetspent.c b/lib/sgetspent.c index a6bbb5ab..20531eba 100644 --- a/lib/sgetspent.c +++ b/lib/sgetspent.c @@ -2,6 +2,7 @@ * Copyright (c) 1989 - 1994, Julianne Frances Haugh * Copyright (c) 1996 - 1998, Marek Michałkiewicz * Copyright (c) 2003 - 2005, Tomasz Kłoczko + * Copyright (c) 2009 , Nicolas François * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +32,9 @@ #include +/* Newer versions of Linux libc already have shadow support. */ +#ifndef HAVE_SGETSPENT + #ident "$Id$" #include @@ -198,4 +202,7 @@ struct spwd *sgetspent (const char *string) return (&spwd); } +#else +extern int errno; /* warning: ANSI C forbids an empty source file */ +#endif