Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(573)

Unified Diff: linux_syscall_support.h

Issue 219483003: Fix for x64 Android. __unused is #defined elsewhere. (Closed) Base URL: http://linux-syscall-support.googlecode.com/svn/trunk/lss
Patch Set: Fix for alternative Linux compiler configuration Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: linux_syscall_support.h
diff --git a/linux_syscall_support.h b/linux_syscall_support.h
index d04901dbd6e80d50d4958044478a29b002a32194..81496c04bbb52ad4952658a6f49809ab1a3525f3 100644
--- a/linux_syscall_support.h
+++ b/linux_syscall_support.h
@@ -426,7 +426,7 @@ struct kernel_stat {
uint64_t st_mtime_nsec_;
uint64_t st_ctime_;
uint64_t st_ctime_nsec_;
- int64_t __unused[3];
+ int64_t __unused4[3];
};
#elif defined(__PPC__)
struct kernel_stat {
@@ -2241,9 +2241,9 @@ struct kernel_statfs {
__asm__ __volatile__(/* if (fn == NULL || child_stack == NULL)
* return -EINVAL;
*/
-#ifdef __thumb2__
+#ifdef __thumb2__
"push {r7}\n"
-#endif
+#endif
"cmp %2,#0\n"
"it ne\n"
"cmpne %3,#0\n"
@@ -2301,7 +2301,7 @@ struct kernel_statfs {
"1:\n"
#ifdef __thumb2__
"pop {r7}"
-#endif
+#endif
: "=r" (__res)
: "i"(-EINVAL),
"r"(fn), "r"(__stack), "r"(__flags), "r"(arg),
@@ -2930,7 +2930,13 @@ struct kernel_statfs {
/* Need to make sure __off64_t isn't truncated to 32-bits under x32. */
LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d,
+#ifdef __ANDROID__
+ // Recent versions of NDK do not define __off64_t, where as Linux
+ // only defines off64_t if __USE_LARGEFILE64 is defined.
+ off64_t o) {
Mark Seaborn 2014/04/02 17:27:37 How about just using int64_t here?
+#else
__off64_t o) {
+#endif
LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l),
LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f),
LSS_SYSCALL_ARG(d), (uint64_t)(o));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698