mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
Haiku: build fix
Haiku is POSIX compatible
This commit is contained in:
parent
a10d289997
commit
da0fd62c23
@ -21,7 +21,7 @@ using namespace std;
|
|||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__GLIBC__)
|
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__HAIKU__) || defined(__GLIBC__)
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -77,7 +77,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__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__GLIBC__)
|
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__HAIKU__) || defined(__GLIBC__)
|
||||||
return dlsym(h, symbolName);
|
return dlsym(h, symbolName);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ LibHandle_t libraryLoad_(const FileSystemPath_t& filename)
|
|||||||
# else
|
# else
|
||||||
return LoadLibraryW(filename.c_str());
|
return LoadLibraryW(filename.c_str());
|
||||||
#endif
|
#endif
|
||||||
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__GLIBC__)
|
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__HAIKU__) || defined(__GLIBC__)
|
||||||
return dlopen(filename.c_str(), RTLD_LAZY);
|
return dlopen(filename.c_str(), RTLD_LAZY);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -101,7 +101,7 @@ void libraryRelease_(LibHandle_t h)
|
|||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
FreeLibrary(h);
|
FreeLibrary(h);
|
||||||
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__GLIBC__)
|
#elif defined(__linux__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__HAIKU__) || defined(__GLIBC__)
|
||||||
dlclose(h);
|
dlclose(h);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user