Skip to content

Commit

Permalink
prevent accidental macro redefinition of strndup()
Browse files Browse the repository at this point in the history
  • Loading branch information
cremno committed Apr 28, 2015
1 parent 41e6931 commit 8789a5d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/parse.y
Expand Up @@ -201,6 +201,7 @@ parser_strndup(parser_state *p, const char *s, size_t len)
b[len] = '\0';
return b;
}
#undef strndup
#define strndup(s,len) parser_strndup(p, s, len)

static char*
Expand Down

0 comments on commit 8789a5d

Please sign in to comment.