Gentoo Archives: gentoo-commits

From: "Hanno Boeck (hanno)" <hanno@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/ext3grep/files: ext3grep-0.10.2-new-e2fsprogs.diff
Date: Sun, 26 Feb 2012 17:51:54
Message-Id: 20120226175144.634992004C@flycatcher.gentoo.org
1 hanno 12/02/26 17:51:44
2
3 Added: ext3grep-0.10.2-new-e2fsprogs.diff
4 Log:
5 ext3grep: fix build with e2fsprogs
6
7 (Portage version: 2.1.10.49/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 sys-fs/ext3grep/files/ext3grep-0.10.2-new-e2fsprogs.diff
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/ext3grep/files/ext3grep-0.10.2-new-e2fsprogs.diff?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/ext3grep/files/ext3grep-0.10.2-new-e2fsprogs.diff?rev=1.1&content-type=text/plain
14
15 Index: ext3grep-0.10.2-new-e2fsprogs.diff
16 ===================================================================
17 diff -ur ext3grep-0.10.1/src/ext3.h ext3grep-0.10.1.new/src/ext3.h
18 --- ext3grep-0.10.1/src/ext3.h 2008-04-09 11:20:31.000000000 +0000
19 +++ ext3grep-0.10.1.new/src/ext3.h 2011-12-10 07:00:50.000000000 +0000
20 @@ -24,6 +24,17 @@
21 #ifndef EXT3_H
22 #define EXT3_H
23
24 +// this trickery needs to happen before ext2_fs is included so
25 +// bail out if it has already been included by another path
26 +#ifdef _LINUX_EXT2_FS_H
27 + #error please include this file before any other includes of ext2fs/ext2_fs.h
28 +#endif
29 +
30 +// some versions of the ext2 headers call this s_frags_per_group and some
31 +// call it s_clusters_per_group, define one to the other so our code works
32 +// with both
33 +#define s_clusters_per_group s_frags_per_group
34 +
35 // Use the header files from e2progs (http://e2fsprogs.sourceforge.net)
36 // We can use these headers and then everything named ext2 or ext3.
37 #include <ext2fs/ext2_fs.h> // Definitions of ext2, ext3 and ext4.
38 @@ -110,6 +121,12 @@
39 __u32 faddr(void) const { return i_faddr; }
40 __u16 uid_high(void) const { return i_uid_high; }
41 __u16 gid_high(void) const { return i_gid_high; }
42 +#ifndef i_reseved2
43 + //i_reseved2 has been split into two fields in recent
44 + //versions of the headers, luckilly we can still access
45 + //it in one peice through the hurd side of the union
46 + #define i_reserved2 osd2.hurd2.h_i_author
47 +#endif
48 __u32 reserved2(void) const { return i_reserved2; }
49
50 void set_reserved2(__u32 val) { i_reserved2 = val; }