Alias lockf and lock64 on LP64.
No need to forward in an ABI where the two are identical.
This does not let us remove an __INTRODUCED_IN because both functions were introduced late, in API 24.
Change-Id: Iec3818d825c4bb7a810f00de61dcadde384f51f2
diff --git a/libc/bionic/lockf.cpp b/libc/bionic/lockf.cpp
index 804ad68..54e13f5 100644
--- a/libc/bionic/lockf.cpp
+++ b/libc/bionic/lockf.cpp
@@ -68,6 +68,12 @@
return -1;
}
+#if defined(__LP64__)
+// For LP64, off_t == off64_t.
+__strong_alias(lockf, lockf64);
+#else
+// For ILP32 we need a shim that truncates the off64_t to off_t.
int lockf(int fd, int cmd, off_t length) {
return lockf64(fd, cmd, length);
}
+#endif