aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfuzzard <fuzzard@users.noreply.github.com>2023-06-18 08:48:46 +1000
committerGitHub <noreply@github.com>2023-06-18 08:48:46 +1000
commit8f774d10a07b14de5dd9f9984c4e77058bc4e185 (patch)
tree0bc85b43c342a44d3c82d84c3928bb15c18c8b17
parent31e0f1dfcaff05465eb40ff553c40e21dc6ca31e (diff)
parent5a372da541cbc9a5d8309f8e08b42e77f3759007 (diff)
Merge pull request #23414 from joseluismarti/cmake-macros
[Android][cmake] adjust macros according to the API we are targeting
-rw-r--r--cmake/scripts/android/ArchSetup.cmake3
-rw-r--r--xbmc/cores/DllLoader/exports/emu_msvcrt.h8
-rw-r--r--xbmc/cores/DllLoader/exports/wrapper.c9
3 files changed, 16 insertions, 4 deletions
diff --git a/cmake/scripts/android/ArchSetup.cmake b/cmake/scripts/android/ArchSetup.cmake
index 49ba396194..3517f8139d 100644
--- a/cmake/scripts/android/ArchSetup.cmake
+++ b/cmake/scripts/android/ArchSetup.cmake
@@ -3,8 +3,7 @@ if(NOT CMAKE_TOOLCHAIN_FILE)
endif()
set(ARCH_DEFINES -DTARGET_POSIX -DTARGET_LINUX -DTARGET_ANDROID)
-set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE64_SOURCE
- -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64=1)
+set(SYSTEM_DEFINES -D__STDC_CONSTANT_MACROS -D_LARGEFILE_SOURCE)
# Main cpp
set(CORE_MAIN_SOURCE ${CMAKE_SOURCE_DIR}/xbmc/platform/android/activity/XBMCApp.cpp)
diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.h b/xbmc/cores/DllLoader/exports/emu_msvcrt.h
index cee233b349..c72d76bd56 100644
--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.h
+++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.h
@@ -17,13 +17,19 @@
#define _onexit_t void*
#endif
-#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
+#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD)
typedef off_t __off_t;
typedef int64_t off64_t;
typedef off64_t __off64_t;
typedef fpos_t fpos64_t;
#endif
+#if defined(TARGET_ANDROID)
+typedef off_t __off_t;
+typedef int64_t off64_t;
+typedef off64_t __off64_t;
+#endif
+
#ifdef TARGET_WINDOWS
#include "platform/win32/dirent.h"
#else
diff --git a/xbmc/cores/DllLoader/exports/wrapper.c b/xbmc/cores/DllLoader/exports/wrapper.c
index 455ec0b8ca..7b7b581e78 100644
--- a/xbmc/cores/DllLoader/exports/wrapper.c
+++ b/xbmc/cores/DllLoader/exports/wrapper.c
@@ -23,7 +23,7 @@
#include <dirent.h>
#include <dlfcn.h>
-#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID)
+#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD)
typedef off_t __off_t;
typedef int64_t off64_t;
typedef off64_t __off64_t;
@@ -31,6 +31,13 @@ typedef fpos_t fpos64_t;
#define stat64 stat
#endif
+#if defined(TARGET_ANDROID)
+typedef off_t __off_t;
+typedef int64_t off64_t;
+typedef off64_t __off64_t;
+#define stat64 stat
+#endif
+
#ifdef TARGET_POSIX
#define _stat stat
#endif