From d8c333ecf179b652eaabf71a512aebc1864f6bf7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 17 May 2022 10:31:49 +0200 Subject: Use posix_spawn() on OpenBSD 5.2 or later --- libbutl/process.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libbutl/process.cxx b/libbutl/process.cxx index 5523b96..a19719f 100644 --- a/libbutl/process.cxx +++ b/libbutl/process.cxx @@ -47,6 +47,14 @@ # elif defined(__NetBSD__) && __NetBSD__ >= 6 # define LIBBUTL_POSIX_SPAWN // +// On OpenBSD posix_spawn() appeared in 5.2 (see the man page for details). +// +# elif defined(__OpenBSD__) +# include // OpenBSD (yyyymm) +# if OpenBSD >= 201211 // 5.2 released on 1 Nov 2012. +# define LIBBUTL_POSIX_SPAWN +# endif +// // posix_spawn() appeared in Version 3 of the Single UNIX Specification that // was implemented in MacOS 10.5 (see the man page for details). // -- cgit v1.1