Module Name: src
Committed By: kamil
Date: Tue Jan 10 04:42:20 UTC 2017
Modified Files:
src/sbin/savecore: zopen.c
Log Message:
Adapt funopen(3) call after switch to new zlib(3)
In the prototype of the gzclose() function of changed from:
typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */
to:
typedef voidp gzFile;
This caused type mismatch when calling funopen(3) as:
'int (*)(void *)' != 'int (*)(struct gzFile_s *)'
Cast gzclose to (int (*)(void *)) when used in funopen(3).
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sbin/savecore/zopen.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/savecore/zopen.c
diff -u src/sbin/savecore/zopen.c:1.3 src/sbin/savecore/zopen.c:1.4
--- src/sbin/savecore/zopen.c:1.3 Tue Dec 25 09:24:45 2012
+++ src/sbin/savecore/zopen.c Tue Jan 10 04:42:20 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: zopen.c,v 1.3 2012/12/25 09:24:45 mbalmer Exp $ */
+/* $NetBSD: zopen.c,v 1.4 2017/01/10 04:42:20 kamil Exp $ */
/*
* Public domain stdio wrapper for libz, written by Johan Danielsson.
@@ -6,7 +6,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: zopen.c,v 1.3 2012/12/25 09:24:45 mbalmer Exp $");
+__RCSID("$NetBSD: zopen.c,v 1.4 2017/01/10 04:42:20 kamil Exp $");
#endif
#include <stdio.h>
@@ -35,7 +35,7 @@ zopen(const char *fname, const char *mod
return NULL;
if(*mode == 'r')
- return funopen(gz, xgzread, NULL, NULL, gzclose);
+ return funopen(gz, xgzread, NULL, NULL, (int (*)(void *))gzclose);
else
- return funopen(gz, NULL, xgzwrite, NULL, gzclose);
+ return funopen(gz, NULL, xgzwrite, NULL, (int (*)(void *))gzclose);
}