aboutsummaryrefslogtreecommitdiff
path: root/gcc/incpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/incpath.c')
-rw-r--r--gcc/incpath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/incpath.c b/gcc/incpath.c
index 446d280..52dbb80 100644
--- a/gcc/incpath.c
+++ b/gcc/incpath.c
@@ -330,7 +330,7 @@ add_sysroot_to_chain (const char *sysroot, int chain)
{
if (p->name[0] == '=')
p->name = concat (sysroot, p->name + 1, NULL);
- if (strncmp (p->name, "$SYSROOT", strlen ("$SYSROOT")) == 0)
+ if (startswith (p->name, "$SYSROOT"))
p->name = concat (sysroot, p->name + strlen ("$SYSROOT"), NULL);
}
}