Skip to content

Commit

Permalink
Sulong: fix test for darwin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Palez committed Feb 23, 2021
1 parent f06df5a commit d4964d0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@

#include <stdio.h>

#ifdef __linux__
__attribute__((weak)) int foo();
#else
void *foo = NULL; //No weak external support for Darwin. This will pretend to be the same.
#endif

int main() {
#ifdef __linux__
if (foo) {
printf("External weak function is defined!\n");
} else {
printf("External weak function is NOT defined!\n");
}
#endif
return 0;
}

0 comments on commit d4964d0

Please sign in to comment.