]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
cmake: Fix unaligned check on big-endian systems
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Thu, 12 Sep 2019 13:46:06 +0000 (15:46 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Thu, 12 Sep 2019 13:46:06 +0000 (15:46 +0200)
commit5a189bdd416c5afb61b66871231e6dbde288a96a
tree9f6ce606b0e1c02588d321bd9b24f8f9b8ac5d5b
parent193ef136a31b7a9ddb9d1f07f9cd72e7d0230047
cmake: Fix unaligned check on big-endian systems

On big-endian systems, ntohl is a no-op, so "good" never does
any conversion.  Fix this by keeping the test constants in
big-endian (network) order and using ntohl to convert them
to native (host) byte order.

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
cmake/modules/CephChecks.cmake