Skip to content

Commit c9efff6

Browse files
committed
smb: enable for apple builds
1 parent 29821a8 commit c9efff6

5 files changed

Lines changed: 76 additions & 1 deletion

File tree

.github/workflows/MacOS.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ jobs:
2020
- name: Compile RA
2121
run: |
2222
set -o pipefail
23-
xcodebuild -workspace pkg/apple/RetroArch.xcworkspace -scheme RetroArch -config Release -xcconfig pkg/apple/GitHubCI.xcconfig -derivedDataPath build | xcpretty --color
23+
xcodebuild -workspace pkg/apple/RetroArch.xcworkspace \
24+
-scheme RetroArch \
25+
-configuration Release \
26+
-xcconfig pkg/apple/GitHubCI.xcconfig \
27+
-derivedDataPath build
2428
2529
- name: Get short SHA
2630
id: slug

deps/libsmb2/lib/alloc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666
#include <libsmb2.h>
6767
#include "libsmb2-private.h"
6868

69+
#ifndef typeof
70+
#define typeof __typeof__
71+
#endif
72+
6973
#define container_of(ptr, type, member) ({ \
7074
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
7175
(type *)(void *)( (char *)__mptr - offsetof(type,member) );})

deps/libsmb2/lib/dcerpc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@
6767
#include "libsmb2-raw.h"
6868
#include "libsmb2-private.h"
6969

70+
#ifndef typeof
71+
#define typeof __typeof__
72+
#endif
73+
7074
#define container_of(ptr, type, member) ({ \
7175
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
7276
(type *)(void *)( (char *)__mptr - offsetof(type,member) );})

pkg/apple/BaseConfig.xcconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//
66

77
OTHER_CFLAGS = $(inherited) -DFLAC__HAS_OGG=0
8+
OTHER_CFLAGS = $(inherited) -Wno-comma
89
OTHER_CFLAGS = $(inherited) -DGLSLANG_OSINCLUDE_UNIX
910
OTHER_CFLAGS = $(inherited) -DHAVE_7ZIP
1011
OTHER_CFLAGS = $(inherited) -DHAVE_ACCESSIBILITY
@@ -98,6 +99,24 @@ OTHER_CFLAGS = $(inherited) -DWANT_SUBCODE=1
9899
OTHER_CFLAGS = $(inherited) -D_7ZIP_ST
99100
OTHER_CFLAGS = $(inherited) -D__LIBRETRO__
100101

102+
OTHER_CFLAGS = $(inherited) "-D_U_=__attribute__((unused))"
103+
OTHER_CFLAGS = $(inherited) -DHAVE_TIME_H
104+
OTHER_CFLAGS = $(inherited) -DHAVE_FCNTL_H
105+
OTHER_CFLAGS = $(inherited) -DHAVE_UNISTD_H
106+
OTHER_CFLAGS = $(inherited) -DHAVE_STDLIB_H
107+
OTHER_CFLAGS = $(inherited) -DSTDC_HEADERS
108+
OTHER_CFLAGS = $(inherited) -DHAVE_STRING_H
109+
OTHER_CFLAGS = $(inherited) -DHAVE_LINGER
110+
OTHER_CFLAGS = $(inherited) -DHAVE_SYS_UIO_H
111+
OTHER_CFLAGS = $(inherited) -DHAVE_POLL_H
112+
OTHER_CFLAGS = $(inherited) -DHAVE_NETDB_H
113+
OTHER_CFLAGS = $(inherited) -DHAVE_NETINET_TCP_H
114+
OTHER_CFLAGS = $(inherited) -DHAVE_NETINET_IN_H
115+
OTHER_CFLAGS = $(inherited) -DHAVE_SYS_SOCKET_H
116+
OTHER_CFLAGS = $(inherited) -DHAVE_ARPA_INET_H
117+
OTHER_CFLAGS = $(inherited) -DHAVE_BUILTINSMBCLIENT
118+
OTHER_CFLAGS = $(inherited) -DHAVE_SMBCLIENT
119+
101120
OTHER_CFLAGS[arch=x86_64] = $(inherited) -DHAVE_SSE
102121
OTHER_CFLAGS[arch=arm64*] = $(inherited) -D__ARM_NEON__ -DHAVE_NEON
103122

@@ -164,6 +183,8 @@ HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/glslang/glslang/glslang/MachineIn
164183
HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/glslang/glslang/glslang/OSDependent/Unix
165184
HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/glslang/glslang/glslang/Public
166185
HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/libFLAC/include
186+
HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/libsmb2/include
187+
HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/libsmb2/include/smb2
167188
HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/rcheevos/include
168189
HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/stb
169190
HEADER_SEARCH_PATHS = $(inherited) $(DEPS_DIR)/zstd/lib

