You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2026/01/19 15:22:54 UTC
(nuttx) 02/04: net/netdev: fix compile error and add cmake/makefile
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.git
commit 42da4e322aab07bfef1002798e68b26e4c0c82f2
Author: daichuan <da...@xiaomi.com>
AuthorDate: Sat Aug 30 01:18:03 2025 +0800
net/netdev: fix compile error and add cmake/makefile
Fix compilation errors and add build files
Signed-off-by: daichuan <da...@xiaomi.com>
---
net/netdev/CMakeLists.txt | 4 ++++
net/netdev/Make.defs | 4 ++++
net/netdev/netdev_checksum.c | 2 ++
3 files changed, 10 insertions(+)
diff --git a/net/netdev/CMakeLists.txt b/net/netdev/CMakeLists.txt
index ac4e60ebf17..1149a44d651 100644
--- a/net/netdev/CMakeLists.txt
+++ b/net/netdev/CMakeLists.txt
@@ -57,4 +57,8 @@ if(CONFIG_NETDEV_RSS)
list(APPEND SRCS netdev_notify_recvcpu.c)
endif()
+if(CONFIG_NETDEV_CHECKSUM)
+ list(APPEND SRCS netdev_checksum.c)
+endif()
+
target_sources(net PRIVATE ${SRCS})
diff --git a/net/netdev/Make.defs b/net/netdev/Make.defs
index 14bbe04fe97..81551344a42 100644
--- a/net/netdev/Make.defs
+++ b/net/netdev/Make.defs
@@ -48,6 +48,10 @@ ifeq ($(CONFIG_NETDEV_RSS),y)
NETDEV_CSRCS += netdev_notify_recvcpu.c
endif
+ifeq ($(CONFIG_NETDEV_CHECKSUM),y)
+NETDEV_CSRCS += netdev_checksum.c
+endif
+
# Include netdev build support
DEPPATH += --dep-path netdev
diff --git a/net/netdev/netdev_checksum.c b/net/netdev/netdev_checksum.c
index b8bf44e0c83..24ad4ac9f8d 100644
--- a/net/netdev/netdev_checksum.c
+++ b/net/netdev/netdev_checksum.c
@@ -25,6 +25,8 @@
****************************************************************************/
#include <nuttx/net/netdev.h>
+#include <nuttx/net/udp.h>
+#include <nuttx/net/tcp.h>
#include "netdev/netdev.h"