Commit e7b3ea6774 for perl
commit e7b3ea677452cadba536407b4dea0718669b1438
Author: Yves Orton <demerphq@gmail.com>
Date: Mon Nov 16 16:52:34 2026 +0100
Configure: fix the time header probe with -Werror
Clang warns about comparing a field with itself. With -Werror this makes
Configure skip <sys/time.h>. Use sizeof to check the fields without
reading uninitialized values.
diff --git a/Configure b/Configure
index b46c65d7b2..e8e7067048 100755
--- a/Configure
+++ b/Configure
@@ -10869,13 +10869,11 @@ int main()
#ifdef S_TIMEZONE
struct timezone tzp;
#endif
- if (foo.tm_sec == foo.tm_sec)
- exit(0);
+ (void)sizeof(foo.tm_sec);
#ifdef S_TIMEVAL
- if (bar.tv_sec == bar.tv_sec)
- exit(0);
+ (void)sizeof(bar.tv_sec);
#endif
- exit(1);
+ exit(0);
}
EOCP
flags=''