util/anon_file: add OpenBSD shm_mkstemp() path
authorJonathan Gray <jsg@jsg.id.au>
Thu, 1 Nov 2018 02:16:13 +0000 (13:16 +1100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 31 Aug 2020 09:14:57 +0000 (09:14 +0000)
commit6e9c0661f8538cdabe7d7de73af11b4165f51f93
tree70398d698e288ca21d7833728d1560b1db05c8b5
parent7eab6845e9dd49f0ef0bf9a7d986aaf685e77981
util/anon_file: add OpenBSD shm_mkstemp() path

memfd_create() is a linux syscall replace the use of it with
shm_mkstemp() on OpenBSD.

unconditionally include stdlib.h for mkstemp()/mkostemp()

Fixes: c0376a12341 ("util: add anon_file.h for all memfd/temp file usage")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>
src/util/anon_file.c