void-packages/srcpkgs/freeimage/patches/fix-musl.patch

20 lines
768 B
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;