- Add elf_aux_info() support for OpenBSD
  https://github.com/facebook/rocksdb/pull/12967

https://jira.mariadb.org/browse/MDEV-29875

Index: storage/rocksdb/rocksdb/util/crc32c.cc
--- storage/rocksdb/rocksdb/util/crc32c.cc.orig
+++ storage/rocksdb/rocksdb/util/crc32c.cc
@@ -42,10 +42,12 @@
 #define AT_HWCAP2 26
 #endif
 
-#elif __FreeBSD__
+#elif __FreeBSD__ && ROCKSDB_AUXV_ELF_AUX_INFO_PRESENT
 #include <machine/cpu.h>
 #include <sys/auxv.h>
 #include <sys/elf_common.h>
+#elif __OpenBSD__ && ROCKSDB_AUXV_ELF_AUX_INFO_PRESENT
+#include <sys/auxv.h>
 #endif /* __linux__ */
 
 #endif
@@ -476,12 +478,12 @@ static int arch_ppc_probe(void) {
 
   return arch_ppc_crc32;
 }
-#elif __FreeBSD__
+#elif __FreeBSD__ || __OpenBSD__
 static int arch_ppc_probe(void) {
   unsigned long cpufeatures;
   arch_ppc_crc32 = 0;
 
-#if defined(__powerpc64__)
+#if defined(__powerpc64__) && defined(ROCKSDB_AUXV_ELF_AUX_INFO_PRESENT)
   elf_aux_info(AT_HWCAP2, &cpufeatures, sizeof(cpufeatures));
   if (cpufeatures & PPC_FEATURE2_HAS_VEC_CRYPTO) arch_ppc_crc32 = 1;
 #endif  /* __powerpc64__ */
