From 2486dd20e5c83571572848f0c20c591b27ba3c45 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 22 May 2009 16:27:59 -0700 Subject: [PATCH 1/2] Set LP64 for powerpc64 and LP32 for just powerpc. --- lib/libspl/include/sys/isa_defs.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libspl/include/sys/isa_defs.h b/lib/libspl/include/sys/isa_defs.h index bf93db4782..65e695adeb 100644 --- a/lib/libspl/include/sys/isa_defs.h +++ b/lib/libspl/include/sys/isa_defs.h @@ -69,7 +69,7 @@ extern "C" { #define _SUNOS_VTOC_16 -/* powerpc (ppc64) arch specific defines */ +/* powerpc arch specific defines */ #elif defined(__powerpc) || defined(__powerpc__) #if !defined(__powerpc) @@ -81,7 +81,11 @@ extern "C" { #endif #if !defined(_LP64) +#ifdef __powerpc64__ #define _LP64 +#else +#define _LP32 +#endif #endif #define _SUNOS_VTOC_16 From 8e9605062a335e152d0056005f3a093223c98cbc Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 22 May 2009 16:30:47 -0700 Subject: [PATCH 2/2] Explictly use signed char for portability. On x86/x86_64 systems the default char type is signed, on ppc/ppc64 systems the default char type is unsigned. --- cmd/zfs/zfs_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index b412b57520..c73fb93219 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -1495,7 +1495,7 @@ zfs_do_upgrade(int argc, char **argv) boolean_t showversions = B_FALSE; int ret; upgrade_cbdata_t cb = { 0 }; - char c; + signed char c; int flags = ZFS_ITER_ARGS_CAN_BE_PATHS; /* check options */ @@ -2251,7 +2251,7 @@ zfs_do_snapshot(int argc, char **argv) { boolean_t recursive = B_FALSE; int ret; - char c; + signed char c; nvlist_t *props; if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) {