Skip to content

Commit

Permalink
Fix building on OpenBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
brad0 committed Apr 18, 2023
1 parent b2c11c3 commit 372db9a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libutil/strutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static std::mutex output_mutex;

// On systems that support it, get a location independent locale.
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \
|| defined(__FreeBSD_kernel__) || defined(__GLIBC__)
|| defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__GLIBC__)
static locale_t c_loc = newlocale(LC_ALL_MASK, "C", nullptr);
#elif defined(_WIN32)
static _locale_t c_loc = _create_locale(LC_ALL, "C");
Expand Down Expand Up @@ -451,7 +451,7 @@ inline int
strcasecmp(const char* a, const char* b)
{
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \
|| defined(__FreeBSD_kernel__) || defined(__GLIBC__)
|| defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__GLIBC__)
return strcasecmp_l(a, b, c_loc);
#elif defined(_WIN32)
return _stricmp_l(a, b, c_loc);
Expand All @@ -465,7 +465,7 @@ inline int
strncasecmp(const char* a, const char* b, size_t size)
{
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \
|| defined(__FreeBSD_kernel__) || defined(__GLIBC__)
|| defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__GLIBC__)
return strncasecmp_l(a, b, size, c_loc);
#elif defined(_WIN32)
return _strnicmp_l(a, b, size, c_loc);
Expand Down

0 comments on commit 372db9a

Please sign in to comment.