فهرست منبع

fix mismatched type in posix_getdents definition

commit 1b0d48517f816e98f19111df82f32bfc1608ecec wrongly copied the
getdents return type of int rather than matching the ssize_t used by
posix_getdents. this was overlooked in testing on 32-bit archs but
obviously broke 64-bit archs.
Rich Felker 6 ماه پیش
والد
کامیت
0079972992
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/dirent/posix_getdents.c

+ 1 - 1
src/dirent/posix_getdents.c

@@ -3,7 +3,7 @@
 #include <errno.h>
 #include "syscall.h"
 
-int posix_getdents(int fd, void *buf, size_t len, int flags)
+ssize_t posix_getdents(int fd, void *buf, size_t len, int flags)
 {
 	if (flags) return __syscall_ret(-EOPNOTSUPP);
 	if (len>INT_MAX) len = INT_MAX;