fragment: skip empty tokens (closes #99)
Due to the way that tokens are merged together for arguments which require explicit whitespace, an empty token could result in a fragment like: {.type = 'I', .data = '/usr/include '} Such a fragment would be treated differently than: {.type = 'I', .data = '/usr/include'} This difference causes the compiler to include a system include path as part of the additional includes, thus breaking things like include path shadowing, resulting in random build failures. As such, we skip empty tokens from the tokenizer as they do not have any relevance anyway.pull/100/head
parent
9a89bd051d
commit
ce165646de
|
@ -105,6 +105,9 @@ pkgconf_fragment_add(pkgconf_list_t *list, const char *string, unsigned int flag
|
||||||
{
|
{
|
||||||
pkgconf_fragment_t *frag;
|
pkgconf_fragment_t *frag;
|
||||||
|
|
||||||
|
if (*string == '\0')
|
||||||
|
return;
|
||||||
|
|
||||||
if (!pkgconf_fragment_is_special(string))
|
if (!pkgconf_fragment_is_special(string))
|
||||||
{
|
{
|
||||||
frag = calloc(sizeof(pkgconf_fragment_t), 1);
|
frag = calloc(sizeof(pkgconf_fragment_t), 1);
|
||||||
|
|
Loading…
Reference in New Issue