Files
nixpkgs/pkgs/by-name/li/libjpeg_turbo/mingw-boolean.patch
Jarrad Hope 168454c5ed libjpeg-turbo: fix mingw-boolean.patch preprocessor balance
mingw-boolean.patch was missing a closing #endif, which caused an
unbalanced preprocessor block and broke MinGW builds.

Fix the patch so it applies cleanly and the HAVE_BOOLEAN logic stays
balanced.
2026-01-02 10:55:46 -05:00

20 lines
530 B
Diff

Ported to updated libjpeg-turbo from
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-libjpeg-turbo/jpeg-typedefs.patch
--- a/src/jmorecfg.h
+++ b/src/jmorecfg.h
@@ -200,6 +200,14 @@
*/
#ifndef HAVE_BOOLEAN
+#if defined(_WIN32) && !defined(HAVE_BOOLEAN)
+#ifndef __RPCNDR_H__
+typedef unsigned char boolean;
+#endif
+#define HAVE_BOOLEAN
+#endif
+#if !defined(HAVE_BOOLEAN) && !defined(__RPCNDR_H__)
typedef int boolean;
#endif
+#endif
#ifndef FALSE /* in case these macros already exist */