Merge "Conditionally expose splice(2) and sync_file_range(2) constants."
diff --git a/libc/include/dirent.h b/libc/include/dirent.h
index 3f9ad18..ebcf085 100644
--- a/libc/include/dirent.h
+++ b/libc/include/dirent.h
@@ -31,6 +31,7 @@
#include <stdint.h>
#include <sys/cdefs.h>
+#include <sys/types.h>
__BEGIN_DECLS
@@ -46,17 +47,24 @@
#define DT_WHT 14
#endif
+#if defined(__LP64__)
+#define __DIRENT64_INO_T ino_t
+#else
+#define __DIRENT64_INO_T uint64_t /* Historical accident. */
+#endif
+
#define __DIRENT64_BODY \
- uint64_t d_ino; \
- int64_t d_off; \
- unsigned short d_reclen; \
- unsigned char d_type; \
- char d_name[256]; \
+ __DIRENT64_INO_T d_ino; \
+ off64_t d_off; \
+ unsigned short d_reclen; \
+ unsigned char d_type; \
+ char d_name[256]; \
struct dirent { __DIRENT64_BODY };
struct dirent64 { __DIRENT64_BODY };
#undef __DIRENT64_BODY
+#undef __DIRENT64_INO_T
/* glibc compatibility. */
#undef _DIRENT_HAVE_D_NAMLEN /* Linux doesn't have a d_namlen field. */
diff --git a/linker/linker_main.cpp b/linker/linker_main.cpp
index db36976..3f7795b 100644
--- a/linker/linker_main.cpp
+++ b/linker/linker_main.cpp
@@ -138,8 +138,7 @@
// An empty list of soinfos
static soinfo_list_t g_empty_list;
-static void add_vdso(KernelArgumentBlock& args __unused) {
-#if defined(AT_SYSINFO_EHDR)
+static void add_vdso(KernelArgumentBlock& args) {
ElfW(Ehdr)* ehdr_vdso = reinterpret_cast<ElfW(Ehdr)*>(args.getauxval(AT_SYSINFO_EHDR));
if (ehdr_vdso == nullptr) {
return;
@@ -155,7 +154,6 @@
si->prelink_image();
si->link_image(g_empty_list, soinfo_list_t::make_list(si), nullptr);
-#endif
}
/* gdb expects the linker to be in the debug shared object list.
diff --git a/tests/Android.bp b/tests/Android.bp
index 2a5b47e..efb86b8 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -288,6 +288,7 @@
],
static_libs: [
"libpagemap",
+ "libziparchive",
"libLLVMObject",
"libLLVMBitReader",
"libLLVMMC",