Subject: pkg/36757: print/ghostscript: fails to build on linux
To: None <,,>
From: Yakovetsky Vladimir <>
List: pkgsrc-bugs
Date: 08/09/2007 15:30:01
>Number:         36757
>Category:       pkg
>Synopsis:       print/ghostscript: fails to build on linux
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 09 15:30:01 +0000 2007
>Originator:     Yakovetsky Vladimir
System: Linux bres #1 SMP Fri Jul 6 09:48:19 GMT 2007 i686 GNU/Linux
Architecture: i686

	print/ghostscript fails to build on linux

% uname -sr; cat /etc/debian_version

% cd /usr/pkgsrc/print/ghostscript
% bmake
gcc  -DHAVE_MKSTEMP -DHAVE_HYPOT -DHAVE_FILE64  -O2 -I/usr/pkg/include -I/usr/include  -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-aliasing -fno-builtin -fno-common -DHAVE_STDINT_H -DGX_COLOR_INDEX_TYPE="unsigned long long" -O2 -march=pentium3 -mfpmath=sse -msse -finline-functions -fomit-frame-pointer -ffast-math -DA4 -I/usr/pkg/include -I/usr/include  -I./obj -I./src  -o ./obj/gpmisc.o -c ./src/gpmisc.c
./src/gpmisc.c: In function 'gp_fopentemp_generic':
./src/gpmisc.c:97: error: 'fdopen64' undeclared (first use in this function)
./src/gpmisc.c:97: error: (Each undeclared identifier is reported only once
./src/gpmisc.c:97: error: for each function it appears in.)
make: *** [obj/gpmisc.o] Error 1
*** Error code 2

bmake: stopped in /usr/pkgsrc/print/ghostscript
*** Error code 1

:r /usr/pkgsrc/print/ghostscript/patches/patch-ae
--- src/gpmisc.c.~1~
+++ src/gpmisc.c
@@ -93,7 +93,7 @@
      * fdopen as (char *), rather than following the POSIX.1 standard,
      * which defines it as (const char *).  Patch this here.
-#if defined (HAVE_FILE64) && !defined(_AIX)
+#if defined (HAVE_FILE64) && !defined(_AIX) && !defined(__linux__)
     file = (b64 ? fdopen64 : fdopen)(fildes, (char *)mode); /* still really const */
     file = fdopen(fildes, (char *)mode); /* still really const */