Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/7.0] [mono] Fix iOS/tvOS build with Xcode 14 #76447

Merged
merged 1 commit into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/mono/cmake/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,9 @@
/* Define to 1 if `st_atimespec' is a member of `struct stat'. */
#cmakedefine HAVE_STRUCT_STAT_ST_ATIMESPEC 1

/* Define to 1 if `super_class' is a member of `struct objc_super'. */
#cmakedefine HAVE_OBJC_SUPER_SUPER_CLASS 1

/* Define to 1 if you have the <sys/time.h> header file. */
#cmakedefine HAVE_SYS_TIME_H 1

Expand Down
4 changes: 4 additions & 0 deletions src/mono/cmake/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ check_struct_has_member("struct sockaddr_in6" sin6_len "netinet/in.h" HAVE_SOCKA
check_struct_has_member("struct stat" st_atim "sys/types.h;sys/stat.h;unistd.h" HAVE_STRUCT_STAT_ST_ATIM)
check_struct_has_member("struct stat" st_atimespec "sys/types.h;sys/stat.h;unistd.h" HAVE_STRUCT_STAT_ST_ATIMESPEC)

if (HOST_DARWIN)
check_struct_has_member("struct objc_super" super_class "objc/runtime.h;objc/message.h" HAVE_OBJC_SUPER_SUPER_CLASS)
endif()

check_type_size("int" SIZEOF_INT)
check_type_size("void*" SIZEOF_VOID_P)
check_type_size("long" SIZEOF_LONG)
Expand Down
6 changes: 3 additions & 3 deletions src/mono/mono/utils/mono-threads-mach-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ mono_dead_letter_dealloc (id self, SEL _cmd)
{
struct objc_super super;
super.receiver = self;
#if !defined(__cplusplus) && !__OBJC2__
super.class = nsobject;
#else
#if defined(__cplusplus) || defined(HAVE_OBJC_SUPER_SUPER_CLASS)
super.super_class = nsobject;
#else
super.class = nsobject;
#endif
void (*objc_msgSendSuper_op)(struct objc_super *, SEL) = (void (*)(struct objc_super *, SEL)) objc_msgSendSuper;
objc_msgSendSuper_op (&super, dealloc);
Expand Down