summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-11 03:39:39 +0000
committerMike Frysinger <vapier@gentoo.org>2009-02-11 03:39:39 +0000
commit8f4cd5f9487421765712b4864ddeb4a3254d40d1 (patch)
treeace566ed9fb3ed482b489887f31eb62b7b0bfbe3 /sys-apps/shadow/files
parentBug 258388: new hosting location. (diff)
downloadhistorical-8f4cd5f9487421765712b4864ddeb4a3254d40d1.tar.gz
historical-8f4cd5f9487421765712b4864ddeb4a3254d40d1.tar.bz2
historical-8f4cd5f9487421765712b4864ddeb4a3254d40d1.zip
Grab some fixes from upstream to fix building on uClibc systems #256784.
Package-Manager: portage-2.2_rc23/cvs/Linux x86_64
Diffstat (limited to 'sys-apps/shadow/files')
-rw-r--r--sys-apps/shadow/files/4.1.2.2/shadow-svn-2298.patch52
-rw-r--r--sys-apps/shadow/files/4.1.2.2/shadow-svn-2364.patch61
2 files changed, 113 insertions, 0 deletions
diff --git a/sys-apps/shadow/files/4.1.2.2/shadow-svn-2298.patch b/sys-apps/shadow/files/4.1.2.2/shadow-svn-2298.patch
new file mode 100644
index 000000000000..5489001cc1fa
--- /dev/null
+++ b/sys-apps/shadow/files/4.1.2.2/shadow-svn-2298.patch
@@ -0,0 +1,52 @@
+http://bugs.gentoo.org/256784
+
+From 6f74a20a3002280f23033dea64d7186896d0dfc0 Mon Sep 17 00:00:00 2001
+From: nekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
+Date: Sat, 30 Aug 2008 18:31:21 +0000
+Subject: [PATCH] * configure.in: Check if the stat structure has a st_atim or
+ st_atimensec field.
+ * libmisc/copydir.c: Conditionally use the stat's st_atim and
+ st_atimensec fields.
+
+git-svn-id: svn://svn.debian.org/pkg-shadow/upstream/trunk@2298 5a98b0ae-9ef6-0310-add3-de5d479b70d7
+---
+ ChangeLog | 4 ++++
+ libmisc/copydir.c | 9 +++++++--
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
++ * configure.in: Check if the stat structure has a st_atim or
++ st_atimensec field.
++ * libmisc/copydir.c: Conditionally use the stat's st_atim and
++ st_atimensec fields.
+
+diff --git a/libmisc/copydir.c b/libmisc/copydir.c
+index b887303..cdd2037 100644
+--- a/libmisc/copydir.c
++++ b/libmisc/copydir.c
+@@ -288,16 +288,21 @@ static int copy_entry (const char *src, const char *dst,
+ if (LSTAT (src, &sb) == -1) {
+ /* If we cannot stat the file, do not care. */
+ } else {
+-#if defined(_BSD_SOURCE) || defined(_SVID_SOURCE)
++#ifdef HAVE_STRUCT_STAT_ST_ATIM
+ mt[0].tv_sec = sb.st_atim.tv_sec;
+ mt[0].tv_usec = sb.st_atim.tv_nsec / 1000;
+ mt[1].tv_sec = sb.st_mtim.tv_sec;
+ mt[1].tv_usec = sb.st_mtim.tv_nsec / 1000;
+ #else
+ mt[0].tv_sec = sb.st_atime;
+- mt[0].tv_usec = sb.st_atimensec / 1000;
+ mt[1].tv_sec = sb.st_mtime;
++#ifdef HAVE_STRUCT_STAT_ST_ATIMENSEC
++ mt[0].tv_usec = sb.st_atimensec / 1000;
+ mt[1].tv_usec = sb.st_mtimensec / 1000;
++#else
++ mt[0].tv_usec = 0;
++ mt[1].tv_usec = 0;
++#endif
+ #endif
+
+ if (S_ISDIR (sb.st_mode)) {
+--
+1.6.1.2
+
diff --git a/sys-apps/shadow/files/4.1.2.2/shadow-svn-2364.patch b/sys-apps/shadow/files/4.1.2.2/shadow-svn-2364.patch
new file mode 100644
index 000000000000..59333feb0be7
--- /dev/null
+++ b/sys-apps/shadow/files/4.1.2.2/shadow-svn-2364.patch
@@ -0,0 +1,61 @@
+http://bugs.gentoo.org/256784
+
+From 060292366348d55eb90b5c3f4f15768ffc7639d2 Mon Sep 17 00:00:00 2001
+From: nekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
+Date: Sun, 7 Sep 2008 00:05:38 +0000
+Subject: [PATCH] * libmisc/copydir.c, configure.in: Check for the presence of
+ st_mtim and st_mtimensec, as for st_atim and st_atimensec.
+
+git-svn-id: svn://svn.debian.org/pkg-shadow/upstream/trunk@2364 5a98b0ae-9ef6-0310-add3-de5d479b70d7
+---
+ ChangeLog | 5 +++++
+ configure.in | 2 ++
+ libmisc/copydir.c | 17 ++++++++++++-----
+ 3 files changed, 19 insertions(+), 5 deletions(-)
+
++2008-09-07 Nicolas François <nicolas.francois@centraliens.net>
++
++ * libmisc/copydir.c, configure.in: Check for the presence of
++ st_mtim and st_mtimensec, as for st_atim and st_atimensec.
+
+/* configure.in changes are in the 4.1.2.2 configure.in ... */
+
+diff --git a/libmisc/copydir.c b/libmisc/copydir.c
+index cdd2037..a9aec98 100644
+--- a/libmisc/copydir.c
++++ b/libmisc/copydir.c
+@@ -288,19 +288,26 @@ static int copy_entry (const char *src, const char *dst,
+ if (LSTAT (src, &sb) == -1) {
+ /* If we cannot stat the file, do not care. */
+ } else {
+-#ifdef HAVE_STRUCT_STAT_ST_ATIM
++#ifdef HAVE_STRUCT_STAT_ST_ATIM
+ mt[0].tv_sec = sb.st_atim.tv_sec;
+ mt[0].tv_usec = sb.st_atim.tv_nsec / 1000;
+- mt[1].tv_sec = sb.st_mtim.tv_sec;
+- mt[1].tv_usec = sb.st_mtim.tv_nsec / 1000;
+ #else
+ mt[0].tv_sec = sb.st_atime;
+- mt[1].tv_sec = sb.st_mtime;
+ #ifdef HAVE_STRUCT_STAT_ST_ATIMENSEC
+ mt[0].tv_usec = sb.st_atimensec / 1000;
+- mt[1].tv_usec = sb.st_mtimensec / 1000;
+ #else
+ mt[0].tv_usec = 0;
++#endif
++#endif
++
++#ifdef HAVE_STRUCT_STAT_ST_MTIM
++ mt[1].tv_sec = sb.st_mtim.tv_sec;
++ mt[1].tv_usec = sb.st_mtim.tv_nsec / 1000;
++#else
++ mt[1].tv_sec = sb.st_mtime;
++#ifdef HAVE_STRUCT_STAT_ST_MTIMENSEC
++ mt[1].tv_usec = sb.st_mtimensec / 1000;
++#else
+ mt[1].tv_usec = 0;
+ #endif
+ #endif
+--
+1.6.1.2
+