[v2,2/3] use the correct attributes for ___errno_location

Submitted by Samuel Holland on June 29, 2019, 11:19 p.m.


Message ID 20190629231906.64452-3-samuel@sholland.org
State New
Series "Resolve compiler warnings in master"
Headers show

Commit Message

Samuel Holland June 29, 2019, 11:19 p.m.
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/include/errno.h | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

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__
 hidden int *___errno_location(void);
 #undef errno