From fbbd9e551914d8410c375d1e9afed58440d9b232 Mon Sep 17 00:00:00 2001 From: Cameron Finucane Date: Tue, 20 Aug 2013 21:01:46 -0400 Subject: [PATCH 1/2] Update to work with modern versions of libpng. Per http://libpng.sourceforge.net/ANNOUNCE-1.4.0.txt, png_set_gray_1_2_4_to_8() was renamed. --- png.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/png.c b/png.c index 6c0a23b..f001d7f 100644 --- a/png.c +++ b/png.c @@ -104,7 +104,7 @@ int png_load_img(img I) { if (color_type == PNG_COLOR_TYPE_GRAY || color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { if (bit_depth < 8) { - png_set_gray_1_2_4_to_8(png_ptr); + png_set_expand_gray_1_2_4_to_8(png_ptr); } png_set_gray_to_rgb(png_ptr); } From 2d17ae1be6fcb9996023cf2b708bb60373ddf66f Mon Sep 17 00:00:00 2001 From: Cameron Finucane Date: Tue, 20 Aug 2013 21:03:24 -0400 Subject: [PATCH 2/2] Fix typo: add library flags from pkg-config to LDLIBS, not cflags --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8a833ce..9f2be65 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ LDLIBS += -lpcap -lpthread #-lefence # Optional C compiler and linker flags. Typical driftnet builds have support # for displaying captured images in an X window, and need the following flags: CFLAGS += `pkg-config --cflags gtk+-2.0` `pkg-config --cflags libpng` -LDLIBS += -ljpeg -lgif `pkg-config --libs gtk+-2.0` `pkg-config --cflags libpng` +LDLIBS += -ljpeg -lgif `pkg-config --libs gtk+-2.0` `pkg-config --libs libpng` # Alternatively, you can build a version of driftnet which can only be used # in `adjunct' mode as the back end for some other image-processing program. To