Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 29 Jun 2019 16:22:44 -0500
From: Samuel Holland <samuel@...lland.org>
To: musl@...ts.openwall.com
Cc: Samuel Holland <samuel@...lland.org>
Subject: [PATCH 2/2] use the correct attributes for ___errno_location

In the public header, __errno_location is declared with the "const"
attribute, conditional on __GNUC__. Ensure that its internal alias has
the same attributes.
---
 src/errno/__errno_location.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/errno/__errno_location.c b/src/errno/__errno_location.c
index 7f9d6027..b59919c3 100644
--- a/src/errno/__errno_location.c
+++ b/src/errno/__errno_location.c
@@ -6,4 +6,8 @@ int *__errno_location(void)
 	return &__pthread_self()->errno_val;
 }
 
-weak_alias(__errno_location, ___errno_location);
+weak_alias(__errno_location, ___errno_location)
+#ifdef __GNUC__
+__attribute__((const))
+#endif
+;
-- 
2.21.0

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.