Skip to content

Commit

Permalink
Fix 'anonymous type with no linkage used to declare variable' in GC s…
Browse files Browse the repository at this point in the history
…ource

Issue #206 (bdwgc).

* dyn_load.c [DARWIN] (GC_dyld_sections): Provide some name to struct.
* finalize.c (GC_fnlz_roots): Likewise.
* os_dep.c [MPROTECT_VDB && DARWIN] (GC_ports,
GC_mprotect_thread_notify, GC_mprotect_thread): Likewise.
  • Loading branch information
ivmai committed Feb 20, 2018
1 parent d1fb0c1 commit cbe7f47
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dyn_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ GC_INNER void GC_register_dynamic_libraries(void)
/*#define DARWIN_DEBUG*/

/* Writable sections generally available on Darwin. */
STATIC const struct {
STATIC const struct dyld_sections_s {
const char *seg;
const char *sect;
} GC_dyld_sections[] = {
Expand Down
2 changes: 1 addition & 1 deletion finalize.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct finalizable_object {

static signed_word log_fo_table_size = -1;

STATIC struct {
STATIC struct fnlz_roots_s {
struct finalizable_object **fo_head;
/* List of objects that should be finalized now: */
struct finalizable_object *finalize_now;
Expand Down
8 changes: 4 additions & 4 deletions os_dep.c
Original file line number Diff line number Diff line change
Expand Up @@ -3979,7 +3979,7 @@ static struct {
thread_state_flavor_t flavors[MAX_EXCEPTION_PORTS];
} GC_old_exc_ports;

STATIC struct {
STATIC struct ports_s {
void (*volatile os_callback[3])(void);
mach_port_t exception;
# if defined(THREADS)
Expand Down Expand Up @@ -4022,7 +4022,7 @@ typedef enum {
/* The following should ONLY be called when the world is stopped. */
STATIC void GC_mprotect_thread_notify(mach_msg_id_t id)
{
struct {
struct buf_s {
GC_msg_t msg;
mach_msg_trailer_t trailer;
} buf;
Expand Down Expand Up @@ -4088,11 +4088,11 @@ STATIC void *GC_mprotect_thread(void *arg)
/* These two structures contain some private kernel data. We don't */
/* need to access any of it so we don't bother defining a proper */
/* struct. The correct definitions are in the xnu source code. */
struct {
struct reply_s {
mach_msg_header_t head;
char data[256];
} reply;
struct {
struct msg_s {
mach_msg_header_t head;
mach_msg_body_t msgh_body;
char data[1024];
Expand Down

0 comments on commit cbe7f47

Please sign in to comment.