diff options
author | Jiri Slaby <jslaby@suse.cz> | 2019-10-04 12:46:17 +0200 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2019-11-05 14:47:29 +0000 |
commit | 381d767d0f0565b311bd33ffcad4ea97bd9bdcb8 (patch) | |
tree | cf3a0ab82266360211fe24d7351bd3cd9be852c5 /runtime | |
parent | be9b714c1cf617877b8bcb6e1d5e63c3b694075a (diff) | |
download | klee-381d767d0f0565b311bd33ffcad4ea97bd9bdcb8.tar.gz |
runtime: fix for glibc 2.30
glibc 2.30 moved definition of getdents64 to dirent_ext.h. Hence, it became visible to us (via dirent.h) and conflicts with our definition: runtime/POSIX/fd_64.c:112:5: error: conflicting types for 'getdents64' int getdents64(unsigned int fd, struct dirent *dirp, unsigned int count) { ^ /usr/include/bits/dirent_ext.h:29:18: note: previous declaration is here extern __ssize_t getdents64 (int __fd, void *__buffer, size_t __length) We use the parameters defined by kernel, not by userspace (libc). Both glibc and uclibc define it as: ssize_t __getdents64 (int fd, char *buf, size_t nbytes) so follow it.
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/POSIX/fd_64.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/POSIX/fd_64.c b/runtime/POSIX/fd_64.c index 61d9dc6f..7691538f 100644 --- a/runtime/POSIX/fd_64.c +++ b/runtime/POSIX/fd_64.c @@ -109,8 +109,8 @@ int statfs(const char *path, struct statfs *buf) { return __fd_statfs(path, buf); } -int getdents64(unsigned int fd, struct dirent *dirp, unsigned int count) { +ssize_t getdents64(int fd, void *dirp, size_t count) { return __fd_getdents(fd, (struct dirent64*) dirp, count); } -int __getdents64(unsigned int fd, struct dirent *dirp, unsigned int count) +ssize_t __getdents64(int fd, void *dirp, size_t count) __attribute__((alias("getdents64"))); |