aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2019-06-29 18:19:05 -0500
committerRich Felker <dalias@aerifal.cx>2019-07-10 17:10:59 -0400
commitc225e6c1a4e6a89447cb00a71f50ae00f8f5ec3f (patch)
tree16d52eb2c2a730ec9e831adccafb76ddad641d6c
parent05eb8ea0607d8886b95e083abd10c5122b475a1a (diff)
downloadmusl-c225e6c1a4e6a89447cb00a71f50ae00f8f5ec3f.zip
musl-c225e6c1a4e6a89447cb00a71f50ae00f8f5ec3f.tar.gz
musl-c225e6c1a4e6a89447cb00a71f50ae00f8f5ec3f.tar.bz2
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. Maintainer's note: This change also fixes a regression in quality of code generation -- multiple references to errno in a single function started generating multiple calls again -- introduced by commit e13063aad7aee341d278d2a879a76ec7b59b2ad8.
-rw-r--r--src/include/errno.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/errno.h b/src/include/errno.h
index 54a38ff..8ec4937 100644
--- a/src/include/errno.h
+++ b/src/include/errno.h
@@ -3,6 +3,9 @@
#include "../../include/errno.h"
+#ifdef __GNUC__
+__attribute__((const))
+#endif
hidden int *___errno_location(void);
#undef errno