From: Samuel Holland Date: Sat, 29 Jun 2019 23:19:05 +0000 (-0500) Subject: use the correct attributes for ___errno_location X-Git-Tag: v1.1.23~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c225e6c1a4e6a89447cb00a71f50ae00f8f5ec3f;p=oweals%2Fmusl.git 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. --- diff --git a/src/include/errno.h b/src/include/errno.h index 54a38ff4..8ec49377 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