Add functions openat64() and creat64() as aliases to the usual functions.

Refs #747.

Signed-off-by: Nadav Har'El <n...@scylladb.com>
---
 fs/vfs/main.cc      | 2 ++
 include/api/fcntl.h | 3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/vfs/main.cc b/fs/vfs/main.cc
index 1e2408c..c221103 100644
--- a/fs/vfs/main.cc
+++ b/fs/vfs/main.cc
@@ -197,6 +197,7 @@ int openat(int dirfd, const char *pathname, int flags, ...)
 
     return error;
 }
+LFS64(openat);
 
 // open() has an optional third argument, "mode", which is only needed in
 // some cases (when the O_CREAT mode is used). As a safety feature, recent
@@ -222,6 +223,7 @@ int creat(const char *pathname, mode_t mode)
 {
     return open(pathname, O_CREAT|O_WRONLY|O_TRUNC, mode);
 }
+LFS64(creat);
 
 TRACEPOINT(trace_vfs_close, "%d", int);
 TRACEPOINT(trace_vfs_close_ret, "");
diff --git a/include/api/fcntl.h b/include/api/fcntl.h
index 012f060..106e9de 100644
--- a/include/api/fcntl.h
+++ b/include/api/fcntl.h
@@ -159,9 +159,6 @@ ssize_t tee(int, int, size_t, unsigned);
 #endif
 
 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
-//#define open64 open
-#define openat64 openat
-#define creat64 creat
 #define off64_t off_t
 #endif
 
-- 
2.9.4

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to