mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
freeimage: fix building on musl
This commit is contained in:
parent
9941cb0cb6
commit
cd94feb5f3
1 changed files with 19 additions and 0 deletions
19
srcpkgs/freeimage/patches/fix-musl.patch
Normal file
19
srcpkgs/freeimage/patches/fix-musl.patch
Normal 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;
|
Loading…
Add table
Reference in a new issue