wok-4.x diff btrfs-progs/stuff/btrfs-progs-build-fixes.patch @ rev 11214

Add from wok-undigest: rlwrap pamtester php-auth-pam python-xlib qoauth gnome-desktop gnome-desktop-dev gnome-ppp
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Nov 03 17:16:52 2011 +0100 (2011-11-03)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/btrfs-progs/stuff/btrfs-progs-build-fixes.patch	Thu Nov 03 17:16:52 2011 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +--- btrfs-progs-0.19/btrfsck.c	
     1.5 ++++ btrfs-progs-0.19/btrfsck.c	
     1.6 +@@ -21,6 +21,9 @@ 
     1.7 + #include <stdio.h>
     1.8 + #include <stdlib.h>
     1.9 + #include <fcntl.h>
    1.10 ++#include <sys/types.h>
    1.11 ++#include <sys/stat.h>
    1.12 ++#include <unistd.h>
    1.13 + #include "kerncompat.h"
    1.14 + #include "ctree.h"
    1.15 + #include "disk-io.h"
    1.16 +--- btrfs-progs-0.19/mkfs.c	
    1.17 ++++ btrfs-progs-0.19/mkfs.c	
    1.18 +@@ -341,7 +341,7 @@ int main(int ac, char **av)
    1.19 + 	u64 alloc_start = 0;
    1.20 + 	u64 metadata_profile = BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP;
    1.21 + 	u64 data_profile = BTRFS_BLOCK_GROUP_RAID0;
    1.22 +-	u32 leafsize = getpagesize();
    1.23 ++	u32 leafsize = sysconf(_SC_PAGESIZE);
    1.24 + 	u32 sectorsize = 4096;
    1.25 + 	u32 nodesize = leafsize;
    1.26 + 	u32 stripesize = 4096;
    1.27 +@@ -398,7 +398,7 @@ int main(int ac, char **av)
    1.28 + 				print_usage();
    1.29 + 		}
    1.30 + 	}
    1.31 +-	sectorsize = max(sectorsize, (u32)getpagesize());
    1.32 ++	sectorsize = max(sectorsize, (u32)sysconf(_SC_PAGESIZE));
    1.33 + 	if (leafsize < sectorsize || (leafsize & (sectorsize - 1))) {
    1.34 + 		fprintf(stderr, "Illegal leafsize %u\n", leafsize);
    1.35 + 		exit(1);