util: Allow kcmp on FreeBSD

FreeBSD now have kcmp(2) syscall, use it.

Signed-off-by: Emmanuel Vadot <manu@FreeBSD.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27184>
This commit is contained in:
Emmanuel Vadot 2024-01-21 15:03:29 +01:00 committed by Marge Bot
parent 3a00d80c67
commit 464e8aaff4

View file

@ -194,13 +194,15 @@ os_read_file(const char *filename, size_t *size)
return buf;
}
#if DETECT_OS_LINUX && ALLOW_KCMP
#if (DETECT_OS_LINUX || DETECT_OS_FREEBSD) && ALLOW_KCMP
#include <sys/syscall.h>
#include <unistd.h>
#if DETECT_OS_LINUX
/* copied from <linux/kcmp.h> */
#define KCMP_FILE 0
#endif
#endif