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.
This commit is contained in:
Rich Felker 2015-07-09 17:07:35 +00:00
parent e8cbe0bad4
commit 11894f6d3a
2 changed files with 3 additions and 3 deletions

View File

@ -185,7 +185,7 @@ int setresgid(gid_t, gid_t, gid_t);
int getresuid(uid_t *, uid_t *, uid_t *); int getresuid(uid_t *, uid_t *, uid_t *);
int getresgid(gid_t *, gid_t *, gid_t *); int getresgid(gid_t *, gid_t *, gid_t *);
char *get_current_dir_name(void); char *get_current_dir_name(void);
void syncfs(int); int syncfs(int);
int euidaccess(const char *, int); int euidaccess(const char *, int);
int eaccess(const char *, int); int eaccess(const char *, int);
#endif #endif

View File

@ -2,7 +2,7 @@
#include <unistd.h> #include <unistd.h>
#include "syscall.h" #include "syscall.h"
void syncfs(int fd) int syncfs(int fd)
{ {
__syscall(SYS_syncfs, fd); return syscall(SYS_syncfs, fd);
} }