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

fix: compilation error on macOS >= 13 #69

Merged
merged 1 commit into from
Jan 5, 2023
Merged
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
7 changes: 7 additions & 0 deletions postject-api.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,19 @@ static const void* postject_find_resource(
unsigned long section_size;
char* ptr = NULL;
if (options != NULL && options->macho_framework_name != NULL) {
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
ptr = getsectdatafromFramework(options->macho_framework_name, segment_name,
section_name != NULL ? section_name : name,
&section_size);
} else {
ptr = getsectdata(segment_name, section_name != NULL ? section_name : name,
&section_size);
#ifdef __clang__
#pragma clang diagnostic pop
#endif

if (ptr != NULL) {
// Add the "virtual memory address slide" amount to ensure a valid pointer
Expand Down