File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Sources/OpenGraphCxx/DebugServer Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 22// interpose.c
33// OpenGraphCxx
44
5+ #include <OpenGraph/OGBase.h>
56#include "stdio.h"
67#include "stdbool.h"
78#include "string.h"
89
9- #define DYLD_INTERPOSE (_replacement ,_replacee ) \
10- __attribute__((used)) static struct{ const void* replacement; const void* replacee; } _interpose_##_replacee \
11- __attribute__ ((section ("__DATA,__interpose"))) = { (const void*)(unsigned long)&_replacement, (const void*)(unsigned long)&_replacee };
12-
10+ #if OG_TARGET_OS_DARWIN
1311extern bool os_variant_has_internal_diagnostics (const char * subsystem );
12+ #endif
1413
1514bool og_variant_has_internal_diagnostics (const char * subsystem ) {
1615 if (strcmp (subsystem , "org.OpenSwiftUIProject.OpenGraph" ) == 0 ) {
@@ -22,4 +21,10 @@ bool og_variant_has_internal_diagnostics(const char *subsystem) {
2221 }
2322}
2423
24+ #if OG_TARGET_OS_DARWIN
25+ #define DYLD_INTERPOSE (_replacement ,_replacee ) \
26+ __attribute__((used)) static struct{ const void* replacement; const void* replacee; } _interpose_##_replacee \
27+ __attribute__ ((section ("__DATA,__interpose"))) = { (const void*)(unsigned long)&_replacement, (const void*)(unsigned long)&_replacee };
28+
2529DYLD_INTERPOSE (og_variant_has_internal_diagnostics , os_variant_has_internal_diagnostics )
30+ #endif
You can’t perform that action at this time.
0 commit comments