diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-12-12 16:02:47 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-12-12 16:02:47 +0000 |
commit | 8691cd66fbd92dbcd6ed81b3324c6938ff247139 (patch) | |
tree | ee46250f62109ef3141ca977a85ef9c1f7943876 /media-libs/netpbm/files | |
parent | Version bump. (diff) | |
download | gentoo-2-8691cd66fbd92dbcd6ed81b3324c6938ff247139.tar.gz gentoo-2-8691cd66fbd92dbcd6ed81b3324c6938ff247139.tar.bz2 gentoo-2-8691cd66fbd92dbcd6ed81b3324c6938ff247139.zip |
Add fix from upstream for pngtopnm errors #287725 by Denys Duchier.
(Portage version: 2.2_rc55/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/netpbm/files')
-rw-r--r-- | media-libs/netpbm/files/netpbm-10.48.00-pngx.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/media-libs/netpbm/files/netpbm-10.48.00-pngx.patch b/media-libs/netpbm/files/netpbm-10.48.00-pngx.patch new file mode 100644 index 000000000000..9975d29dceaa --- /dev/null +++ b/media-libs/netpbm/files/netpbm-10.48.00-pngx.patch @@ -0,0 +1,51 @@ +http://bugs.gentoo.org/287725 + +fix from upstream + +--- netpbm/converter/other/pngx.c (revision 1021) ++++ netpbm/converter/other/pngx.c (revision 1022) +@@ -69,6 +69,7 @@ + else + *pngxPP = pngxP; + } ++ pngxP->rw = rw; + } + } + +@@ -77,7 +78,14 @@ + void + pngx_destroy(struct pngx * const pngxP) { + +- png_destroy_write_struct(&pngxP->png_ptr, &pngxP->info_ptr); ++ switch(pngxP->rw) { ++ case PNGX_READ: ++ png_destroy_read_struct(&pngxP->png_ptr, &pngxP->info_ptr, NULL); ++ break; ++ case PNGX_WRITE: ++ png_destroy_write_struct(&pngxP->png_ptr, &pngxP->info_ptr); ++ break; ++ } + + free(pngxP); + } +--- netpbm/converter/other/pngx.h (revision 1021) ++++ netpbm/converter/other/pngx.h (revision 1022) +@@ -5,14 +5,14 @@ + the PNG library easier and cleaner. + */ + ++typedef enum {PNGX_READ, PNGX_WRITE} pngx_rw; ++ + struct pngx { + png_structp png_ptr; +- png_infop info_ptr; ++ png_infop info_ptr; ++ pngx_rw rw; + }; + +-typedef enum {PNGX_READ, PNGX_WRITE} pngx_rw; +- +- + void + pngx_create(struct pngx ** const pngxPP, + pngx_rw const rw, |