aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Moses <bmoses@google.com>2015-08-14 22:32:51 -0700
committerBrooks Moses <bmoses@google.com>2015-08-14 22:32:51 -0700
commite52611a1106089b55f0de3a6c18d84109d804b73 (patch)
treea7eb03ab477913fc79b6c90170a4551185151717
parentb2b6bfcde6ac2950c57df60ccd235dfe6de89824 (diff)
downloadglibc-e52611a1106089b55f0de3a6c18d84109d804b73.zip
glibc-e52611a1106089b55f0de3a6c18d84109d804b73.tar.gz
glibc-e52611a1106089b55f0de3a6c18d84109d804b73.tar.bz2
Backport cl/98967227 to GRTE glibc 2.19 sources.
-rw-r--r--elf/link.h8
-rw-r--r--socket/sys/un.h8
2 files changed, 9 insertions, 7 deletions
diff --git a/elf/link.h b/elf/link.h
index d5905d1..018faa2 100644
--- a/elf/link.h
+++ b/elf/link.h
@@ -34,6 +34,8 @@
#include <bits/elfclass.h> /* Defines __ELF_NATIVE_CLASS. */
#include <bits/link.h>
+__BEGIN_DECLS
+
/* Rendezvous structure used by the run-time dynamic linker to communicate
details of shared object loading to the debugger. If the executable's
dynamic section has a DT_DEBUG element, the run-time linker sets that
@@ -162,8 +164,6 @@ struct dl_phdr_info
void *dlpi_tls_data;
};
-__BEGIN_DECLS
-
extern int dl_iterate_phdr (int (*__callback) (struct dl_phdr_info *,
size_t, void *),
void *__data);
@@ -187,8 +187,8 @@ extern uintptr_t la_symbind64 (Elf64_Sym *__sym, unsigned int __ndx,
unsigned int *__flags, const char *__symname);
extern unsigned int la_objclose (uintptr_t *__cookie);
-__END_DECLS
-
#endif
+__END_DECLS
+
#endif /* link.h */
diff --git a/socket/sys/un.h b/socket/sys/un.h
index fdb6f94..3019896 100644
--- a/socket/sys/un.h
+++ b/socket/sys/un.h
@@ -23,6 +23,11 @@
/* Get the definition of the macro to define the common sockaddr members. */
#include <bits/sockaddr.h>
+#ifdef __USE_MISC
+# include <stddef.h> /* For offsetof. */
+# include <string.h> /* For prototype of `strlen'. */
+#endif
+
__BEGIN_DECLS
/* Structure describing the address of an AF_LOCAL (aka AF_UNIX) socket. */
@@ -34,9 +39,6 @@ struct sockaddr_un
#ifdef __USE_MISC
-# include <stddef.h> /* For offsetof. */
-# include <string.h> /* For prototype of `strlen'. */
-
/* Evaluate to actual length of the `sockaddr_un' structure. */
# define SUN_LEN(ptr) (offsetof(struct sockaddr_un, sun_path) \
+ strlen ((ptr)->sun_path))