anolis-glibc/glibc-rh1505492-undef-mktime.patch
zhangbinchen ff0128648f import glibc-2.17-292.el7.src.rpm
Signed-off-by: zhangbinchen <zhangbinchen@openanolis.org>
2021-08-21 12:40:25 +08:00

30 lines
779 B
Diff
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Fix -Wundef warnings. Part of this upstream commit:
commit dd0ba018122e88937a5f14b6594b9a40693b2e58
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Sat Jun 28 06:15:54 2014 +0530
Sync up mktime with gnulib
diff --git a/time/mktime.c b/time/mktime.c
index e1fbf9ea197d3c8b..bc914d80593b91f2 100644
--- a/time/mktime.c
+++ b/time/mktime.c
@@ -38,7 +38,7 @@
#include <string.h> /* For the real memcpy prototype. */
-#if DEBUG
+#if defined DEBUG && DEBUG
# include <stdio.h>
# include <stdlib.h>
/* Make it work even if the system's libc has its own mktime routine. */
@@ -600,7 +600,7 @@ libc_hidden_def (mktime)
libc_hidden_weak (timelocal)
#endif
-#if DEBUG
+#if defined DEBUG && DEBUG
static int
not_equal_tm (const struct tm *a, const struct tm *b)