From: Rich Felker Date: Thu, 9 Jul 2015 17:07:35 +0000 (+0000) Subject: fix incorrect void return type for syncfs function X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=11894f6d3a80be950a490dc7dfab349f057a545f;hp=e8cbe0bad4284906230a53af4c91ad2b9713d03b;p=musl fix incorrect void return type for syncfs function being nonstandard, the closest thing to a specification for this function is its man page, which documents it as returning int. it can fail with EBADF if the file descriptor passed is invalid. --- diff --git a/include/unistd.h b/include/unistd.h index 0fe75d52..760a1652 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -185,7 +185,7 @@ int setresgid(gid_t, gid_t, gid_t); int getresuid(uid_t *, uid_t *, uid_t *); int getresgid(gid_t *, gid_t *, gid_t *); char *get_current_dir_name(void); -void syncfs(int); +int syncfs(int); int euidaccess(const char *, int); int eaccess(const char *, int); #endif diff --git a/src/linux/syncfs.c b/src/linux/syncfs.c index fe2b8a70..bc7d301e 100644 --- a/src/linux/syncfs.c +++ b/src/linux/syncfs.c @@ -2,7 +2,7 @@ #include #include "syscall.h" -void syncfs(int fd) +int syncfs(int fd) { - __syscall(SYS_syncfs, fd); + return syscall(SYS_syncfs, fd); }