diff --git a/awkgram.y b/awkgram.y index 24acc460..fc7a9ba3 100644 --- a/awkgram.y +++ b/awkgram.y @@ -3105,11 +3105,6 @@ get_src_buf() int savelen; struct stat sbuf; - /* - * No argument prototype on readfunc on purpose, - * avoids problems with some ancient systems where - * the types of arguments to read() aren't up to date. - */ static ssize_t (*readfunc)(int, void *, size_t) = NULL; if (readfunc == NULL) { diff --git a/io.c b/io.c index acb707b0..f0c7901c 100644 --- a/io.c +++ b/io.c @@ -3388,7 +3388,7 @@ iop_alloc(int fd, const char *name, int errno_val) iop->public.fd = fd; iop->public.name = name; - iop->public.read_func = ( ssize_t(*)() ) read; + iop->public.read_func = ( ssize_t(*)(int, void *, size_t) ) read; iop->valid = false; iop->errcode = errno_val; @@ -4448,7 +4448,7 @@ get_read_timeout(IOBUF *iop) } /* overwrite read routine only if an extension has not done so */ - if ((iop->public.read_func == ( ssize_t(*)() ) read) && tmout > 0) + if ((iop->public.read_func == ( ssize_t(*)(int, void *, size_t) ) read) && tmout > 0) iop->public.read_func = read_with_timeout; return tmout;