]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: Add have_pty variable to check if pty is available
authorJordan Williams <jordan@jwillikers.com>
Mon, 22 Apr 2024 16:02:39 +0000 (11:02 -0500)
committerJordan Williams <jordan@jwillikers.com>
Wed, 24 Apr 2024 20:30:30 +0000 (15:30 -0500)
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
meson.build

index 8a732483203339632ed15579ae60a89b46e7b8ad..68d6b8bed8ec9667b1234f42e181de1f81c5d9d1 100644 (file)
@@ -796,9 +796,9 @@ int main(void) {
 have = cc.compiles(code, name : 'using __progname')
 conf.set('HAVE___PROGNAME', have ? 1 : false)
 
-have = conf.get('HAVE_PTY_H').to_string() == '1' \
-       and conf.get('HAVE_SYS_SIGNALFD_H').to_string() == '1'
-conf.set('HAVE_PTY', have ? 1 : false)
+have_pty = conf.get('HAVE_PTY_H').to_string() == '1' \
+           and conf.get('HAVE_SYS_SIGNALFD_H').to_string() == '1'
+conf.set('HAVE_PTY', have_pty ? 1 : false)
 
 have_opal_get_status= cc.has_header_symbol('linux/sed-opal.h', 'IOC_OPAL_GET_STATUS')
 conf.set('HAVE_OPAL_GET_STATUS', have_opal_get_status ? 1 : false)
@@ -3327,7 +3327,7 @@ if conf.get('HAVE_OPENAT').to_string() == '1' \
   exes += exe
 endif
 
-if conf.get('HAVE_PTY').to_string() == '1'
+if have_pty
   exe = executable(
     'test_pty',
     pty_session_c,