/[gentoo-x86]/sys-fs/e2fsprogs/files/e2fsprogs-1.41.12-getpagesize.patch
Gentoo

Contents of /sys-fs/e2fsprogs/files/e2fsprogs-1.41.12-getpagesize.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Dec 4 22:29:24 2010 UTC (3 years, 8 months ago) by vapier
Branch: MAIN
Undo some useless changes from the prefix merge, and fix implicit getpagesize() warnings.

(Portage version: 2.2.0_alpha5/cvs/Linux x86_64)

1 From 81c81f5421cb9b85e793c591595a0a4d6ee04e99 Mon Sep 17 00:00:00 2001
2 From: Mike Frysinger <vapier@gentoo.org>
3 Date: Sat, 4 Dec 2010 17:10:53 -0500
4 Subject: [PATCH] libext2fs: change getpagesize to sysconf
5
6 Newer versions of glibc no longer export the getpagesize() prototype when
7 using recent versions of POSIX (_XOPEN_SOURCE). So building tdb.c gives
8 use implicit function declaration warnings. Fix the issue by using the
9 portable sysconf() function which returns the same answer.
10
11 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 ---
13 lib/ext2fs/tdb.c | 6 +-----
14 1 files changed, 1 insertions(+), 5 deletions(-)
15
16 diff --git a/lib/ext2fs/tdb.c b/lib/ext2fs/tdb.c
17 index 0c82a24..43c5d44 100644
18 --- a/lib/ext2fs/tdb.c
19 +++ b/lib/ext2fs/tdb.c
20 @@ -111,10 +111,6 @@ typedef int bool;
21 #define u32 unsigned
22 #endif
23
24 -#ifndef HAVE_GETPAGESIZE
25 -#define getpagesize() 0x2000
26 -#endif
27 -
28 typedef u32 tdb_len_t;
29 typedef u32 tdb_off_t;
30
31 @@ -3838,7 +3834,7 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
32 tdb->hash_fn = hash_fn ? hash_fn : default_tdb_hash;
33
34 /* cache the page size */
35 - tdb->page_size = getpagesize();
36 + tdb->page_size = sysconf(_SC_PAGESIZE);
37 if (tdb->page_size <= 0) {
38 tdb->page_size = 0x2000;
39 }
40 --
41 1.7.3.1

  ViewVC Help
Powered by ViewVC 1.1.20