From fa3bce7e0025fb921a8d05ac26288e687cd1bec5 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Mon, 22 Apr 2024 09:28:04 -0500 Subject: [PATCH] meson: Use has_type instead of sizeof to detect cpu_set_t type Signed-off-by: Jordan Williams --- meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 67181ca05..cddeb9837 100644 --- a/meson.build +++ b/meson.build @@ -460,8 +460,7 @@ endforeach have = cc.has_header('sched.h') conf.set10('HAVE_DECL_CPU_ALLOC', have) -# We get -1 if the size cannot be determined -have_cpu_set_t = cc.sizeof('cpu_set_t', prefix : '#define _GNU_SOURCE\n#include ') > 0 +have_cpu_set_t = cc.has_type('cpu_set_t', args : '-D_GNU_SOURCE', prefix : '#include ') conf.set('HAVE_CPU_SET_T', have_cpu_set_t ? 1 : false) have = cc.has_header_symbol('unistd.h', 'environ', args : '-D_GNU_SOURCE') -- 2.47.3