From: Mika Lindqvist Date: Thu, 4 Jun 2020 12:45:05 +0000 (+0300) Subject: Use char* instead of caddr_t. X-Git-Tag: 1.9.9-b1~248 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ebe2fafdda0470d0a11aa0e5b84f8b6c500d584;p=thirdparty%2Fzlib-ng.git Use char* instead of caddr_t. --- diff --git a/test/minigzip.c b/test/minigzip.c index 6dc02599..1ac0d5f8 100644 --- a/test/minigzip.c +++ b/test/minigzip.c @@ -126,7 +126,7 @@ int gz_compress_mmap(FILE *in, gzFile out) { int len; int err; int ifd = fileno(in); - caddr_t buf; /* mmap'ed buffer for the entire input file */ + char *buf; /* mmap'ed buffer for the entire input file */ off_t buf_len; /* length of the input file */ struct stat sb; @@ -136,11 +136,11 @@ int gz_compress_mmap(FILE *in, gzFile out) { if (buf_len <= 0) return Z_ERRNO; /* Now do the actual mmap: */ - buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0); - if (buf == (caddr_t)(-1)) return Z_ERRNO; + buf = mmap((char *) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0); + if (buf == (char *)(-1)) return Z_ERRNO; /* Compress the whole file at once: */ - len = PREFIX(gzwrite)(out, (char *)buf, (unsigned)buf_len); + len = PREFIX(gzwrite)(out, buf, (unsigned)buf_len); if (len != (int)buf_len) error(PREFIX(gzerror)(out, &err));