[Pkg-shadow-devel] [patch] build bug with --disable-shadowgrp

Juergen Daubert jue at jue.li
Sat Jan 26 10:11:38 UTC 2008


Hello,

attached a trivial patch to fix building of shadow with 
--disable-shadowgrp

regards
Juergen


-- 
Juergen Daubert  |  mailto:jue at jue.li  
Korb, Germany    |  http://jue.li/crux

-------------- next part --------------
diff -Nru shadow.orig/lib/encrypt.c shadow/lib/encrypt.c
--- shadow.orig/lib/encrypt.c	2008-01-24 12:28:21.000000000 +0100
+++ shadow/lib/encrypt.c	2008-01-26 10:44:36.000000000 +0100
@@ -32,6 +32,7 @@
 #ident "$Id: encrypt.c 1673 2008-01-06 13:49:00Z nekral-guest $"
 
 #include <unistd.h>
+#include <stdio.h>
 #include "prototypes.h"
 #include "defines.h"
 char *pw_encrypt (const char *clear, const char *salt)
diff -Nru shadow.orig/libmisc/salt.c shadow/libmisc/salt.c
--- shadow.orig/libmisc/salt.c	2008-01-24 12:28:13.000000000 +0100
+++ shadow/libmisc/salt.c	2008-01-26 10:44:36.000000000 +0100
@@ -13,6 +13,7 @@
 
 #include <sys/time.h>
 #include <stdlib.h>
+#include <stdio.h>
 #include <assert.h>
 #include "prototypes.h"
 #include "defines.h"
diff -Nru shadow.orig/src/chgpasswd.c shadow/src/chgpasswd.c
--- shadow.orig/src/chgpasswd.c	2008-01-24 12:28:19.000000000 +0100
+++ shadow/src/chgpasswd.c	2008-01-26 10:46:57.000000000 +0100
@@ -342,7 +342,9 @@
 
 	check_perms ();
 
+#ifdef	SHADOWGRP
 	is_shadow_grp = sgr_file_present ();
+#endif
 
 	open_files ();
 
diff -Nru shadow.orig/src/usermod.c shadow/src/usermod.c
--- shadow.orig/src/usermod.c	2008-01-26 10:33:49.000000000 +0100
+++ shadow/src/usermod.c	2008-01-26 10:44:36.000000000 +0100
@@ -1113,7 +1113,9 @@
 	pw_locked = 0;
 	spw_locked = 0;
 	gr_locked = 0;
+#ifdef SHADOWGRP
 	sgr_locked = 0;
+#endif
 
 	/*
 	 * Close the DBM and/or flat files


More information about the Pkg-shadow-devel mailing list