OSDN Git Service

OpenJdkJVM: Fix Mac OS build.
authorNarayan Kamath <narayan@google.com>
Fri, 15 Apr 2016 16:51:55 +0000 (17:51 +0100)
committerNarayan Kamath <narayan@google.com>
Fri, 15 Apr 2016 16:51:55 +0000 (17:51 +0100)
bug: 28192631
Change-Id: I423d5e79aacfbe82e22d095ffbfd3eefedbb484b

runtime/openjdkjvm/OpenjdkJvm.cc

index d010bab..1f33651 100644 (file)
@@ -116,12 +116,18 @@ JNIEXPORT jint JVM_Write(jint fd, char* buf, jint nbytes) {
 
 /* posix lseek() */
 JNIEXPORT jlong JVM_Lseek(jint fd, jlong offset, jint whence) {
+#if !defined(__APPLE__)
     // NOTE: Using TEMP_FAILURE_RETRY here is busted for LP32 on glibc - the return
     // value will be coerced into an int32_t.
     //
     // lseek64 isn't specified to return EINTR so it shouldn't be necessary
     // anyway.
     return lseek64(fd, offset, whence);
+#else
+    // NOTE: This code is compiled for Mac OS but isn't ever run on that
+    // platform.
+    return lseek(fd, offset, whence);
+#endif
 }
 
 /*