aboutsummaryrefslogtreecommitdiff
path: root/graphics/osg
diff options
context:
space:
mode:
authorIon-Mihai Tetcu <itetcu@FreeBSD.org>2010-03-29 07:37:24 +0000
committerIon-Mihai Tetcu <itetcu@FreeBSD.org>2010-03-29 07:37:24 +0000
commit6d99cfbd24394afd582ac73d81699b50fc65de4f (patch)
tree7051ca3f1adb185879f0f8782e8d00c94351e8e7 /graphics/osg
parent8837cc4ae9cff3e1a9a9c4bcdb0bf8fa05006978 (diff)
downloadports-6d99cfbd24394afd582ac73d81699b50fc65de4f.tar.gz
ports-6d99cfbd24394afd582ac73d81699b50fc65de4f.zip
Fix build with png-1.4.1
PR: Warren Block <wblock@wonkity.com> (on mail)
Notes
Notes: svn path=/head/; revision=251689
Diffstat (limited to 'graphics/osg')
-rw-r--r--graphics/osg/files/patch-src-osgPlugins-png-ReaderWriterPNG.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/graphics/osg/files/patch-src-osgPlugins-png-ReaderWriterPNG.cpp b/graphics/osg/files/patch-src-osgPlugins-png-ReaderWriterPNG.cpp
new file mode 100644
index 000000000000..0891be87a53d
--- /dev/null
+++ b/graphics/osg/files/patch-src-osgPlugins-png-ReaderWriterPNG.cpp
@@ -0,0 +1,20 @@
+--- src/osgPlugins/png/ReaderWriterPNG.cpp.orig 2010-03-28 16:40:42.000000000 -0600
++++ src/osgPlugins/png/ReaderWriterPNG.cpp 2010-03-28 16:41:42.000000000 -0600
+@@ -173,7 +173,7 @@
+ endinfo = png_create_info_struct(png);
+
+ fin.read((char*)header,8);
+- if (fin.gcount() == 8 && png_check_sig(header, 8))
++ if (fin.gcount() == 8 && (png_sig_cmp(header, 0, 8) == 0))
+ png_set_read_fn(png,&fin,png_read_istream); //Use custom read function that will get data from istream
+ else
+ {
+@@ -224,7 +224,7 @@
+ if (color == PNG_COLOR_TYPE_PALETTE)
+ png_set_palette_to_rgb(png);
+ if (color == PNG_COLOR_TYPE_GRAY && depth < 8)
+- png_set_gray_1_2_4_to_8(png);
++ png_set_expand_gray_1_2_4_to_8(png);
+ if (png_get_valid(png, info, PNG_INFO_tRNS))
+ png_set_tRNS_to_alpha(png);
+