This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 44d2250b6 apps: Fix compilation error after nuttx/arch.h excluded.
44d2250b6 is described below
commit 44d2250b6e343e37087d2a740c565662a762be38
Author: ouyangxiangzhen <[email protected]>
AuthorDate: Fri Jul 12 16:16:28 2024 +0800
apps: Fix compilation error after nuttx/arch.h excluded.
This patch fix compilation error after excluding nuttx/arch.h.
Signed-off-by: ouyangxiangzhen <[email protected]>
---
examples/oneshot/oneshot_main.c | 1 +
nshlib/nsh_parse.c | 2 +-
system/coredump/coredump.c | 2 ++
system/fastboot/fastboot.c | 1 +
system/ntpc/ntpcstatus_main.c | 1 +
system/readline/readline.c | 1 +
testing/drivertest/drivertest_oneshot.c | 1 +
testing/drivertest/drivertest_watchdog.c | 2 ++
testing/getprime/getprime_main.c | 1 +
testing/ostest/ostest_main.c | 2 +-
10 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/examples/oneshot/oneshot_main.c b/examples/oneshot/oneshot_main.c
index c78975d1f..c7c505da3 100644
--- a/examples/oneshot/oneshot_main.c
+++ b/examples/oneshot/oneshot_main.c
@@ -34,6 +34,7 @@
#include <errno.h>
#include <unistd.h>
+#include <nuttx/clock.h>
#include <nuttx/timers/oneshot.h>
/****************************************************************************
diff --git a/nshlib/nsh_parse.c b/nshlib/nsh_parse.c
index 01583aed6..ed4db317e 100644
--- a/nshlib/nsh_parse.c
+++ b/nshlib/nsh_parse.c
@@ -40,10 +40,10 @@
#include <nuttx/version.h>
#include <nuttx/sched_note.h>
-#include "nshlib/nshlib.h"
#include "nsh.h"
#include "nsh_console.h"
+#include "nshlib/nshlib.h"
/****************************************************************************
* Pre-processor Definitions
diff --git a/system/coredump/coredump.c b/system/coredump/coredump.c
index 2dfc61f5a..c4f725761 100644
--- a/system/coredump/coredump.c
+++ b/system/coredump/coredump.c
@@ -36,6 +36,8 @@
#include <nuttx/binfmt/binfmt.h>
#include <nuttx/streams.h>
+#include <nuttx/sched.h>
+#include <nuttx/coredump.h>
/****************************************************************************
* Private Types
diff --git a/system/fastboot/fastboot.c b/system/fastboot/fastboot.c
index dfd46cc27..377b37402 100644
--- a/system/fastboot/fastboot.c
+++ b/system/fastboot/fastboot.c
@@ -28,6 +28,7 @@
#include <errno.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
diff --git a/system/ntpc/ntpcstatus_main.c b/system/ntpc/ntpcstatus_main.c
index 3ef27f0ae..73c251db5 100644
--- a/system/ntpc/ntpcstatus_main.c
+++ b/system/ntpc/ntpcstatus_main.c
@@ -23,6 +23,7 @@
****************************************************************************/
#include <nuttx/config.h>
+#include <nuttx/clock.h>
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/system/readline/readline.c b/system/readline/readline.c
index dc675deb7..b077b4e86 100644
--- a/system/readline/readline.c
+++ b/system/readline/readline.c
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include "system/readline.h"
diff --git a/testing/drivertest/drivertest_oneshot.c
b/testing/drivertest/drivertest_oneshot.c
index 6d190fe73..99b96d061 100644
--- a/testing/drivertest/drivertest_oneshot.c
+++ b/testing/drivertest/drivertest_oneshot.c
@@ -38,6 +38,7 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <syslog.h>
+#include <nuttx/clock.h>
#include <nuttx/timers/oneshot.h>
/****************************************************************************
diff --git a/testing/drivertest/drivertest_watchdog.c
b/testing/drivertest/drivertest_watchdog.c
index e1a807f06..b55cd0c6a 100644
--- a/testing/drivertest/drivertest_watchdog.c
+++ b/testing/drivertest/drivertest_watchdog.c
@@ -42,6 +42,8 @@
#include <stdint.h>
#include <cmocka.h>
#include <time.h>
+
+#include <nuttx/arch.h>
#include <nuttx/timers/watchdog.h>
/****************************************************************************
diff --git a/testing/getprime/getprime_main.c b/testing/getprime/getprime_main.c
index 910aef797..39ba94feb 100644
--- a/testing/getprime/getprime_main.c
+++ b/testing/getprime/getprime_main.c
@@ -23,6 +23,7 @@
****************************************************************************/
#include <nuttx/config.h>
+#include <nuttx/clock.h>
#include <assert.h>
#include <pthread.h>
diff --git a/testing/ostest/ostest_main.c b/testing/ostest/ostest_main.c
index 377196455..26f6f7d7c 100644
--- a/testing/ostest/ostest_main.c
+++ b/testing/ostest/ostest_main.c
@@ -370,7 +370,7 @@ static int user_main(int argc, char *argv[])
check_test_memory_usage();
#endif
-#if !defined(CONFIG_DISABLE_PTHREAD) && \
+#if !defined(CONFIG_DISABLE_PTHREAD) && defined(__KERNEL__) && \
(defined(CONFIG_SCHED_LPWORK) || defined(CONFIG_SCHED_HPWORK))
/* Check work queues */