-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Description
The full error is:
lcc: "/root/dev/native-platform-0.22-milestone-28/native-platform/src/main/cpp/posix.cpp", line 38: catastrophic error #1696:
cannot open source file "sys/sysctl.h"
#include <sys/sysctl.h>
^
1 catastrophic error detected in the compilation of "/root/dev/native-platform-0.22-milestone-28/native-platform/src/main/cpp/posix.cpp".
Compilation terminated.
And sure enough, there is no /usr/include/sys/sysctl.h, but /usr/include/linux/sysctl.h
However, the following patch fixed the compilation issue for me:
diff --git a/native-platform/src/main/cpp/posix.cpp b/native-platform/src/main/cpp/posix.cpp
index fd69af8..a736fec 100644
--- a/native-platform/src/main/cpp/posix.cpp
+++ b/native-platform/src/main/cpp/posix.cpp
@@ -35,7 +35,7 @@
#include <sys/utsname.h>
#include <termios.h>
#include <unistd.h>
-#include <sys/sysctl.h>
+#include <linux/sysctl.h>
jmethodID fileStatDetailsMethodId;
Metadata
Metadata
Assignees
Labels
No labels