From cfd640c3e8ddef3c3e5e1f54ff4938be8ae593c1 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 9 Sep 2025 10:56:38 -0600 Subject: [PATCH] Fix warnings about sha2_is_supported on FreeBSD/i386 This is one problem currently preventing OpenZFS from building on FreeBSD/i386. Reviewed-by: Alexander Motin Reviewed-by: Brian Behlendorf Signed-off-by: Alan Somers Sponsored by: ConnectWise Closes #17704 --- module/icp/algs/sha2/sha256_impl.c | 3 +++ module/icp/algs/sha2/sha512_impl.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/module/icp/algs/sha2/sha256_impl.c b/module/icp/algs/sha2/sha256_impl.c index 6d3bcca9f..dcb0a391d 100644 --- a/module/icp/algs/sha2/sha256_impl.c +++ b/module/icp/algs/sha2/sha256_impl.c @@ -38,11 +38,14 @@ kfpu_begin(); E(s, d, b); kfpu_end(); \ } +#if defined(__x86_64) || defined(__aarch64__) || defined(__arm__) || \ + defined(__PPC64__) /* some implementation is always okay */ static inline boolean_t sha2_is_supported(void) { return (B_TRUE); } +#endif #if defined(__x86_64) diff --git a/module/icp/algs/sha2/sha512_impl.c b/module/icp/algs/sha2/sha512_impl.c index 2efd9fcf4..a85a71a83 100644 --- a/module/icp/algs/sha2/sha512_impl.c +++ b/module/icp/algs/sha2/sha512_impl.c @@ -38,11 +38,14 @@ kfpu_begin(); E(s, d, b); kfpu_end(); \ } +#if defined(__x86_64) || defined(__aarch64__) || defined(__arm__) || \ + defined(__aarch64__) || defined(__arm__) || defined(__PPC64__) /* some implementation is always okay */ static inline boolean_t sha2_is_supported(void) { return (B_TRUE); } +#endif #if defined(__x86_64)