vcpkg/ports/opencv4/0022-fix-supportqnx.patch
2023-12-04 17:08:11 -08:00

22 lines
863 B
Diff

diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp
index 7811ab7..8f00891 100644
--- a/modules/core/src/system.cpp
+++ b/modules/core/src/system.cpp
@@ -120,11 +120,15 @@ void* allocSingletonNewBuffer(size_t size) { return malloc(size); }
#include <cstdlib> // std::abort
#endif
-#if defined __ANDROID__ || defined __unix__ || defined __FreeBSD__ || defined __OpenBSD__ || defined __HAIKU__ || defined __Fuchsia__
+#if defined __ANDROID__ || defined __unix__ || defined __FreeBSD__ || defined __OpenBSD__ || defined __HAIKU__ || defined __Fuchsia__ || defined __QNX__
# include <unistd.h>
# include <fcntl.h>
#if defined __QNX__
# include <sys/elf.h>
+# include <sys/auxv.h>
+using Elf64_auxv_t = auxv64_t;
+# include <elfdefinitions.h>
+constexpr decltype(auto) AT_HWCAP = NT_GNU_HWCAP;
#else
# include <elf.h>
#endif