toolchain-wrapper.c: unbreak BR_CROSS_PATH_ABS handling
authorPeter Korsgaard <peter@korsgaard.com>
Mon, 5 Oct 2015 06:25:17 +0000 (08:25 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 5 Oct 2015 06:25:17 +0000 (08:25 +0200)
Fixes #8386

We should check if BR_CROSS_PATH_ABS is defined, not if it evalutates to
true for the pre processor.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
toolchain/toolchain-wrapper.c

index 11f93f0fd584cd165e21dbc1701ae69100fbb243..632696c6258a4bfe8a2e8e1a6ca16e52b5eb38f0 100644 (file)
@@ -144,7 +144,7 @@ int main(int argc, char **argv)
        /* Fill in the relative paths */
 #ifdef BR_CROSS_PATH_REL
        ret = snprintf(path, sizeof(path), "%s/" BR_CROSS_PATH_REL "/%s", absbasedir, basename);
-#elif BR_CROSS_PATH_ABS
+#elif defined(BR_CROSS_PATH_ABS)
        ret = snprintf(path, sizeof(path), BR_CROSS_PATH_ABS "/%s", basename);
 #else /* BR_CROSS_PATH_SUFFIX */
        ret = snprintf(path, sizeof(path), "%s/usr/bin/%s" BR_CROSS_PATH_SUFFIX, absbasedir, basename);