diff --git a/srcpkgs/ckmame/patches/gnu_source.patch b/srcpkgs/ckmame/patches/gnu_source.patch new file mode 100644 index 00000000000..45625367f99 --- /dev/null +++ b/srcpkgs/ckmame/patches/gnu_source.patch @@ -0,0 +1,31 @@ +--- src/dir.c 2018-12-18 12:11:40.000000000 +0100 ++++ src/dir.c 2020-02-27 19:32:00.653813072 +0100 +@@ -31,7 +31,7 @@ + IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +- ++#define _GNU_SOURCE /* for asprintf(3) */ + #include + #include + #include +--- src/ckmame.c 2018-12-18 12:11:40.000000000 +0100 ++++ src/ckmame.c 2020-02-27 19:39:05.451796134 +0100 +@@ -33,6 +33,7 @@ + + #include "config.h" + ++#define _GNU_SOURCE /* for asprintf(3) */ + #include + #include + #include +--- src/xmalloc.c 2018-12-18 12:11:40.000000000 +0100 ++++ src/xmalloc.c 2020-02-27 19:40:48.957792007 +0100 +@@ -33,6 +33,7 @@ + + #include "config.h" + ++#define _GNU_SOURCE /* for vasprintf(3) */ + #include + #include + #include diff --git a/srcpkgs/ckmame/patches/use-mkstemp.patch b/srcpkgs/ckmame/patches/use-mkstemp.patch new file mode 100644 index 00000000000..cc2eacba13f --- /dev/null +++ b/srcpkgs/ckmame/patches/use-mkstemp.patch @@ -0,0 +1,24 @@ +--- src/archive_dir.c 2018-12-18 12:11:40.000000000 +0100 ++++ src/archive_dir.c 2020-02-27 19:36:16.564802868 +0100 +@@ -307,6 +307,7 @@ + make_tmp_name(archive_t *a, const char *name) { + size_t i, len; + char *s; ++ int fd; + + if (a == NULL || name == NULL) { + errno = EINVAL; +@@ -324,10 +325,12 @@ + s[i] = '_'; + } + +- if (mktemp(s) == NULL) { ++ fd = mkstemp(s); ++ if (fd < 0) { + free(s); + return NULL; + } ++ close(fd); + return s; + } + diff --git a/srcpkgs/ckmame/template b/srcpkgs/ckmame/template index 1a035556223..7140737d051 100644 --- a/srcpkgs/ckmame/template +++ b/srcpkgs/ckmame/template @@ -1,12 +1,13 @@ # Template file for 'ckmame' pkgname=ckmame version=1.0 -revision=1 +revision=2 wrksrc=${pkgname}-rel-${version//./-} build_style=cmake build_helper=qemu hostmakedepends="pkg-config" makedepends="libxml2-devel libzip-devel sqlite-devel" +checkdepends="perl" short_desc="Program to check ROM sets for MAME" maintainer="Jürgen Buchmüller " license="BSD-3-clause"