From 16a196e81034a5bc3fbc7dd20d99818dbb291a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Moj=C5=BE=C3=AD=C5=A1?= Date: Sat, 16 Jul 2022 16:57:58 +0200 Subject: [PATCH] sysdep/hasutmp{,x}addrv6.h-yes.c update test detects if 'struct utmp{,x}' has '.ut_addr_v6' in compilation phase --- sysdep/hasutmpaddrv6.h-yes.c | 4 ++-- sysdep/hasutmpxaddrv6.h-yes.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sysdep/hasutmpaddrv6.h-yes.c b/sysdep/hasutmpaddrv6.h-yes.c index 5c7fd7f..0e4df93 100644 --- a/sysdep/hasutmpaddrv6.h-yes.c +++ b/sysdep/hasutmpaddrv6.h-yes.c @@ -6,6 +6,6 @@ int main(void) { struct utmp ut; - if (sizeof ut.ut_addr_v6 < 16) return 111; - return 0; + int x[sizeof(ut.ut_addr_v6) < 16 ? -1 : 1] = {0}; + return x[0]; } diff --git a/sysdep/hasutmpxaddrv6.h-yes.c b/sysdep/hasutmpxaddrv6.h-yes.c index e3d3163..04011c3 100644 --- a/sysdep/hasutmpxaddrv6.h-yes.c +++ b/sysdep/hasutmpxaddrv6.h-yes.c @@ -6,6 +6,6 @@ int main(void) { struct utmpx utx; - if (sizeof utx.ut_addr_v6 < 16) return 111; - return 0; + int x[sizeof(utx.ut_addr_v6) < 16 ? -1 : 1] = {0}; + return x[0]; }