[Sanitizer] openbsd build fix
sysctl has a different signature under OpenBSD
Reviewers: krytarowski
#endif
#if SANITIZER_OPENBSD
#include <sys/futex.h>
+#include <sys/sysctl.h>
#endif
#include <unistd.h>
@@ -818,7 +819,12 @@ int internal_fork() {
#if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_OPENBSD
int internal_sysctl(const int *name, unsigned int namelen, void *oldp,
uptr *oldlenp, const void *newp, uptr newlen) {
+#if SANITIZER_OPENBSD
+ return sysctl(name, namelen, oldp, (size_t *)oldlenp, (void *)newp,
+ (size_t)newlen);
+#else
return sysctl(name, namelen, oldp, (size_t *)oldlenp, newp, (size_t)newlen);
+#endif
}
#endif
