btrfs-progs: Use sysconf instead of getpagesize
authorEric Sandeen <sandeen@redhat.com>
Sat, 19 Jan 2013 18:06:17 +0000 (13:06 -0500)
committerDavid Sterba <dsterba@suse.cz>
Wed, 23 Jan 2013 18:27:13 +0000 (19:27 +0100)
commit5cdc0913dd2e7db37b948464e8cb22fd2982a65e
treec63d50fa20e40e936cbcb77453955ebc2e7b8234
parentcdbe16b3093aa565330a14860f307ac91e0310e7
btrfs-progs: Use sysconf instead of getpagesize

Rawhide is getting cranky with posix compliance, and a few
things have stopped building.

getpagesize() is now only available -with- __USE_XOPEN_EXTENDED
or __USE_BSD, and NOT __USE_XOPEN2K.

_GNU_SOURCE must define __USE_XOPEN2K because getpagesize()
has gone away for mkfs.  I gave up and used sysconf.

Also, something used to pull in stat that no longer does, so
things like S_ISREG weren't getting defined.

The following fixes things for me.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
btrfsck.c
mkfs.c