pkg/apple/RetroArch.xcodeproj/project.pbxproj

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,8 @@
414414
"$(SRCROOT)/../../libretro-common/include/compat/zlib",
415415
"$(SRCROOT)/../../deps/discord-rpc/include",
416416
"$(SRCROOT)/../../deps/libFLAC/include",
417+
"$(SRCROOT)/../../deps/libsmb2/include",
418+
"$(SRCROOT)/../../deps/libsmb2/include/smb2",
417419
"$(SRCROOT)/../../deps/rcheevos/include",
418420
"$(SRCROOT)/../../deps/7zip",
419421
"$(SRCROOT)/../../deps/stb",
@@ -457,6 +459,8 @@
457459
"$(SRCROOT)/../../libretro-common/include/compat/zlib",
458460
"$(SRCROOT)/../../deps/discord-rpc/include",
459461
"$(SRCROOT)/../../deps/libFLAC/include",
462+
"$(SRCROOT)/../../deps/libsmb2/include",
463+
"$(SRCROOT)/../../deps/libsmb2/include/smb2",
460464
"$(SRCROOT)/../../deps/rcheevos/include",
461465
"$(SRCROOT)/../../deps/7zip",
462466
"$(SRCROOT)/../../deps/stb",
@@ -503,6 +507,8 @@
503507
"$(SRCROOT)/../../libretro-common/include/compat/zlib",
504508
"$(SRCROOT)/../../deps/discord-rpc/include",
505509
"$(SRCROOT)/../../deps/libFLAC/include",
510+
"$(SRCROOT)/../../deps/libsmb2/include",
511+
"$(SRCROOT)/../../deps/libsmb2/include/smb2",
506512
"$(SRCROOT)/../../deps/rcheevos/include",
507513
"$(SRCROOT)/../../deps/7zip",
508514
"$(SRCROOT)/../../deps/stb",
@@ -543,6 +549,8 @@
543549
"$(SRCROOT)/../../libretro-common/include/compat/zlib",
544550
"$(SRCROOT)/../../deps/discord-rpc/include",
545551
"$(SRCROOT)/../../deps/libFLAC/include",
552+
"$(SRCROOT)/../../deps/libsmb2/include",
553+
"$(SRCROOT)/../../deps/libsmb2/include/smb2",
546554
"$(SRCROOT)/../../deps/rcheevos/include",
547555
"$(SRCROOT)/../../deps/7zip",
548556
"$(SRCROOT)/../../deps/stb",
@@ -575,6 +583,23 @@
575583
"-DHAVE_ACCESSIBILITY",
576584
"-DHAVE_SSL",
577585
"-DHAVE_BUILTINMBEDTLS",
586+
"-D_U_=__attribute__((unused))"
587+
"-DHAVE_TIME_H",
588+
"-DHAVE_FCNTL_H",
589+
"-DHAVE_UNISTD_H",
590+
"-DHAVE_STDLIB_H",
591+
"-DSTDC_HEADERS"
592+
"-DHAVE_STRING_H",
593+
"-DHAVE_LINGER",
594+
"-DHAVE_SYS_UIO_H",
595+
"-DHAVE_POLL_H",
596+
"-DHAVE_NETDB_H",
597+
"-DHAVE_NETINET_TCP_H",
598+
"-DHAVE_NETINET_IN_H",
599+
"-DHAVE_SYS_SOCKET_H",
600+
"-DHAVE_ARPA_INET_H",
601+
"-DHAVE_BUILTINSMBCLIENT",
602+
"-DHAVE_HAVE_SMBCLIENT",
578603
"-DHAVE_COMMAND",
579604
"-DHAVE_NETWORK_CMD",
580605
"-DHAVE_GRIFFIN",
@@ -662,6 +687,23 @@
662687
"-DHAVE_ACCESSIBILITY",
663688
"-DHAVE_SSL",
664689
"-DHAVE_BUILTINMBEDTLS",
690+
"-D_U_=__attribute__((unused))"
691+
"-DHAVE_TIME_H",
692+
"-DHAVE_FCNTL_H",
693+
"-DHAVE_UNISTD_H",
694+
"-DHAVE_STDLIB_H",
695+
"-DSTDC_HEADERS"
696+
"-DHAVE_STRING_H",
697+
"-DHAVE_LINGER",
698+
"-DHAVE_SYS_UIO_H",
699+
"-DHAVE_POLL_H",
700+
"-DHAVE_NETDB_H",
701+
"-DHAVE_NETINET_TCP_H",
702+
"-DHAVE_NETINET_IN_H",
703+
"-DHAVE_SYS_SOCKET_H",
704+
"-DHAVE_ARPA_INET_H",
705+
"-DHAVE_BUILTINSMBCLIENT",
706+
"-DHAVE_HAVE_SMBCLIENT",
665707
"-DHAVE_COMMAND",
666708
"-DHAVE_NETWORK_CMD",
667709
"-DHAVE_GRIFFIN",

0 commit comments

Comments
 (0)