util: use correct type in sysctl argument
Fixes build on OpenBSD/macppc powerpc
error: incompatible pointer types passing 'int *' to parameter of type 'size_t *'
(aka 'unsigned long *') [-Werror,-Wincompatible-pointer-types]
Fixes: 01bd21eef8 ("gallium: Import Dennis Smit cpu detection code.")
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/6511>
This commit is contained in:
@@ -136,7 +136,7 @@ check_os_altivec_support(void)
|
||||
int sels[2] = {CTL_MACHDEP, CPU_ALTIVEC};
|
||||
#endif
|
||||
int has_vu = 0;
|
||||
int len = sizeof (has_vu);
|
||||
size_t len = sizeof (has_vu);
|
||||
int err;
|
||||
|
||||
err = sysctl(sels, 2, &has_vu, &len, NULL, 0);
|
||||
|
||||
Reference in New Issue
Block a user