From patchwork Wed Jan 20 21:42:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 74130 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0KLgkKY012015 for ; Wed, 20 Jan 2010 21:42:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751393Ab0ATVmh (ORCPT ); Wed, 20 Jan 2010 16:42:37 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751056Ab0ATVmh (ORCPT ); Wed, 20 Jan 2010 16:42:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:14671 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751236Ab0ATVmg (ORCPT ); Wed, 20 Jan 2010 16:42:36 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0KLgalM027290 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 20 Jan 2010 16:42:36 -0500 Received: from neon.msp.redhat.com (neon.msp.redhat.com [10.15.80.10]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0KLgZSA015420 for ; Wed, 20 Jan 2010 16:42:36 -0500 Message-ID: <4B5778CB.5090909@redhat.com> Date: Wed, 20 Jan 2010 15:42:35 -0600 From: Eric Sandeen User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: linux-btrfs@vger.kernel.org Subject: [PATCH] fix up userspace for newer glibc X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Index: btrfs-progs-0.19/btrfsck.c =================================================================== --- btrfs-progs-0.19.orig/btrfsck.c +++ btrfs-progs-0.19/btrfsck.c @@ -21,6 +21,9 @@ #include #include #include +#include +#include +#include #include "kerncompat.h" #include "ctree.h" #include "disk-io.h" Index: btrfs-progs-0.19/mkfs.c =================================================================== --- btrfs-progs-0.19.orig/mkfs.c +++ btrfs-progs-0.19/mkfs.c @@ -341,7 +341,7 @@ int main(int ac, char **av) u64 alloc_start = 0; u64 metadata_profile = BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP; u64 data_profile = BTRFS_BLOCK_GROUP_RAID0; - u32 leafsize = getpagesize(); + u32 leafsize = sysconf(_SC_PAGESIZE); u32 sectorsize = 4096; u32 nodesize = leafsize; u32 stripesize = 4096; @@ -398,7 +398,7 @@ int main(int ac, char **av) print_usage(); } } - sectorsize = max(sectorsize, (u32)getpagesize()); + sectorsize = max(sectorsize, (u32)sysconf(_SC_PAGESIZE)); if (leafsize < sectorsize || (leafsize & (sectorsize - 1))) { fprintf(stderr, "Illegal leafsize %u\n", leafsize); exit(1);