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

Unified Diff: linux_syscall_support.h

Issue 1743093002: Fix usage with musl libc. Base URL: https://chromium.googlesource.com/linux-syscall-support@master
Patch Set: Created 4 years, 10 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 8a42c1c8687b2af252811c28581cabfd89a3a3ae..34339f81373a026b3a22ec64655ef0e192ce7471 100644
--- a/linux_syscall_support.h
+++ b/linux_syscall_support.h
@@ -100,6 +100,9 @@ extern "C" {
#endif
#include <errno.h>
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE /* musl libc defines loff_t only with _GNU_SOURC */
Mark Seaborn 2016/03/13 19:59:49 Typo: "SOURC" I'm not sure that defining _GNU_SOU
+#endif
#include <fcntl.h>
#include <sched.h>
#include <signal.h>
@@ -1055,6 +1058,12 @@ struct kernel_statfs {
#ifndef __NR_pwrite64
#define __NR_pwrite64 18
#endif
+#ifndef __NR_pread
+#define __NR_pread __NR_pread64
Mark Seaborn 2016/03/13 19:59:49 Please explain what this fixes. What's your test
+#endif
+#ifndef __NR_pwrite
+#define __NR_pwrite __NR_pwrite64
+#endif
#ifndef __NR_setresuid
#define __NR_setresuid 117
#define __NR_getresuid 118
« 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