From cb206a589aa8e24fbb6f4e7949ef26c997f8d0ad Mon Sep 17 00:00:00 2001 From: Joris Vink Date: Fri, 30 Mar 2018 13:47:32 +0200 Subject: [PATCH] Use kore_source headers if single_binary is set. Before kodev always picked up the kore headers installed on the system. This presented some annoying problems as the system headers may not match the headers used by the kore_source you're actually building against. --- src/cli.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/cli.c b/src/cli.c index c50d826..e6336fd 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1691,7 +1691,12 @@ cli_build_flags_common(struct buildopt *bopt, struct cli_buf *buf) char *data; cli_buf_appendf(buf, "-fPIC -Isrc -Isrc/includes "); - cli_buf_appendf(buf, "-I%s/include ", PREFIX); + + if (bopt->single_binary == 0) + cli_buf_appendf(buf, "-I%s/include ", PREFIX); + else + cli_buf_appendf(buf, "-I%s/include ", bopt->kore_source); + #if defined(__MACH__) /* Add default openssl include path from homebrew / ports under OSX. */ cli_buf_appendf(buf, "-I/opt/local/include ");