about summary refs log tree commit diff
path: root/misc/sys
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@redhat.com>2022-11-11 17:00:15 -0300
committerTulio Magno Quites Machado Filho <tuliom@redhat.com>2022-11-29 15:07:22 -0300
commit227df6243a2b5b4d70d11772d12c02eb9cb666ca (patch)
tree3c4811c7f62c342178ae8b2b01c8858fa3a2fe8e /misc/sys
parent885d340f20aab989482b8a1f844a224a1656d52c (diff)
downloadglibc-227df6243a2b5b4d70d11772d12c02eb9cb666ca.tar.gz
glibc-227df6243a2b5b4d70d11772d12c02eb9cb666ca.tar.xz
glibc-227df6243a2b5b4d70d11772d12c02eb9cb666ca.zip
Apply asm redirections in syslog.h before first use [BZ #27087]
Similar to d0fa09a770, but for syslog.h when _FORTIFY_SOURCE > 0.
Fixes [BZ #27087] by applying long double-related asm redirections
before using functions in bits/syslog.h.

Tested with build-many-glibcs.py.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'misc/sys')
-rw-r--r--misc/sys/syslog.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/misc/sys/syslog.h b/misc/sys/syslog.h
index d933fea104..3888153ed2 100644
--- a/misc/sys/syslog.h
+++ b/misc/sys/syslog.h
@@ -205,11 +205,11 @@ extern void vsyslog (int __pri, const char *__fmt, __gnuc_va_list __ap)
 /* Define some macros helping to catch buffer overflows.  */
 #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
 # include <bits/syslog.h>
-#endif
-
-#include <bits/floatn.h>
-#if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# include <bits/syslog-ldbl.h>
+#else
+# include <bits/floatn.h>
+# if defined __LDBL_COMPAT || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
+#  include <bits/syslog-ldbl.h>
+# endif
 #endif
 
 __END_DECLS