From f40e814fcb08513314d820187cdf365a0f0aee26 Mon Sep 17 00:00:00 2001 From: Tom Russo Date: Thu, 9 Jan 2020 12:40:55 -0700 Subject: [PATCH] Fix fsio compilation on FreeBSD Just tried to build fsio on FreeBSD and found it complaining about unknown functions letoh32. Turns out that the attempt to make this portable to FreeBSD is incorrectly assuming that FreeBSD should be like NetBSD, when in fact it is more like OpenBSD in this regard. Moving the defined(__FreeBSD__) so it selects the same block as __OpenBSD__ makes fsio build correctly on FreeBSD 11 (and presumably later). --- converters/fsio/fsio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/converters/fsio/fsio.h b/converters/fsio/fsio.h index 8da3f1f..11c566f 100644 --- a/converters/fsio/fsio.h +++ b/converters/fsio/fsio.h @@ -55,13 +55,13 @@ enum openMode { M_RD, M_WR }; #define le32toh(x) OSSwapLittleToHostInt32(x) #elif defined(__linux__) #include -#elif defined(__FreeBSD__) || defined(__NetBSD__) +#elif defined(__NetBSD__) #include #define le16toh(x) letoh16(x) #define le32toh(x) letoh32(x) -#elif defined(__OpenBSD__) +#elif defined(__FreeBSD__) || defined(__OpenBSD__) #include #endif