Skip to content

Commit

Permalink
fix(parser): only include strndup, when required
Browse files Browse the repository at this point in the history
  • Loading branch information
steffengy committed Dec 14, 2015
1 parent f569227 commit 6153090
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions parser/parser/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const xx_token_names xx_tokens[] =
{ 0, NULL }
};

#ifndef HAVE_STRNDUP
char *strndup(const char *s, size_t len)
{
if (s) {
Expand All @@ -50,6 +51,7 @@ char *strndup(const char *s, size_t len)

return NULL;
}
#endif

/**
* Wrapper to alloc memory within the parser
Expand Down

0 comments on commit 6153090

Please sign in to comment.