Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/savecore Adapt funopen(3) call after switch to new zlib(3)
details: https://anonhg.NetBSD.org/src/rev/5a36639fcee3
branches: trunk
changeset: 350303:5a36639fcee3
user: kamil <kamil%NetBSD.org@localhost>
date: Tue Jan 10 04:42:20 2017 +0000
description:
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).
diffstat:
sbin/savecore/zopen.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 8d39def5a679 -r 5a36639fcee3 sbin/savecore/zopen.c
--- a/sbin/savecore/zopen.c Tue Jan 10 04:34:07 2017 +0000
+++ b/sbin/savecore/zopen.c Tue Jan 10 04:42:20 2017 +0000
@@ -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 @@
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);
}
Home |
Main Index |
Thread Index |
Old Index