diff options
| author | Sébastien Marie <semarie@online.fr> | 2020-11-10 05:26:35 +0000 |
|---|---|---|
| committer | Sébastien Marie <semarie@online.fr> | 2020-11-10 05:26:35 +0000 |
| commit | 9d306e5c77b19fdb8a211f5460d4fd4a7d1fb915 (patch) | |
| tree | 8a132bc2fc5d933da2338fb45d1d494faf4dc448 /lib/std | |
| parent | 8784c7b581b8a21c3698c4564e2a912676adaa2e (diff) | |
| download | zig-9d306e5c77b19fdb8a211f5460d4fd4a7d1fb915.tar.gz zig-9d306e5c77b19fdb8a211f5460d4fd4a7d1fb915.zip | |
openbsd: mutex or cond destroy function could return EINVAL
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/reset_event.zig | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/std/reset_event.zig b/lib/std/reset_event.zig index a53af100db..eb43be9819 100644 --- a/lib/std/reset_event.zig +++ b/lib/std/reset_event.zig @@ -109,9 +109,12 @@ const PosixEvent = struct { } fn deinit(self: *PosixEvent) void { - // on dragonfly, *destroy() functions can return EINVAL + // on dragonfly or openbsd, *destroy() functions can return EINVAL // for statically initialized pthread structures - const err = if (builtin.os.tag == .dragonfly) os.EINVAL else 0; + const err = if (builtin.os.tag == .dragonfly or builtin.os.tag == .openbsd) + os.EINVAL + else + 0; const retm = c.pthread_mutex_destroy(&self.mutex); assert(retm == 0 or retm == err); |
