Skip to content

Commit 7e7cace

Browse files
committed
Fix 'undefined symbol GC_arrays` in tools on Solaris
* tools/if_mach.c (NOT_GCBUILD): Define macro (before include `gc_priv.h`). * tools/if_not_there.c (NOT_GCBUILD): Likewise. * tools/setjmp_t.c (NOT_GCBUILD): Likewise. * tools/threadlibs.c [HAVE_CONFIG_H]: Include `config.h`. * tools/threadlibs.c: Include `gcconfig.h` instead of `gc_priv.h`; include `stdio.h`.
1 parent 4a750ff commit 7e7cace

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

tools/if_mach.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* Conditionally execute a command based on machine and OS from gcconfig.h */
22

3+
#define NOT_GCBUILD
34
#include "private/gc_priv.h"
45

56
#include <string.h>

tools/if_not_there.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/* does not exist. If the command is omitted (and the file does not */
33
/* exist) then just exit with a non-zero code. */
44

5+
#define NOT_GCBUILD
56
#include "private/gc_priv.h"
67

78
#include <unistd.h>

tools/setjmp_t.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
/* safe, but this will not be noticed by this piece of */
2323
/* code.) This test appears to be far from perfect. */
2424

25+
#define NOT_GCBUILD
2526
#include "private/gc_priv.h"
2627

2728
#include <string.h>

tools/threadlibs.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@
1515
* modified is included with the above copyright notice.
1616
*/
1717

18-
#include "private/gc_priv.h"
18+
#ifdef HAVE_CONFIG_H
19+
# include "config.h"
20+
#endif
21+
22+
#include "private/gcconfig.h"
23+
24+
#include <stdio.h>
1925

2026
int
2127
main(void)

0 commit comments

Comments
 (0)