- Hopefully fix (#3984) compiler errors on Solaris while not introducing too many new ones on the other platforms
- With _BSD_SOURCE now explicitly defined bring back strdup to vm_x86_64_assembler.c
This commit is contained in:
parent
58a8f5ef8b
commit
0e6427f3ff
3 changed files with 14 additions and 7 deletions
|
@ -241,15 +241,12 @@ static void hash_add_label(const char* label, unsigned address)
|
|||
{
|
||||
struct hashentry* h;
|
||||
unsigned i = hashkey(label, -1U);
|
||||
int labellen;
|
||||
|
||||
i %= sizeof(labelhash)/sizeof(labelhash[0]);
|
||||
h = malloc(sizeof(struct hashentry));
|
||||
|
||||
labellen = strlen(label) + 1;
|
||||
h->label = malloc(labellen);
|
||||
memcpy(h->label, label, labellen);
|
||||
|
||||
h->label = strdup(label);
|
||||
|
||||
h->address = address;
|
||||
h->next = labelhash[i];
|
||||
labelhash[i] = h;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue