freeimage: fix building on musl

This commit is contained in:
oreo639 2024-01-23 15:32:06 -08:00
parent 9941cb0cb6
commit cd94feb5f3

View File

@ -0,0 +1,19 @@
Fixes following compile error due to musl using nullptr instead of __null:
Source/FreeImage/PluginPSD.cpp: In function BOOL Save(FreeImageIO*, FIBITMAP*, fi_handle, int, int, void*):
Source/FreeImage/PluginPSD.cpp:130:10: error: cannot convert std::nullptr_t to BOOL {aka int} in return
130 | return NULL;
| ^~~~
diff -rup Source/FreeImage/PluginPSD.cpp.orig Source/FreeImage/PluginPSD.cpp
--- a/Source/FreeImage/PluginPSD.cpp
+++ b/Source/FreeImage/PluginPSD.cpp
@@ -127,7 +127,7 @@ Load(FreeImageIO *io, fi_handle handle,
static BOOL DLL_CALLCONV
Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void *data) {
if(!handle) {
- return NULL;
+ return FALSE;
}
try {
psdParser parser;