From 166accba607faec1cac18aed62178e1979915d6a Mon Sep 17 00:00:00 2001
From: Francois Bleibel <[EMAIL REDACTED]>
Date: Wed, 23 Nov 2022 14:28:57 -0800
Subject: [PATCH] libtiff: Fix TIFFOpen* for the Windows platform in tif_unix.c
I'm not sure where this change was made, but it must have been in a recent update. TIFFOpenWEx is now TIFFOpenWExt, and _TIFFgetMode takes additional arguments.
Verified: Tested libtiff on a local Windows build.
---
libtiff/tif_unix.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libtiff/tif_unix.c b/libtiff/tif_unix.c
index 89ae0c17..97fecfea 100644
--- a/libtiff/tif_unix.c
+++ b/libtiff/tif_unix.c
@@ -276,7 +276,7 @@ TIFFOpenExt(const char* name, const char* mode, TIFFOpenOptions* opts)
TIFF*
TIFFOpenW(const wchar_t* name, const char* mode)
{
- return TIFFOpenWEx(name, mode, NULL);
+ return TIFFOpenWExt(name, mode, NULL);
}
TIFF*
TIFFOpenWExt(const wchar_t* name, const char* mode, TIFFOpenOptions* opts)
@@ -287,7 +287,7 @@ TIFFOpenWExt(const wchar_t* name, const char* mode, TIFFOpenOptions* opts)
char *mbname;
TIFF* tif;
- m = _TIFFgetMode(mode, module);
+ m = _TIFFgetMode(opts, NULL, mode, module);
if (m == -1)
return ((TIFF*)0);