summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Andrew Krasavin <noiseless-ak@yandex.ru>2022-03-03 14:35:39 +0000
committerGravatar GitHub <noreply@github.com>2022-03-03 09:35:39 -0500
commitdfc3fa9b5ae8b204ac83e3f06e4e8626f9bb2bc2 (patch)
tree83787b2537ca03dc384ec4878722f498da5e4e37
parent1dd160f9f091ac30fc83326306b96827ca32c3cd (diff)
Some trivial OpenBSD-related fixes (#1113)
-rw-r--r--absl/base/config.h4
-rw-r--r--absl/base/internal/raw_logging.cc7
-rw-r--r--absl/debugging/internal/elf_mem_image.h4
3 files changed, 8 insertions, 7 deletions
diff --git a/absl/base/config.h b/absl/base/config.h
index 373aa0cc..acbdb75c 100644
--- a/absl/base/config.h
+++ b/absl/base/config.h
@@ -414,7 +414,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
defined(_AIX) || defined(__ros__) || defined(__native_client__) || \
defined(__asmjs__) || defined(__wasm__) || defined(__Fuchsia__) || \
defined(__sun) || defined(__ASYLO__) || defined(__myriad2__) || \
- defined(__HAIKU__)
+ defined(__HAIKU__) || defined(__OpenBSD__)
#define ABSL_HAVE_MMAP 1
#endif
@@ -425,7 +425,7 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' ||
#ifdef ABSL_HAVE_PTHREAD_GETSCHEDPARAM
#error ABSL_HAVE_PTHREAD_GETSCHEDPARAM cannot be directly set
#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
- defined(_AIX) || defined(__ros__)
+ defined(_AIX) || defined(__ros__) || defined(__OpenBSD__)
#define ABSL_HAVE_PTHREAD_GETSCHEDPARAM 1
#endif
diff --git a/absl/base/internal/raw_logging.cc b/absl/base/internal/raw_logging.cc
index 074e026a..509d7460 100644
--- a/absl/base/internal/raw_logging.cc
+++ b/absl/base/internal/raw_logging.cc
@@ -36,8 +36,8 @@
// This preprocessor token is also defined in raw_io.cc. If you need to copy
// this, consider moving both to config.h instead.
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
- defined(__Fuchsia__) || defined(__native_client__) || \
- defined(__EMSCRIPTEN__) || defined(__ASYLO__)
+ defined(__Fuchsia__) || defined(__native_client__) || \
+ defined(__OpenBSD__) || defined(__EMSCRIPTEN__) || defined(__ASYLO__)
#include <unistd.h>
@@ -50,7 +50,8 @@
// ABSL_HAVE_SYSCALL_WRITE is defined when the platform provides the syscall
// syscall(SYS_write, /*int*/ fd, /*char* */ buf, /*size_t*/ len);
// 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>
#define ABSL_HAVE_SYSCALL_WRITE 1
#define ABSL_LOW_LEVEL_WRITE_SUPPORTED 1
diff --git a/absl/debugging/internal/elf_mem_image.h b/absl/debugging/internal/elf_mem_image.h
index a894bd42..be20256f 100644
--- a/absl/debugging/internal/elf_mem_image.h
+++ b/absl/debugging/internal/elf_mem_image.h
@@ -31,8 +31,8 @@
#error ABSL_HAVE_ELF_MEM_IMAGE cannot be directly set
#endif
-#if defined(__ELF__) && !defined(__native_client__) && !defined(__asmjs__) && \
- !defined(__wasm__)
+#if defined(__ELF__) && !defined(__OpenBSD__) && \
+ !defined(__native_client__) && !defined(__asmjs__) && !defined(__wasm__)
#define ABSL_HAVE_ELF_MEM_IMAGE 1
#endif