Index: OpenSceneGraph/trunk/src/osgPlugins/png/ReaderWriterPNG.cpp
===================================================================
--- OpenSceneGraph/trunk/src/osgPlugins/png/ReaderWriterPNG.cpp (revision 10963)
+++ OpenSceneGraph/trunk/src/osgPlugins/png/ReaderWriterPNG.cpp (revision 11121)
@@ -230,5 +230,12 @@
                     png_set_palette_to_rgb(png);
                 if (color == PNG_COLOR_TYPE_GRAY && depth < 8)
+                {
+                #if PNG_LIBPNG_VER >= 10209
                     png_set_expand_gray_1_2_4_to_8(png);
+                #else
+                    // use older now deprecated but identical call
+                    png_set_gray_1_2_4_to_8(png);
+                #endif
+                }
                 if (png_get_valid(png, info, PNG_INFO_tRNS))
                     png_set_tRNS_to_alpha(png);
