mirror of
https://github.com/opencv/opencv.git
synced 2025-06-18 08:05:23 +08:00
Merge pull request #14628 from devnexen:openbsd_build_fix
This commit is contained in:
commit
6c6dd16acf
@ -21,7 +21,7 @@ using namespace std;
|
|||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#elif defined(__linux__) || defined(__APPLE__)
|
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__)
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ namespace cv { namespace impl {
|
|||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
typedef HMODULE LibHandle_t;
|
typedef HMODULE LibHandle_t;
|
||||||
#elif defined(__linux__) || defined(__APPLE__)
|
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__)
|
||||||
typedef void* LibHandle_t;
|
typedef void* LibHandle_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ void* getSymbol_(LibHandle_t h, const char* symbolName)
|
|||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
return (void*)GetProcAddress(h, symbolName);
|
return (void*)GetProcAddress(h, symbolName);
|
||||||
#elif defined(__linux__) || defined(__APPLE__)
|
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__)
|
||||||
return dlsym(h, symbolName);
|
return dlsym(h, symbolName);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ LibHandle_t libraryLoad_(const char* filename)
|
|||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
return LoadLibraryA(filename);
|
return LoadLibraryA(filename);
|
||||||
#elif defined(__linux__) || defined(__APPLE__)
|
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__)
|
||||||
return dlopen(filename, RTLD_LAZY);
|
return dlopen(filename, RTLD_LAZY);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ void libraryRelease_(LibHandle_t h)
|
|||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
FreeLibrary(h);
|
FreeLibrary(h);
|
||||||
#elif defined(__linux__) || defined(__APPLE__)
|
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__)
|
||||||
dlclose(h);
|
dlclose(h);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -238,6 +238,10 @@ make & enjoy!
|
|||||||
#include <sys/videoio.h>
|
#include <sys/videoio.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __OpenBSD__
|
||||||
|
typedef uint32_t __u32;
|
||||||
|
#endif
|
||||||
|
|
||||||
// https://github.com/opencv/opencv/issues/13335
|
// https://github.com/opencv/opencv/issues/13335
|
||||||
#ifndef V4L2_CID_ISO_SENSITIVITY
|
#ifndef V4L2_CID_ISO_SENSITIVITY
|
||||||
#define V4L2_CID_ISO_SENSITIVITY (V4L2_CID_CAMERA_CLASS_BASE+23)
|
#define V4L2_CID_ISO_SENSITIVITY (V4L2_CID_CAMERA_CLASS_BASE+23)
|
||||||
|
Loading…
Reference in New Issue
Block a user