Commit 41a4f1c2 authored by 4ast's avatar 4ast

Merge pull request #55 from iovisor/bblanco_dev

Cleanups for some build/compile failures
parents 270314c6 260d516d
......@@ -52,7 +52,7 @@ int KBuildHelper::learn_flags(const string &tmpdir, const char *uname_release, c
if (!cf)
return -1;
}
string cmd = "make -s";
string cmd = "make CROSS_COMPILE= -s";
cmd += " -C " KERNEL_MODULES_DIR "/" + string(uname_release) + "/build";
cmd += " M=" + tmpdir + " dummy.o";
int rc = ::system(cmd.c_str());
......
......@@ -57,7 +57,7 @@ class DirStack {
char cwd_[256];
};
static int ftw_cb(const char *path, const struct stat *, int) {
static int ftw_cb(const char *path, const struct stat *, int, struct FTW *) {
return ::remove(path);
}
......@@ -73,7 +73,7 @@ class TmpDir {
ok_ = true;
}
~TmpDir() {
if (::ftw(prefix_.c_str(), ftw_cb, 20) < 0)
if (::nftw(prefix_.c_str(), ftw_cb, 20, FTW_DEPTH) < 0)
::perror("ftw");
else
::remove(prefix_.c_str());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment