From 2927a3a8db6fcf22c15b6d0d67ad7f06c6302d22 Mon Sep 17 00:00:00 2001 From: gal kahana Date: Mon, 23 Sep 2024 06:19:03 +0300 Subject: [PATCH] conf: setup to allow building libtiff to support ia32 envs in node --- LibTiff/binding.gyp | 5 +++++ LibTiff/tif_config.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/LibTiff/binding.gyp b/LibTiff/binding.gyp index 90c0a049..41bf713c 100644 --- a/LibTiff/binding.gyp +++ b/LibTiff/binding.gyp @@ -30,6 +30,11 @@ "defines": [ 'HAVE_UNISTD_H=1' ] + }], + ['target_arch == "ia32"', { + "defines": [ + 'SIZEOF_SIZE_T=4' + ] }] ], 'include_dirs': [ diff --git a/LibTiff/tif_config.h b/LibTiff/tif_config.h index 544e0236..f652132a 100644 --- a/LibTiff/tif_config.h +++ b/LibTiff/tif_config.h @@ -45,8 +45,10 @@ /* Define to the home page for this package. */ #define PACKAGE_URL "" -/* Size of size_t */ +/* Size of size_t, allowing external override */ +#ifndef SIZEOF_SIZE_T #define SIZEOF_SIZE_T 8 +#endif /** Maximum number of TIFF IFDs that libtiff can iterate through in a file. */