summaryrefslogtreecommitdiff
path: root/myrbuild
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-08-19 10:23:05 -0400
committerOri Bernstein <ori@eigenstate.org>2014-08-19 10:23:05 -0400
commita21589265a04619fcbc204c5ab3221a482090f86 (patch)
tree0b9b2ca86e8ecad48812d5040533fd920d8bf7b5 /myrbuild
parente33c25d14d197cab582d359867f75cca8bcd3c2b (diff)
downloadmc-a21589265a04619fcbc204c5ab3221a482090f86.tar.gz
Don't spuriously add include paths.
Fix a dumb typo. Also, respect the include path order.
Diffstat (limited to 'myrbuild')
-rw-r--r--myrbuild/myrbuild.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/myrbuild/myrbuild.c b/myrbuild/myrbuild.c
index 2e098da..ba7b2b8 100644
--- a/myrbuild/myrbuild.c
+++ b/myrbuild/myrbuild.c
@@ -195,16 +195,16 @@ FILE *openlib(char *lib)
char buf[1024];
size_t i;
- lappend(&incpaths, &nincpaths, strdup(Instroot "/lib/myr"));
- f = fopen(buf, "r");
- if (f)
- return f;
for (i = 0; i < nincpaths; i++) {
snprintf(buf, sizeof buf, "%s/%s", incpaths[i], lib);
f = fopen(buf, "r");
if (f)
return f;
}
+ snprintf(buf, sizeof buf, "%s/%s", Instroot "/lib/myr", lib);
+ f = fopen(buf, "r");
+ if (f)
+ return f;
err(1, "could not open library file %s\n", lib);
}