From b5200cf75349a51774d6d48bcf8e15c6d2c163dc Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Fri, 10 Apr 2009 22:35:07 +0000 Subject: [PATCH] * lib/sgetspent.c: Only compile ifndef HAVE_SGETSPENT --- ChangeLog | 4 ++++ lib/sgetspent.c | 7 +++++++ 2 files changed, 11 insertions(+) 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 -- 2.40.0