From 3fc02ee667aa34d3a93038b34df0dc1420822fe0 Mon Sep 17 00:00:00 2001 From: Guido Draheim Date: Mon, 12 Jun 2017 03:04:16 +0200 Subject: [PATCH] introduce zzip/__errno.h to help with missing EBADMSG --- ChangeLog | 1 + zzip/Makefile.am | 2 +- zzip/Makefile.in | 2 +- zzip/__errno.h | 11 +++++++++++ zzip/fseeko.c | 1 + zzip/memdisk.c | 1 + zzip/mmapped.c | 3 ++- 7 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 zzip/__errno.h diff --git a/ChangeLog b/ChangeLog index 47129a3..8397850 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2017-06-11 guidod + * fix portability issues by introducing * fix portability issues by introducing * fix portability issues by introducing for strndup * reuse portability header in bins/*.c diff --git a/zzip/Makefile.am b/zzip/Makefile.am index b3c9912..5f333fb 100644 --- a/zzip/Makefile.am +++ b/zzip/Makefile.am @@ -8,7 +8,7 @@ zzipdir = ${includedir}/zzip zzip_HEADERS = $(libzzip_la_headers) \ $(libzzipmmapped_la_headers) \ $(libzzipfseeko_la_headers) -noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h __mkdir.h +noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h __mkdir.h __errno.h # VERSION_INFO=@VERSION_INFO@ RELEASE_INFO=@RELEASE_INFO@ diff --git a/zzip/Makefile.in b/zzip/Makefile.in index 3d76e35..8a835ab 100644 --- a/zzip/Makefile.in +++ b/zzip/Makefile.in @@ -397,7 +397,7 @@ zzip_HEADERS = $(libzzip_la_headers) \ $(libzzipmmapped_la_headers) \ $(libzzipfseeko_la_headers) -noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h __mkdir.h +noinst_HEADERS = __debug.h __hints.h __mmap.h __dirent.h __fnmatch.h __string.h __mkdir.h __errno.h # libzzip_la_SOURCES = \ zip.c \ diff --git a/zzip/__errno.h b/zzip/__errno.h new file mode 100644 index 0000000..d66ac3f --- /dev/null +++ b/zzip/__errno.h @@ -0,0 +1,11 @@ +#ifndef __ZZIP_INTERNAL_ERRNO_H +#define __ZZIP_INTERNAL_ERRNO_H + +#include + +/* Mingw cross compile fix */ +#ifndef EBADMSG +#define EBADMSG 74 +#endif + +#endif diff --git a/zzip/fseeko.c b/zzip/fseeko.c index d3eb42d..9627ecb 100644 --- a/zzip/fseeko.c +++ b/zzip/fseeko.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include diff --git a/zzip/memdisk.c b/zzip/memdisk.c index 67e6570..88d11c9 100644 --- a/zzip/memdisk.c +++ b/zzip/memdisk.c @@ -33,6 +33,7 @@ #include #include #include +#include #define ___ { #define ____ } diff --git a/zzip/mmapped.c b/zzip/mmapped.c index 69070df..325c41a 100644 --- a/zzip/mmapped.c +++ b/zzip/mmapped.c @@ -32,8 +32,9 @@ #include #include #include -#include #include +#include +#include #include #include -- 2.40.0