]> git.ipfire.org Git - thirdparty/util-linux.git/commit
BSD: Use byteswap.h and endian.h defined macos when present
authorWarner Losh <imp@FreeBSD.org>
Fri, 29 Apr 2022 21:29:44 +0000 (15:29 -0600)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Jul 2022 15:34:00 +0000 (17:34 +0200)
commite2b9eb743109e07e5f3205cceea7fdc07f8ee315
treed866899973a9abb3773d5ae403a6ca10ed954bff
parent781617b5c6243acb46ce07a77ee53b5d01a7a2eb
BSD: Use byteswap.h and endian.h defined macos when present

Newer versions of FreeBSD will have a glibc compatible
byteswap.h. Currently, this file assumes that FreeBSD requires
bswap{16,32,64} to always be defined. This isn't the case when we're
using the byteswap.h file (which is enabled by HAVE_BYTESWAP_H
define). Assume that if byteswap.h and endian.h are present, then the
proper macros are defined.  Otherwise, assume that sys/endian.h is
present and paper over the small differences between the BSDs for this
file.

Signed-off-by: Warner Losh <imp@bsdimp.com>
include/bitops.h