From c982708c91f6c4dd1b5ccd1f0120f5bcd0b176fc Mon Sep 17 00:00:00 2001 From: ckuethe Date: Wed, 18 Oct 2006 18:02:13 +0000 Subject: [PATCH] Fix file export ok sturm@ --- audio/gtkpod/Makefile | 4 +-- audio/gtkpod/patches/patch-src_file_export_c | 32 ++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 audio/gtkpod/patches/patch-src_file_export_c diff --git a/audio/gtkpod/Makefile b/audio/gtkpod/Makefile index 239551a11e3..c57ba78a157 100644 --- a/audio/gtkpod/Makefile +++ b/audio/gtkpod/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.15 2006/10/15 22:44:35 ckuethe Exp $ +# $OpenBSD: Makefile,v 1.16 2006/10/18 18:02:13 ckuethe Exp $ COMMENT= "GTK+2 program to synchronize an Apple iPod" DISTNAME= gtkpod-0.99.8 -#PKGNAME= ${DISTNAME} +PKGNAME= ${DISTNAME}p0 CATEGORIES= audio x11 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gtkpod/} diff --git a/audio/gtkpod/patches/patch-src_file_export_c b/audio/gtkpod/patches/patch-src_file_export_c new file mode 100644 index 00000000000..9e0722ef3ce --- /dev/null +++ b/audio/gtkpod/patches/patch-src_file_export_c @@ -0,0 +1,32 @@ +$OpenBSD: patch-src_file_export_c,v 1.4 2006/10/18 18:02:13 ckuethe Exp $ +--- src/file_export.c.orig Wed Oct 18 11:25:05 2006 ++++ src/file_export.c Wed Oct 18 11:24:15 2006 +@@ -43,6 +43,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -102,8 +103,11 @@ static gboolean + copy_file_fd_sync (FILE *from, FILE *to) + { + gboolean result = FALSE; +- gchar data[READ_WRITE_BLOCKSIZE]; ++ char *data; + ++ if ((data = malloc(READ_WRITE_BLOCKSIZE)) == NULL) ++ return FALSE; ++ + if((from) && (to)) + { + int read_bytes = 0, write_bytes = 0; +@@ -140,6 +144,7 @@ copy_file_fd_sync (FILE *from, FILE *to) + + } while(!(feof(from))); + } ++ free(data); + if (!result) + result = fsync (fileno (to)); + return(result);