shithub: mc

Download patch

ref: a21589265a04619fcbc204c5ab3221a482090f86
parent: e33c25d14d197cab582d359867f75cca8bcd3c2b
author: Ori Bernstein <[email protected]>
date: Tue Aug 19 06:23:05 EDT 2014

Don't spuriously add include paths.

    Fix a dumb typo. Also, respect the include path order.

--- a/myrbuild/myrbuild.c
+++ b/myrbuild/myrbuild.c
@@ -195,10 +195,6 @@
     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");
@@ -205,6 +201,10 @@
         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);
 }