From f5c094aef1cce9b5764f4592b0612c5379f46d4a Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 20 May 2022 14:04:15 +0800 Subject: [PATCH] system/libuv: Skip compile strscpy.c when CONFIG_LIBUV_UTILS_TEST enable since test/test-strscpy.c will include it in this case Signed-off-by: Xiang Xiao --- system/libuv/0001-libuv-port-for-nuttx.patch | 14 -------------- system/libuv/Makefile | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/system/libuv/0001-libuv-port-for-nuttx.patch b/system/libuv/0001-libuv-port-for-nuttx.patch index 224dd366e..eb7d6f34d 100644 --- a/system/libuv/0001-libuv-port-for-nuttx.patch +++ b/system/libuv/0001-libuv-port-for-nuttx.patch @@ -1900,20 +1900,6 @@ index 10cbf95e..7de04a91 100644 uv_idle_init(uv_default_loop(), &idle_handle); uv_idle_start(&idle_handle, idle_cb); -diff --git a/test/test-strscpy.c b/test/test-strscpy.c -index 4e7db6ff..f1d3e3ac 100644 ---- a/test/test-strscpy.c -+++ b/test/test-strscpy.c -@@ -24,7 +24,9 @@ - #include - - #include "../src/strscpy.h" -+#ifndef __NuttX__ - #include "../src/strscpy.c" -+#endif - - TEST_IMPL(strscpy) { - char d[4]; diff --git a/test/test-thread.c b/test/test-thread.c index 8de5a6f0..11e3cf80 100644 --- a/test/test-thread.c diff --git a/system/libuv/Makefile b/system/libuv/Makefile index fe15c5479..e56f31509 100644 --- a/system/libuv/Makefile +++ b/system/libuv/Makefile @@ -71,10 +71,10 @@ CSRCS += uv-data-getter-setters.c CSRCS += version.c ifneq ($(CONFIG_LIBUV_UTILS_TEST),) CSRCS += idna.c +CSRCS += strscpy.c endif CSRCS += no-fsevents.c CSRCS += uv-common.c -CSRCS += strscpy.c CSRCS += random-devurandom.c CSRCS += random.c CSRCS += nuttx.c