Merge pull request #24140 from sthibaul:4.x

Fix GNU/Hurd build
This commit is contained in:
Alexander Smorkalov 2023-08-11 12:32:22 +03:00 committed by GitHub
commit 232c67bf76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -12,7 +12,8 @@
# elif defined WINRT || defined _WIN32_WCE
/* not supported */
# elif defined __ANDROID__ || defined __linux__ || defined _WIN32 || \
defined __FreeBSD__ || defined __bsdi__ || defined __HAIKU__
defined __FreeBSD__ || defined __bsdi__ || defined __HAIKU__ || \
defined __GNU__
# define OPENCV_HAVE_FILESYSTEM_SUPPORT 1
# elif defined(__APPLE__)
# include <TargetConditionals.h>

View File

@ -34,7 +34,7 @@
#include <errno.h>
#include <io.h>
#include <stdio.h>
#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__ || defined __FreeBSD__
#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__ || defined __FreeBSD__ || defined __GNU__
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@ -343,7 +343,7 @@ private:
Impl& operator=(const Impl&); // disabled
};
#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__ || defined __FreeBSD__
#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__ || defined __FreeBSD__ || defined __GNU__
struct FileLock::Impl
{
@ -457,7 +457,7 @@ cv::String getCacheDirectory(const char* sub_directory_name, const char* configu
default_cache_path = "/tmp/";
CV_LOG_WARNING(NULL, "Using world accessible cache directory. This may be not secure: " << default_cache_path);
}
#elif defined __linux__ || defined __HAIKU__ || defined __FreeBSD__
#elif defined __linux__ || defined __HAIKU__ || defined __FreeBSD__ || defined __GNU__
// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
if (default_cache_path.empty())
{