tiff: fix wrong declaration of ftell() compat macro
authorJo-Philipp Wich <redacted>
Thu, 19 May 2016 12:29:57 +0000 (14:29 +0200)
committerJo-Philipp Wich <redacted>
Thu, 19 May 2016 12:29:57 +0000 (14:29 +0200)
The libtiff library declares an `ftell()` compat macro redirecting calls
to `ftello()` if such an implementation exists. The compat macro however
is declared with a wrong number of arguments, leading to the following
error on our buildbots:

    In file included from .../usr/include/uClibc++/iostream:29:0,
                     from tif_stream.cxx:31:
    .../usr/include/uClibc++/fstream:422:22: error: macro "ftell" requires 3 arguments, but only 1 given
         retval = ftell(fp);

Add a patch to fix the macro definition in order to fix compilation of
the tiff package.

Signed-off-by: Jo-Philipp Wich <redacted>
libs/tiff/Makefile
libs/tiff/patches/005-fix-ftell-macro.patch [new file with mode: 0644]

index 735184ed1a2b7c17b9e00cf869e540576a994d88..317572590dcebb1073a7f344e07d47f8506ef3b3 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tiff
 PKG_VERSION:=4.0.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://download.osgeo.org/libtiff
diff --git a/libs/tiff/patches/005-fix-ftell-macro.patch b/libs/tiff/patches/005-fix-ftell-macro.patch
new file mode 100644 (file)
index 0000000..6ab0932
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/libtiff/tiffiop.h
++++ b/libtiff/tiffiop.h
+@@ -284,7 +284,7 @@ struct tiff {
+ */
+ #if defined(HAVE_FSEEKO)
+ #  define fseek(stream,offset,whence)  fseeko(stream,offset,whence)
+-#  define ftell(stream,offset,whence)  ftello(stream,offset,whence)
++#  define ftell(stream)  ftello(stream)
+ #endif
+ #endif
+ #if defined(__WIN32__) && \
git clone https://git.99rst.org/PROJECT