vcpkg/ports/opencv3/0015-fix-supportqnx.patch

20 lines
716 B
Diff
Raw Normal View History

--- a/modules/core/src/system.cpp
+++ b/modules/core/src/system.cpp
@@ -129,11 +129,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__
+#if defined __ANDROID__ || defined __unix__ || defined __FreeBSD__ || defined __OpenBSD__ || defined __HAIKU__ || 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