From a67f08d5eda0bf8141c1cab46fe0b2aff4902892 Mon Sep 17 00:00:00 2001 From: Craig Carnell <1188869+cscd98@users.noreply.github.com> Date: Mon, 26 Jan 2026 11:28:30 +0000 Subject: [PATCH] smb: enable for (some) apple builds --- deps/libsmb2/lib/compat.h | 4 ++ pkg/apple/BaseConfig.xcconfig | 20 +++++++++ pkg/apple/RetroArch.xcodeproj/project.pbxproj | 42 +++++++++++++++++++ 3 files changed, 66 insertions(+) diff --git a/deps/libsmb2/lib/compat.h b/deps/libsmb2/lib/compat.h index 85883b8ed611..d8622d97f0ad 100644 --- a/deps/libsmb2/lib/compat.h +++ b/deps/libsmb2/lib/compat.h @@ -827,6 +827,10 @@ int getlogin_r(char *buf, size_t size); #define EINVAL 22 #endif +#ifndef typeof +#define typeof __typeof__ +#endif + #ifdef __cplusplus } #endif diff --git a/pkg/apple/BaseConfig.xcconfig b/pkg/apple/BaseConfig.xcconfig index a22fc305d3d3..9a3fd81f247d 100644 --- a/pkg/apple/BaseConfig.xcconfig +++ b/pkg/apple/BaseConfig.xcconfig @@ -98,6 +98,24 @@ OTHER_CFLAGS = $(inherited) -DWANT_SUBCODE=1 OTHER_CFLAGS = $(inherited) -D_7ZIP_ST OTHER_CFLAGS = $(inherited) -D__LIBRETRO__ +OTHER_CFLAGS = $(inherited) "-D_U_=__attribute__((unused))" +OTHER_CFLAGS = $(inherited) -DHAVE_TIME_H +OTHER_CFLAGS = $(inherited) -DHAVE_FCNTL_H +OTHER_CFLAGS = $(inherited) -DHAVE_UNISTD_H +OTHER_CFLAGS = $(inherited) -DHAVE_STDLIB_H +OTHER_CFLAGS = $(inherited) -DSTDC_HEADERS +OTHER_CFLAGS = $(inherited) -DHAVE_STRING_H +OTHER_CFLAGS = $(inherited) -DHAVE_LINGER +OTHER_CFLAGS = $(inherited) -DHAVE_SYS_UIO_H +OTHER_CFLAGS = $(inherited) -DHAVE_POLL_H +OTHER_CFLAGS = $(inherited) -DHAVE_NETDB_H +OTHER_CFLAGS = $(inherited) -DHAVE_NETINET_TCP_H +OTHER_CFLAGS = $(inherited) -DHAVE_NETINET_IN_H +OTHER_CFLAGS = $(inherited) -DHAVE_SYS_SOCKET_H +OTHER_CFLAGS = $(inherited) -DHAVE_ARPA_INET_H +OTHER_CFLAGS = $(inherited) -DHAVE_BUILTINSMBCLIENT +OTHER_CFLAGS = $(inherited) -DHAVE_SMBCLIENT + OTHER_CFLAGS[arch=x86_64] = $(inherited) -DHAVE_SSE OTHER_CFLAGS[arch=arm64*] = $(inherited) -D__ARM_NEON__ -DHAVE_NEON @@ -164,6 +182,8 @@ HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/glslang/glslang/glslang/MachineIn HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/glslang/glslang/glslang/OSDependent/Unix HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/glslang/glslang/glslang/Public HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/libFLAC/include +HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/libsmb2/include +HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/libsmb2/include/smb2 HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/rcheevos/include HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/stb HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/zstd/lib diff --git a/pkg/apple/RetroArch.xcodeproj/project.pbxproj b/pkg/apple/RetroArch.xcodeproj/project.pbxproj index 29a195c5726b..0ec2a49503db 100644 --- a/pkg/apple/RetroArch.xcodeproj/project.pbxproj +++ b/pkg/apple/RetroArch.xcodeproj/project.pbxproj @@ -414,6 +414,8 @@ "$(SRCROOT)/../../libretro-common/include/compat/zlib", "$(SRCROOT)/../../deps/discord-rpc/include", "$(SRCROOT)/../../deps/libFLAC/include", + "$(SRCROOT)/../../deps/libsmb2/include", + "$(SRCROOT)/../../deps/libsmb2/include/smb2", "$(SRCROOT)/../../deps/rcheevos/include", "$(SRCROOT)/../../deps/7zip", "$(SRCROOT)/../../deps/stb", @@ -457,6 +459,8 @@ "$(SRCROOT)/../../libretro-common/include/compat/zlib", "$(SRCROOT)/../../deps/discord-rpc/include", "$(SRCROOT)/../../deps/libFLAC/include", + "$(SRCROOT)/../../deps/libsmb2/include", + "$(SRCROOT)/../../deps/libsmb2/include/smb2", "$(SRCROOT)/../../deps/rcheevos/include", "$(SRCROOT)/../../deps/7zip", "$(SRCROOT)/../../deps/stb", @@ -503,6 +507,8 @@ "$(SRCROOT)/../../libretro-common/include/compat/zlib", "$(SRCROOT)/../../deps/discord-rpc/include", "$(SRCROOT)/../../deps/libFLAC/include", + "$(SRCROOT)/../../deps/libsmb2/include", + "$(SRCROOT)/../../deps/libsmb2/include/smb2", "$(SRCROOT)/../../deps/rcheevos/include", "$(SRCROOT)/../../deps/7zip", "$(SRCROOT)/../../deps/stb", @@ -543,6 +549,8 @@ "$(SRCROOT)/../../libretro-common/include/compat/zlib", "$(SRCROOT)/../../deps/discord-rpc/include", "$(SRCROOT)/../../deps/libFLAC/include", + "$(SRCROOT)/../../deps/libsmb2/include", + "$(SRCROOT)/../../deps/libsmb2/include/smb2", "$(SRCROOT)/../../deps/rcheevos/include", "$(SRCROOT)/../../deps/7zip", "$(SRCROOT)/../../deps/stb", @@ -575,6 +583,23 @@ "-DHAVE_ACCESSIBILITY", "-DHAVE_SSL", "-DHAVE_BUILTINMBEDTLS", + "-D_U_=__attribute__((unused))" + "-DHAVE_TIME_H", + "-DHAVE_FCNTL_H", + "-DHAVE_UNISTD_H", + "-DHAVE_STDLIB_H", + "-DSTDC_HEADERS" + "-DHAVE_STRING_H", + "-DHAVE_LINGER", + "-DHAVE_SYS_UIO_H", + "-DHAVE_POLL_H", + "-DHAVE_NETDB_H", + "-DHAVE_NETINET_TCP_H", + "-DHAVE_NETINET_IN_H", + "-DHAVE_SYS_SOCKET_H", + "-DHAVE_ARPA_INET_H", + "-DHAVE_BUILTINSMBCLIENT", + "-DHAVE_HAVE_SMBCLIENT", "-DHAVE_COMMAND", "-DHAVE_NETWORK_CMD", "-DHAVE_GRIFFIN", @@ -662,6 +687,23 @@ "-DHAVE_ACCESSIBILITY", "-DHAVE_SSL", "-DHAVE_BUILTINMBEDTLS", + "-D_U_=__attribute__((unused))" + "-DHAVE_TIME_H", + "-DHAVE_FCNTL_H", + "-DHAVE_UNISTD_H", + "-DHAVE_STDLIB_H", + "-DSTDC_HEADERS" + "-DHAVE_STRING_H", + "-DHAVE_LINGER", + "-DHAVE_SYS_UIO_H", + "-DHAVE_POLL_H", + "-DHAVE_NETDB_H", + "-DHAVE_NETINET_TCP_H", + "-DHAVE_NETINET_IN_H", + "-DHAVE_SYS_SOCKET_H", + "-DHAVE_ARPA_INET_H", + "-DHAVE_BUILTINSMBCLIENT", + "-DHAVE_HAVE_SMBCLIENT", "-DHAVE_COMMAND", "-DHAVE_NETWORK_CMD", "-DHAVE_GRIFFIN",