--- libeio/eio.c 2012/04/02 17:53:27 1.118 +++ libeio/eio.c 2012/04/10 05:01:34 1.119 @@ -1034,8 +1034,7 @@ #if HAVE_SYS_SYNCFS res = (int)syscall (__NR_syncfs, (int)(fd)); #else - res = -1; - errno = ENOSYS; + res = EIO_ENOSYS (); #endif if (res < 0 && errno == ENOSYS && fd >= 0) @@ -1075,11 +1074,10 @@ static int eio__fallocate (int fd, int mode, off_t offset, size_t len) { -#if HAVE_FALLOCATE +#if HAVE_LINUX_FALLOCATE return fallocate (fd, mode, offset, len); #else - errno = ENOSYS; - return -1; + return EIO_ENOSYS (); #endif } @@ -1188,8 +1186,7 @@ res = TransmitFile (TO_SOCKET (ofd), h, count, 0, 0, 0, 0); #else - res = -1; - errno = ENOSYS; + res = EIO_ENOSYS (); #endif /* we assume sendfile can copy at least 128mb in one go */ @@ -2497,8 +2494,7 @@ break; default: - errno = ENOSYS; - req->result = -1; + req->result = EIO_ENOSYS (); break; }