pwdutils: Fix compilation with recent glibc.

svn path=/nixpkgs/trunk/; revision=21318
This commit is contained in:
Ludovic Courtès 2010-04-26 09:30:53 +00:00
parent a174ff34b8
commit fff97995f3
2 changed files with 41 additions and 1 deletions

View file

@ -10,7 +10,9 @@ stdenv.mkDerivation rec {
buildInputs = [ pam gnutls libnscd ];
patchPhase =
patches = [ ./sys-stat-h.patch ];
postPatch =
'' for i in src/tst-*
do
sed -i "$i" -e's|/bin/bash|/bin/sh|g'
@ -38,6 +40,7 @@ stdenv.mkDerivation rec {
license = "GPLv2";
maintainers = [ stdenv.lib.maintainers.ludo ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -0,0 +1,37 @@
Fix builds with current glibc git, which appears to be stricter
about <sys/stat.h>.
--- pwdutils-3.2.6/src/useradd.c~ 2008-10-16 13:46:07.000000000 +0200
+++ pwdutils-3.2.6/src/useradd.c 2010-04-26 11:24:43.000000000 +0200
@@ -18,6 +18,7 @@
#include "config.h"
#endif
+#include <sys/stat.h>
#include <time.h>
#include <utmp.h>
#include <fcntl.h>
--- pwdutils-3.2.6/src/userdel.c~ 2006-11-29 14:20:39.000000000 +0100
+++ pwdutils-3.2.6/src/userdel.c 2010-04-26 11:26:08.000000000 +0200
@@ -18,6 +18,7 @@
#include "config.h"
#endif
+#include <sys/stat.h>
#include <time.h>
#include <utmp.h>
#include <fcntl.h>
diff -ubB --show-c-function pwdutils-3.2.6/src/usermod.c\~ pwdutils-3.2.6/src/usermod.c
--- pwdutils-3.2.6/src/usermod.c~ 2006-11-29 14:20:41.000000000 +0100
+++ pwdutils-3.2.6/src/usermod.c 2010-04-26 11:27:41.000000000 +0200
@@ -18,6 +18,7 @@
#include "config.h"
#endif
+#include <sys/stat.h>
#include <time.h>
#include <utmp.h>
#include <fcntl.h>