freeimage: Fix implicit function declaration

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2023-04-13 05:41:18 +09:00 committed by xtkoba
parent 5b7ae3aa0a
commit 074362edb3
4 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,13 @@
--- a/Source/LibJXR/image/decode/segdec.c
+++ b/Source/LibJXR/image/decode/segdec.c
@@ -49,6 +49,10 @@
#define _FORCEINLINE
#endif // X86OPT_INLINE
+#ifndef _BIG__ENDIAN_
+U32 _byteswap_ulong(U32);
+#endif
+
//================================================================
// Memory access functions
//================================================================

View File

@ -0,0 +1,13 @@
--- a/Source/LibJXR/jxrgluelib/JXRGlueJxr.c
+++ b/Source/LibJXR/jxrgluelib/JXRGlueJxr.c
@@ -29,6 +29,10 @@
#include <limits.h>
#include <JXRGlue.h>
+#ifdef __ANDROID__
+#include <wchar.h>
+#endif
+
static const char szHDPhotoFormat[] = "<dc:format>image/vnd.ms-photo</dc:format>";
const U32 IFDEntryTypeSizes[] = { 0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8 };

View File

@ -0,0 +1,13 @@
--- a/Source/ZLib/gzguts.h
+++ b/Source/ZLib/gzguts.h
@@ -26,6 +26,10 @@
# include <limits.h>
#endif
+#ifdef __ANDROID__
+# include <unistd.h>
+#endif
+
#ifndef _POSIX_SOURCE
# define _POSIX_SOURCE
#endif

View File

@ -9,7 +9,6 @@ TERMUX_PKG_SRCURL="https://downloads.sourceforge.net/project/freeimage/Source%20
TERMUX_PKG_SHA256=f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd
TERMUX_PKG_DEPENDS="libc++"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_ENABLE_CLANG16_PORTING=false
termux_step_pre_configure() {
cp -f "${TERMUX_PKG_BUILDER_DIR}/license-bsd-2-clause.txt" "${TERMUX_PKG_SRCDIR}"