Add a patch for e2fsprogs/1.42 from main tree
authorSebastian Pipping <sebastian@pipping.org>
Fri, 13 Jan 2012 21:23:43 +0000 (22:23 +0100)
committerSebastian Pipping <sebastian@pipping.org>
Fri, 13 Jan 2012 21:23:43 +0000 (22:23 +0100)
ChangeLog
patches/e2fsprogs/1.42/e2fsprogs-1.41.12-getpagesize.patch [new file with mode: 0644]

index 1652e964520df180df0b5ff83410e25f24e62b32..8faffc4d8644535878abf358ea54f99117d23652 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@
 # Distributed under the GPL v2
 # $Id$
 
+  13 Jan 2012; Sebastian Pipping <sping@gentoo.org>
+  +patches/e2fsprogs/1.42/e2fsprogs-1.41.12-getpagesize.patch:
+  Add a patch for e2fsprogs/1.42 from main tree
+
   13 Jan 2012; Sebastian Pipping <sping@gentoo.org>
   +patches/lvm/2.02.88/lvm2-2.02.72-no-export-dynamic.patch:
   Copy patch from lvm/2.02.74 to lvm/2.02.88
diff --git a/patches/e2fsprogs/1.42/e2fsprogs-1.41.12-getpagesize.patch b/patches/e2fsprogs/1.42/e2fsprogs-1.41.12-getpagesize.patch
new file mode 100644 (file)
index 0000000..5b042d3
--- /dev/null
@@ -0,0 +1,42 @@
+From 81c81f5421cb9b85e793c591595a0a4d6ee04e99 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sat, 4 Dec 2010 17:10:53 -0500
+Subject: [PATCH] libext2fs: change getpagesize to sysconf
+
+Newer versions of glibc no longer export the getpagesize() prototype when
+using recent versions of POSIX (_XOPEN_SOURCE).  So building tdb.c gives
+use implicit function declaration warnings.  Fix the issue by using the
+portable sysconf() function which returns the same answer.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ lib/ext2fs/tdb.c |    6 +-----
+ 1 files changed, 1 insertions(+), 5 deletions(-)
+
+diff --git a/lib/ext2fs/tdb.c b/lib/ext2fs/tdb.c
+index 0c82a24..43c5d44 100644
+--- a/lib/ext2fs/tdb.c
++++ b/lib/ext2fs/tdb.c
+@@ -111,10 +111,6 @@ typedef int bool;
+ #define u32 unsigned
+ #endif
+-#ifndef HAVE_GETPAGESIZE
+-#define getpagesize() 0x2000
+-#endif
+-
+ typedef u32 tdb_len_t;
+ typedef u32 tdb_off_t;
+@@ -3838,7 +3834,7 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
+       tdb->hash_fn = hash_fn ? hash_fn : default_tdb_hash;
+       /* cache the page size */
+-      tdb->page_size = getpagesize();
++      tdb->page_size = sysconf(_SC_PAGESIZE);
+       if (tdb->page_size <= 0) {
+               tdb->page_size = 0x2000;
+       }
+-- 
+1.7.3.1
+