]> git.proxmox.com Git - mirror_zfs.git/commitdiff
libzpool: set_global_var: fix endianness handling (fixes zdb -o )
authorChristian Schwarz <me@cschwarz.com>
Mon, 15 Feb 2021 12:02:32 +0000 (13:02 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 5 Mar 2021 20:51:48 +0000 (12:51 -0800)
Without this patch I get the error

  Setting global variables is only supported on little-endian systems

when using `zdb -o` on my amd64 machine.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com>
Signed-off-by: Christian Schwarz <me@cschwarz.com>
Closes #11602

lib/libzpool/util.c

index ebfaa9b41a2a679d288a6582051a83c532d9dadf..13d585299c6bbdc80c1362423783f86ed624d8ec 100644 (file)
@@ -159,7 +159,7 @@ set_global_var(char *arg)
        char *varname = arg, *varval;
        u_longlong_t val;
 
-#ifndef _LITTLE_ENDIAN
+#ifndef _ZFS_LITTLE_ENDIAN
        /*
         * On big endian systems changing a 64-bit variable would set the high
         * 32 bits instead of the low 32 bits, which could cause unexpected