summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorJean-Baptiste Boric <jblbeurope@gmail.com>2021-03-13 22:02:54 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-17 23:22:42 +0100
commit7a079f778097502d12d90962a58e422e0d76d14e (patch)
treeea77de7fd574a849e0c627ce7cbb738a1c110642 /Userland
parentb05b4d4b249e7f0025ddf27544c1972e32af80c8 (diff)
downloadserenity-7a079f778097502d12d90962a58e422e0d76d14e.zip
LibC+Kernel: Switch off_t to 64 bits
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibC/sys/types.h2
-rw-r--r--Userland/Libraries/LibC/unistd.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibC/sys/types.h b/Userland/Libraries/LibC/sys/types.h
index 5bb4dc4150..e044904f80 100644
--- a/Userland/Libraries/LibC/sys/types.h
+++ b/Userland/Libraries/LibC/sys/types.h
@@ -55,7 +55,7 @@ typedef int id_t;
typedef __WINT_TYPE__ wint_t;
typedef uint32_t ino_t;
-typedef ssize_t off_t;
+typedef int64_t off_t;
typedef uint32_t dev_t;
typedef uint16_t mode_t;
diff --git a/Userland/Libraries/LibC/unistd.cpp b/Userland/Libraries/LibC/unistd.cpp
index e6a29bc41b..e20c49d4c1 100644
--- a/Userland/Libraries/LibC/unistd.cpp
+++ b/Userland/Libraries/LibC/unistd.cpp
@@ -440,8 +440,8 @@ ssize_t readlink(const char* path, char* buffer, size_t size)
off_t lseek(int fd, off_t offset, int whence)
{
- int rc = syscall(SC_lseek, fd, offset, whence);
- __RETURN_WITH_ERRNO(rc, rc, -1);
+ int rc = syscall(SC_lseek, fd, &offset, whence);
+ __RETURN_WITH_ERRNO(rc, offset, -1);
}
int link(const char* old_path, const char* new_path)
@@ -633,7 +633,7 @@ char* getlogin()
int ftruncate(int fd, off_t length)
{
- int rc = syscall(SC_ftruncate, fd, length);
+ int rc = syscall(SC_ftruncate, fd, &length);
__RETURN_WITH_ERRNO(rc, rc, -1);
}