about summary refs log tree commit diff
path: root/include/netdb.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-10-16 13:48:10 -0400
committerRich Felker <dalias@aerifal.cx>2018-10-16 14:10:27 -0400
commitbf453d68393f7eea5965319e21311e56d71fa53c (patch)
tree3a71e0b3d8251b38863f71dbc634e3ed3dbba98d /include/netdb.h
parent1c84c99913bf1cd47b866ed31e665848a0da84a2 (diff)
downloadmusl-bf453d68393f7eea5965319e21311e56d71fa53c.tar.gz
musl-bf453d68393f7eea5965319e21311e56d71fa53c.tar.xz
musl-bf453d68393f7eea5965319e21311e56d71fa53c.zip
restore attribute((const)) to pthread_self and errno location decls
revert commit a603a75a72bb469c6be4963ed1b55fabe675fe15.

as a result of commit 1c84c99913bf1cd47b866ed31e665848a0da84a2 this is
now safe, assuming an interpretation of the somewhat-underspecified
attribute((const)) consistent with real-world usage.
Diffstat (limited to 'include/netdb.h')
-rw-r--r--include/netdb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/netdb.h b/include/netdb.h
index adde2c5e..d096c781 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -115,6 +115,9 @@ struct protoent *getprotobynumber (int);
  || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
 struct hostent *gethostbyname (const char *);
 struct hostent *gethostbyaddr (const void *, socklen_t, int);
+#ifdef __GNUC__
+__attribute__((const))
+#endif
 int *__h_errno_location(void);
 #define h_errno (*__h_errno_location())
 #define HOST_NOT_FOUND 1