Pārlūkot izejas kodu

Merge pull request #2046 from enkore/issue/2043

crc: openbsd has no Intel intrinsics
enkore 8 gadi atpakaļ
vecāks
revīzija
77e2416ee6
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      src/borg/_crc32/crc32.c

+ 6 - 0
src/borg/_crc32/crc32.c

@@ -8,6 +8,11 @@
  * target attributes or the options stack. So we disable this faster code path for clang.
  * target attributes or the options stack. So we disable this faster code path for clang.
  */
  */
 #ifndef __clang__
 #ifndef __clang__
+/*
+ * While OpenBSD uses GCC, they don't have Intel intrinsics, so we can't compile this code
+ * on OpenBSD.
+ */
+#ifndef __OpenBSD__
 #if __x86_64__
 #if __x86_64__
 /*
 /*
  * Because we don't want a configure script we need compiler-dependent pre-defined macros for detecting this,
  * Because we don't want a configure script we need compiler-dependent pre-defined macros for detecting this,
@@ -59,6 +64,7 @@
 #endif
 #endif
 
 
 #endif /* if __x86_64__ */
 #endif /* if __x86_64__ */
+#endif /* ifndef __OpenBSD__ */
 #endif /* ifndef __clang__ */
 #endif /* ifndef __clang__ */
 #endif /* ifdef __GNUC__ */
 #endif /* ifdef __GNUC__ */