Skip to content

Commit

Permalink
libzpool: set_global_var: fix endianness handling (fixes zdb -o )
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Pavel Zakharov <[email protected]>
Signed-off-by: Christian Schwarz <[email protected]>
Closes openzfs#11602
  • Loading branch information
problame authored and jsai20 committed Mar 30, 2021
1 parent c3c3970 commit e1c29e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libzpool/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e1c29e5

Please sign in to comment.