--- src/builders/residfp-builder/residfp/resample/SincResampler.cpp
+++ src/builders/residfp-builder/residfp/resample/SincResampler.cpp
@@ -25,7 +25,11 @@
 #include <algorithm>
 #include <iterator>
 #include <numeric>
-#include <version>
+#ifdef __has_include
+#  if __has_include(<version>)
+#    include <version>
+#  endif
+#endif
 #include <cassert>
 #include <cstring>
 #include <cmath>
@@ -94,8 +98,10 @@ double I0(double x)
  */
 int convolve(const int* a, const short* b, int bLength)
 {
-#if defined(__has_cpp_attribute) && __has_cpp_attribute( assume )
+#if defined(__has_cpp_attribute)
+#  if __has_cpp_attribute( assume )
     [[assume( bLength > 0 )]];
+#  endif
 #endif
     int out = 0;
 #ifndef __clang__
--- src/simpleMixer.h
+++ src/simpleMixer.h
@@ -25,7 +25,11 @@
 #define SIMPLEMIXER_H
 
 #include <vector>
-#include <version>
+#ifdef __has_include
+#  if __has_include(<version>)
+#    include <version>
+#  endif
+#endif
 #include <cstdint>
 
 #ifdef __cpp_lib_math_constants
