]> granicus.if.org Git - shadow/commitdiff
* lib/sgetspent.c: Only compile ifndef HAVE_SGETSPENT
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 10 Apr 2009 22:35:07 +0000 (22:35 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 10 Apr 2009 22:35:07 +0000 (22:35 +0000)
ChangeLog
lib/sgetspent.c

index 408f728a1248b3aea9f34767a8184e3f55341cb8..33b3e295e3e1beb9188f9ee17382e1e2b8776d12 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-06  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * lib/sgetspent.c: Only compile ifndef HAVE_SGETSPENT
+
 2009-04-06  Nicolas François  <nicolas.francois@centraliens.net>
 
        * lib/sgetspent.c: Replace strtol() by getlong(). Also detect more
index a6bbb5abb930a2ed77fb45490894910615c3c307..20531eba5ed304a36daf64959f44034f07866cd9 100644 (file)
@@ -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 <config.h>
 
+/* Newer versions of Linux libc already have shadow support.  */
+#ifndef HAVE_SGETSPENT
+
 #ident "$Id$"
 
 #include <sys/types.h>
@@ -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