From 973b33e3e57b9328fec1d58fe85c128f832996ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=9A=93?= Date: Sat, 25 Jan 2025 00:58:11 -0500 Subject: [PATCH] Fix PhysFS compilation errors in libretro builds --- .github/workflows/autobuild.yml | 1 + subprojects/packagefiles/physfs.patch | 15 +++++++++++++++ subprojects/physfs.wrap | 1 + 3 files changed, 17 insertions(+) create mode 100644 subprojects/packagefiles/physfs.patch diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 41a3cc5d..9b498e35 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -727,6 +727,7 @@ jobs: echo "[binaries]" | tee -a ${{ runner.temp }}/cross.ini echo "c = '${{ runner.temp }}/cc'" | tee -a ${{ runner.temp }}/cross.ini echo "cpp = '${{ runner.temp }}/c++'" | tee -a ${{ runner.temp }}/cross.ini + echo "objc = '${{ runner.temp }}/cc'" | tee -a ${{ runner.temp }}/cross.ini echo "ar = 'ar'" | tee -a ${{ runner.temp }}/cross.ini echo "strip = 'strip'" | tee -a ${{ runner.temp }}/cross.ini echo "[host_machine]" | tee -a ${{ runner.temp }}/cross.ini diff --git a/subprojects/packagefiles/physfs.patch b/subprojects/packagefiles/physfs.patch new file mode 100644 index 00000000..9ad9d5e8 --- /dev/null +++ b/subprojects/packagefiles/physfs.patch @@ -0,0 +1,15 @@ +diff --git a/src/physfs_platforms.h b/src/physfs_platforms.h +--- a/src/physfs_platforms.h ++++ b/src/physfs_platforms.h +@@ -73,7 +73,10 @@ + # define PHYSFS_PLATFORM_UNIX 1 + # define PHYSFS_PLATFORM_POSIX 1 + #else +-# error Unknown platform. ++# warning Unknown platform. ++# define PHYSFS_PLATFORM_UNIX 1 ++# define PHYSFS_PLATFORM_POSIX 1 ++# define PHYSFS_NO_CDROM_SUPPORT 1 + #endif + + #endif /* include-once blocker. */ diff --git a/subprojects/physfs.wrap b/subprojects/physfs.wrap index 1b4154ad..2c096cf4 100644 --- a/subprojects/physfs.wrap +++ b/subprojects/physfs.wrap @@ -2,3 +2,4 @@ url = https://github.com/icculus/physfs revision = release-3.2.0 depth = 1 +diff_files = physfs.patch