Commit dfc3fa9b by Andrew Krasavin Committed by GitHub

Some trivial OpenBSD-related fixes (#1113)

parent 1dd160f9
...@@ -414,7 +414,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || ...@@ -414,7 +414,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
defined(_AIX) || defined(__ros__) || defined(__native_client__) || \ defined(_AIX) || defined(__ros__) || defined(__native_client__) || \
defined(__asmjs__) || defined(__wasm__) || defined(__Fuchsia__) || \ defined(__asmjs__) || defined(__wasm__) || defined(__Fuchsia__) || \
defined(__sun) || defined(__ASYLO__) || defined(__myriad2__) || \ defined(__sun) || defined(__ASYLO__) || defined(__myriad2__) || \
defined(__HAIKU__) defined(__HAIKU__) || defined(__OpenBSD__)
#define ABSL_HAVE_MMAP 1 #define ABSL_HAVE_MMAP 1
#endif #endif
...@@ -425,7 +425,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || ...@@ -425,7 +425,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
#ifdef ABSL_HAVE_PTHREAD_GETSCHEDPARAM #ifdef ABSL_HAVE_PTHREAD_GETSCHEDPARAM
#error ABSL_HAVE_PTHREAD_GETSCHEDPARAM cannot be directly set #error ABSL_HAVE_PTHREAD_GETSCHEDPARAM cannot be directly set
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
defined(_AIX) || defined(__ros__) defined(_AIX) || defined(__ros__) || defined(__OpenBSD__)
#define ABSL_HAVE_PTHREAD_GETSCHEDPARAM 1 #define ABSL_HAVE_PTHREAD_GETSCHEDPARAM 1
#endif #endif
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
// this, consider moving both to config.h instead. // this, consider moving both to config.h instead.
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
defined(__Fuchsia__) || defined(__native_client__) || \ defined(__Fuchsia__) || defined(__native_client__) || \
defined(__EMSCRIPTEN__) || defined(__ASYLO__) defined(__OpenBSD__) || defined(__EMSCRIPTEN__) || defined(__ASYLO__)
#include <unistd.h> #include <unistd.h>
...@@ -50,7 +50,8 @@ ...@@ -50,7 +50,8 @@
// ABSL_HAVE_SYSCALL_WRITE is defined when the platform provides the syscall // ABSL_HAVE_SYSCALL_WRITE is defined when the platform provides the syscall
// syscall(SYS_write, /*int*/ fd, /*char* */ buf, /*size_t*/ len); // syscall(SYS_write, /*int*/ fd, /*char* */ buf, /*size_t*/ len);
// for low level operations that want to avoid libc. // for low level operations that want to avoid libc.
#if (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__) #if (defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)) && \
!defined(__ANDROID__)
#include <sys/syscall.h> #include <sys/syscall.h>
#define ABSL_HAVE_SYSCALL_WRITE 1 #define ABSL_HAVE_SYSCALL_WRITE 1
#define ABSL_LOW_LEVEL_WRITE_SUPPORTED 1 #define ABSL_LOW_LEVEL_WRITE_SUPPORTED 1
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
#error ABSL_HAVE_ELF_MEM_IMAGE cannot be directly set #error ABSL_HAVE_ELF_MEM_IMAGE cannot be directly set
#endif #endif
#if defined(__ELF__) && !defined(__native_client__) && !defined(__asmjs__) && \ #if defined(__ELF__) && !defined(__OpenBSD__) && \
!defined(__wasm__) !defined(__native_client__) && !defined(__asmjs__) && !defined(__wasm__)
#define ABSL_HAVE_ELF_MEM_IMAGE 1 #define ABSL_HAVE_ELF_MEM_IMAGE 1
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment