util: fix util_cpu_detect_once() build on OpenBSD
authorJonathan Gray <jsg@jsg.id.au>
Wed, 20 Oct 2021 00:58:01 +0000 (11:58 +1100)
committerMarge Bot <emma+marge@anholt.net>
Sat, 26 Feb 2022 01:00:29 +0000 (01:00 +0000)
commitafece589dc6c5227ac61502f809184090fe83da1
treeec849e2d811b40e39497d8ef10e6a826c49de38e
parent623ff4ec4295dc67bc0c99ed5336eaae1ad76cc9
util: fix util_cpu_detect_once() build on OpenBSD

Correct type for sysctl argument to fix the build.

../src/util/u_cpu_detect.c:631:29: error: incompatible pointer types passing 'int *' to parameter of type 'size_t *' (aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types]
      sysctl(mib, 2, &ncpu, &len, NULL, 0);
                            ^~~~

Fixes: 5623c75e40b ("util: Fix setting nr_cpus on some BSD variants")
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13448>
src/util/u_cpu_detect.c