From 229416a6f45b52faaed2f645b15f2a7ef384f7f4 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Thu, 28 Nov 2019 02:19:36 +0300 Subject: [PATCH] mdbx-test: fix SEM_A/SEM_R for NetBSD. --- test/osal-unix.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/osal-unix.cc b/test/osal-unix.cc index 1deb2f50..4b8694c7 100644 --- a/test/osal-unix.cc +++ b/test/osal-unix.cc @@ -131,6 +131,12 @@ void osal_setup(const std::vector &actors) { if (ipc_overlord_pid) failure("ipc already created by %ld pid", (long)ipc_overlord_pid); ipc_overlord_pid = getpid(); +#ifndef SEM_A +#define SEM_A S_IRUSR +#endif +#ifndef SEM_R +#define SEM_R S_IWUSR +#endif ipc = semget(IPC_PRIVATE, actors.size() + 2, IPC_CREAT | SEM_A | SEM_R); if (ipc < 0) failure_perror("semget(IPC_PRIVATE, shared_sems)", errno);