diff options
author | Jordan Williams <jordan@jwillikers.com> | 2024-04-22 09:28:04 -0500 |
---|---|---|
committer | Jordan Williams <jordan@jwillikers.com> | 2024-04-24 15:30:30 -0500 |
commit | fa3bce7e0025fb921a8d05ac26288e687cd1bec5 (patch) | |
tree | 5c9b0489b15b09adc0effaab36e98ff02a0c516a | |
parent | 17146fbf1bb4c93db53bd741f1484327c729631d (diff) | |
download | util-linux-fa3bce7e0025fb921a8d05ac26288e687cd1bec5.tar.gz |
meson: Use has_type instead of sizeof to detect cpu_set_t type
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
-rw-r--r-- | meson.build | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 67181ca05f..cddeb98372 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 <sched.h>') > 0 +have_cpu_set_t = cc.has_type('cpu_set_t', args : '-D_GNU_SOURCE', prefix : '#include <sched.h>') conf.set('HAVE_CPU_SET_T', have_cpu_set_t ? 1 : false) have = cc.has_header_symbol('unistd.h', 'environ', args : '-D_GNU_SOURCE') |