Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / src / libraries / nacl_io / kernel_wrap.h
index 1067ecb..6211e8c 100644 (file)
@@ -56,15 +56,20 @@ int _fstat32(int fd, struct _stat32* buf);
 int _fstat64(int fd, struct _stat64* buf);
 int _fstat32i64(int fd, struct _stat32i64* buf);
 int _fstat64i32(int fd, struct _stat64i32* buf);
-#else
+#elif !defined(__linux__)
 struct stat;
-int fstat(int fd, struct stat* buf) NOTHROW;
+extern int fstat(int fd, struct stat* buf) NOTHROW;
 #endif
 int fsync(int fd);
 int ftruncate(int fd, off_t length) NOTHROW;
 char* NAME(getcwd)(char* buf, getcwd_size_t size) NOTHROW;
 char* getwd(char* buf) NOTHROW;
+#if !defined(__BIONIC__)
 int getdents(int fd, void* buf, unsigned int count) NOTHROW;
+#else
+struct dirent;
+int getdents(unsigned int fd, struct dirent* buf, unsigned int count) NOTHROW;
+#endif
 int NAME(isatty)(int fd) NOTHROW;
 int lchown(const char* path, uid_t owner, gid_t group) NOTHROW;
 int link(const char* oldpath, const char* newpath) NOTHROW;
@@ -90,13 +95,12 @@ int _stat32(const char* path, struct _stat32* buf);
 int _stat64(const char* path, struct _stat64* buf);
 int _stat32i64(const char* path, struct _stat32i64* buf);
 int _stat64i32(const char* path, struct _stat64i32* buf);
-#else
-int stat(const char* path, struct stat* buf) NOTHROW;
+#elif !defined(__linux__)
+extern int stat(const char* path, struct stat* buf) NOTHROW;
 #endif
 int symlink(const char* oldpath, const char* newpath) NOTHROW;
 int umount(const char* path) NOTHROW;
 int NAME(unlink)(const char* path) NOTHROW;
-uint64_t usec_since_epoch();
 int utime(const char* filename, const struct utimbuf* times);
 read_ssize_t NAME(write)(int fd, const void* buf, size_t nbyte);