aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/get-group.c4
-rw-r--r--tests/get-user.c4
-rw-r--r--tests/test-skel-0.c2
-rw-r--r--tests/trace-memory_static_tst.c4
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/get-group.c b/tests/get-group.c
index 8138967..30cdfc9 100644
--- a/tests/get-group.c
+++ b/tests/get-group.c
@@ -31,8 +31,8 @@ int main(int argc, char *argv[])
printf("%i\n", grp->gr_gid);
} else {
const char *file = argv[1];
- struct stat st;
- if (lstat(file, &st))
+ struct stat64 st;
+ if (lstat64(file, &st))
errp("lstat(%s) failed", file);
printf("%i\n", st.st_gid);
}
diff --git a/tests/get-user.c b/tests/get-user.c
index f85e299..be448d7 100644
--- a/tests/get-user.c
+++ b/tests/get-user.c
@@ -31,8 +31,8 @@ int main(int argc, char *argv[])
printf("%i\n", pwd->pw_uid);
} else {
const char *file = argv[1];
- struct stat st;
- if (lstat(file, &st))
+ struct stat64 st;
+ if (lstat64(file, &st))
errp("lstat(%s) failed", file);
printf("%i\n", st.st_uid);
}
diff --git a/tests/test-skel-0.c b/tests/test-skel-0.c
index de88cf4..91128d3 100644
--- a/tests/test-skel-0.c
+++ b/tests/test-skel-0.c
@@ -128,7 +128,7 @@ int at_get_fd(const char *str_dirfd)
}
str_mode = strtok(NULL, ":");
- return open(str_path, f_get_flags(str_flags), sscanf_mode_t(str_mode));
+ return open64(str_path, f_get_flags(str_flags), sscanf_mode_t(str_mode));
}
#define V_TIMESPEC "NULL | NOW | #[,#]"
diff --git a/tests/trace-memory_static_tst.c b/tests/trace-memory_static_tst.c
index 14c6477..86a47fe 100644
--- a/tests/trace-memory_static_tst.c
+++ b/tests/trace-memory_static_tst.c
@@ -26,7 +26,7 @@ volatile uintptr_t offset = 0;
#define check_ptr(addr) \
({ \
printf(" open(%p)\n", addr); \
- ret = open(non_const_ptr(addr), O_RDONLY); \
+ ret = open64(non_const_ptr(addr), O_RDONLY); \
assert(ret == -1 && errno == EFAULT); \
})
@@ -53,7 +53,7 @@ int main(int argc, char *argv[])
printf(" open(%p -> %p [+%#zx])\n", p, p + len, len);
memset(p, 'a', len);
path[end] = '\0';
- ret = open(p, O_RDONLY);
+ ret = open64(p, O_RDONLY);
assert(ret == -1 && (errno == ENOENT || errno == ENAMETOOLONG));
}
}