pwdutils: Fix compilation with recent glibc.

From trunk@21318

svn path=/nixpkgs/branches/mass-update-01/; revision=21373
This commit is contained in:
Yury G. Kudryashov
2010-04-27 20:55:27 +00:00
parent 24d9a7aaff
commit 8739f5e30e
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>