summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gzip.c2
-rw-r--r--src/gzip.h4
-rw-r--r--src/main.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/src/gzip.c b/src/gzip.c
index 6e9528f..de733f9 100644
--- a/src/gzip.c
+++ b/src/gzip.c
@@ -32,7 +32,7 @@ struct opkg_opk_gzip {
};
struct opkg_opk_gzip *
-opkg_opk_gzip_init(int (*read)(void *, char **, size_t *), void *user_data)
+opkg_opk_gzip_init(opkg_opk_gzip_read_func *read, void *user_data)
{
struct opkg_opk_gzip *gzip;
diff --git a/src/gzip.h b/src/gzip.h
index 73c8340..7c81463 100644
--- a/src/gzip.h
+++ b/src/gzip.h
@@ -22,8 +22,10 @@
struct opkg_opk_gzip;
+typedef int (opkg_opk_gzip_read_func)(void *, char **, size_t *);
+
struct opkg_opk_gzip *
-opkg_opk_gzip_init(int (*read)(void *, char **, size_t *), void *user_data);
+opkg_opk_gzip_init(opkg_opk_gzip_read_func *read, void *user_data);
int
opkg_opk_gzip_read(struct opkg_opk_gzip *gzip, void *record);
diff --git a/src/main.c b/src/main.c
index a24f3de..01f564b 100644
--- a/src/main.c
+++ b/src/main.c
@@ -76,7 +76,9 @@ _opkg_opk_main_extract(const char *file_name, const char *outer_member,
goto error3;
}
- inner_gzip = opkg_opk_gzip_init(&opkg_opk_ustar_read, outer_ustar);
+ inner_gzip = opkg_opk_gzip_init(
+ (opkg_opk_gzip_read_func *) &opkg_opk_ustar_read,
+ outer_ustar);
if (inner_gzip == NULL) {
goto error3;
}