summaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/alloca.h10
-rw-r--r--libc/include/ifaddrs.h5
-rw-r--r--libc/include/unistd.h2
3 files changed, 13 insertions, 4 deletions
diff --git a/libc/include/alloca.h b/libc/include/alloca.h
index 83504135f..f741d25d5 100644
--- a/libc/include/alloca.h
+++ b/libc/include/alloca.h
@@ -20,9 +20,13 @@ libc_hidden_proto (__libc_alloca_cutoff)
#include <allocalim.h>
+#ifndef stackinfo_alloca_round
+# define stackinfo_alloca_round(l) (((l) + 15) & -16)
+#endif
+
#if _STACK_GROWS_DOWN
# define extend_alloca(buf, len, newlen) \
- (__typeof (buf)) ({ size_t __newlen = (newlen); \
+ (__typeof (buf)) ({ size_t __newlen = stackinfo_alloca_round (newlen); \
char *__newbuf = __alloca (__newlen); \
if (__newbuf + __newlen == (char *) buf) \
len += __newlen; \
@@ -31,10 +35,10 @@ libc_hidden_proto (__libc_alloca_cutoff)
__newbuf; })
#elif _STACK_GROWS_UP
# define extend_alloca(buf, len, newlen) \
- (__typeof (buf)) ({ size_t __newlen = (newlen); \
+ (__typeof (buf)) ({ size_t __newlen = stackinfo_alloca_round (newlen); \
char *__newbuf = __alloca (__newlen); \
char *__buf = (buf); \
- if (__buf + __newlen == __newbuf) \
+ if (__buf + len == __newbuf) \
{ \
len += __newlen; \
__newbuf = __buf; \
diff --git a/libc/include/ifaddrs.h b/libc/include/ifaddrs.h
index 50e4c48e8..e1c6cac11 100644
--- a/libc/include/ifaddrs.h
+++ b/libc/include/ifaddrs.h
@@ -21,8 +21,13 @@ struct in6addrinfo
extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6,
struct in6addrinfo **in6ai, size_t *in6ailen)
attribute_hidden;
+extern void __free_in6ai (struct in6addrinfo *in6ai) attribute_hidden;
extern void __check_native (uint32_t a1_index, int *a1_native,
uint32_t a2_index, int *a2_native)
attribute_hidden;
+#ifdef IS_IN_nscd
+extern uint32_t __bump_nl_timestamp (void) attribute_hidden;
+#endif
+
#endif /* ifaddrs.h */
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index 5014e2e77..3231943b0 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -117,7 +117,7 @@ extern int __ttyname_r (int __fd, char *__buf, size_t __buflen);
extern int __isatty (int __fd);
extern int __link (__const char *__from, __const char *__to);
extern int __symlink (__const char *__from, __const char *__to);
-extern int __readlink (__const char *__path, char *__buf, size_t __len);
+extern ssize_t __readlink (__const char *__path, char *__buf, size_t __len);
extern int __unlink (__const char *__name);
extern int __gethostname (char *__name, size_t __len);
extern int __profil (unsigned short int *__sample_buffer, size_t __size,