From d0ca71a1a75a7ebeef5e3df5d395af5b1e7f6212 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Tue, 14 Apr 2009 10:33:48 +0000 Subject: [PATCH] - avoid clashes with getline() from glibc --- netpbm-10.35-glibc.patch | 38 ++++++++++++++++++++++++++++++++++++++ netpbm.spec | 1 + 2 files changed, 39 insertions(+) diff --git a/netpbm-10.35-glibc.patch b/netpbm-10.35-glibc.patch index 4ae71e8..c2465a5 100644 --- a/netpbm-10.35-glibc.patch +++ b/netpbm-10.35-glibc.patch @@ -11,3 +11,41 @@ while ( rt->in->hasMore( rt->in ) ) { if ( (err = rt->in->next( rt->in, &r, &g, &b )) ) goto exit ; +diff -up netpbm-10.35.62/converter/ppm/xvminitoppm.c.glibc netpbm-10.35.62/converter/ppm/xvminitoppm.c +--- netpbm-10.35.62/converter/ppm/xvminitoppm.c.glibc 2009-04-13 09:14:06.000000000 +0200 ++++ netpbm-10.35.62/converter/ppm/xvminitoppm.c 2009-04-14 12:27:48.000000000 +0200 +@@ -52,7 +52,7 @@ parseCommandLine(int const argc, + + + static void +-getline(FILE * const ifP, ++get_line(FILE * const ifP, + char * const buf, + size_t const size) { + +@@ -105,7 +105,7 @@ readXvHeader(FILE * const ifP, + int rc; + bool endOfComments; + +- getline(ifP, buf, sizeof(buf)); ++ get_line(ifP, buf, sizeof(buf)); + + if (!STRNEQ(buf, "P7 332", 6)) + pm_error("Input is not a XV thumbnail picture. It does not " +@@ -113,14 +113,14 @@ readXvHeader(FILE * const ifP, + + endOfComments = FALSE; + while (!endOfComments) { +- getline(ifP, buf, sizeof(buf)); ++ get_line(ifP, buf, sizeof(buf)); + if (STRNEQ(buf, "#END_OF_COMMENTS", 16)) + endOfComments = TRUE; + else if (STRNEQ(buf, "#BUILTIN", 8)) + pm_error("This program does not know how to " + "convert builtin XV thumbnail pictures"); + } +- getline(ifP, buf, sizeof(buf)); ++ get_line(ifP, buf, sizeof(buf)); + rc = sscanf(buf, "%u %u %u", &cols, &rows, &maxval); + if (rc != 3) + pm_error("error parsing dimension info '%s'. " diff --git a/netpbm.spec b/netpbm.spec index fa9bc31..6a394eb 100644 --- a/netpbm.spec +++ b/netpbm.spec @@ -238,6 +238,7 @@ rm -rf $RPM_BUILD_ROOT - upstream fixes pamstereogram - fix options in pamperspective, pbmtoepson, ppmpat, pamaddnoise so that they match their man pages (#483011, #483070, #483243, #483245) +- avoid clashes with getline() from glibc * Tue Mar 31 2009 Jindrich Novy 10.35.61-2 - remove two hunks from security patch breaking pbmclean and pbmlife (#493015)