Commit 8d1f9a6e authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2776 from cremno/undef-strndup

prevent accidental macro redefinition of strndup()
parents 1fefa046 8789a5d5
...@@ -201,6 +201,7 @@ parser_strndup(parser_state *p, const char *s, size_t len) ...@@ -201,6 +201,7 @@ parser_strndup(parser_state *p, const char *s, size_t len)
b[len] = '\0'; b[len] = '\0';
return b; return b;
} }
#undef strndup
#define strndup(s,len) parser_strndup(p, s, len) #define strndup(s,len) parser_strndup(p, s, len)
static char* static char*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment