Fix build error caused by -Werror-implicit-function-declaration for Android
PATCH 1/1 Fix build error caused by -Werror-implicit-function-declaration for Android
Fix build errors caused by -Werror-implicit-function-declaration by add missing <string.h> and <strings.h> for Android.
--- include/tst_numa.h | 2 ++ include/tst_test.h | 1 + testcases/kernel/syscalls/copy_file_range/copy_file_range01.c | 1 + testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c | 2 +- testcases/kernel/syscalls/epoll_wait/epoll_wait01.c | 1 + 5 files changed, 6 insertions(+), 1 deletion(-)
include/tst_numa.h +2 -0
@@ -7,6 +7,8 @@#ifndef TST_NUMA_H__ #define TST_NUMA_H__ +#include <string.h> +/** * Numa nodemap. */
include/tst_test.h +1 -0
@@ -24,6 +24,7 @@#include <unistd.h> #include <limits.h> +#include <string.h> #include "tst_common.h" #include "tst_res_flags.h"
testcases/kernel/syscalls/copy_file_range/copy_file_range01.c +1 -0
@@ -15,6 +15,7 @@#define _GNU_SOURCE#include <stdio.h> #include <errno.h> +#include <stdlib.h> #include "tst_test.h" #include "tst_safe_stdio.h" #include "lapi/syscalls.h"
testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c +1 -1
@@ -31,7 +31,7 @@#include <sys/epoll.h> #include <poll.h> -#include <string.h> +#include <strings.h> #include <errno.h> #include "tst_test.h"
testcases/kernel/syscalls/epoll_wait/epoll_wait01.c +1 -0
@@ -26,6 +26,7 @@#include <sys/epoll.h> #include <poll.h> #include <string.h> +#include <strings.h> #include <errno.h> #include "tst_test.h"
Signature · 1 line
2.7.4
PATCH 1/1 Fix build error caused by -Werror-implicit-function-declaration for Android
Quoted 5 lines · Zhengwang Ruan
Fix build errors caused by -Werror-implicit-function-declaration by add missing <
string.h> and <strings.h> for Android.
Comment next time: it would be a good idea a to note what functions were missing.
Quoted 1 line
Signed-off-by Zhengwang Ruan <[email protected]>
Quoted 50 lines
---
include/tst_numa.h | 2 ++ include/tst_test.h | 1 + testcases/kernel/syscalls/copy_file_range/copy_file_range01.c | 1 + testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c | 2 +- testcases/kernel/syscalls/epoll_wait/epoll_wait01.c | 1 + 5 files changed, 6 insertions(+), 1 deletion(-)include/tst_numa.h +2
-0@@ -7,6 +7,8 @@#ifndef TST_NUMA_H__ #define TST_NUMA_H__ +#include <string.h> +/** * Numa nodemap. */ include/tst_test.h +1
-0@@ -24,6 +24,7 @@#include <unistd.h> #include <limits.h> +#include <string.h> #include "tst_common.h" #include "tst_res_flags.h" testcases/kernel/syscalls/copy_file_range/copy_file_range01.c +1
-0@@ -15,6 +15,7 @@#define _GNU_SOURCE#include <stdio.h> #include <errno.h> +#include <stdlib.h> #include "tst_test.h" #include "tst_safe_stdio.h" #include "lapi/syscalls.h" testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c +0
-0
testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c line 34
Quoted 5 lines
testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c +1
-1@@ -31,7 +31,7 @@#include <sys/epoll.h> #include <poll.h> -#include <string.h> +#include <strings.h>
Just a general question: did you test the non-Android case?
Quoted 21 lines
testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c +0
-0#include <errno.h> #include "tst_test.h" testcases/kernel/syscalls/epoll_wait/epoll_wait01.c +1
-0@@ -26,6 +26,7 @@#include <sys/epoll.h> #include <poll.h> #include <string.h> +#include <strings.h> #include <errno.h> #include "tst_test.h" Signature · 5 lines
2.7.4 -- Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH 1/1 Fix build error caused by -Werror-implicit-function-declaration for Android
Hi Cooper,
-------- Original Message --------
From: Enji Cooper
Sent: Thu, 11 Apr 2019 08:16:00 -0700
To: Zhengwang Ruan
Cc: Ltp
Subject: Re: [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android
Quoted 60 lines
Quoted 4 lines · Zhengwang Ruan
Fix build errors caused by -Werror-implicit-function-declaration by add missing <
string.h> and <strings.h> for Android.Comment next time: it would be a good idea a to note what functions were missing.
Quoted 1 line
Signed-off-by Zhengwang Ruan <[email protected]>Reviewed-by Enji Cooper <[email protected]>Quoted 51 lines
---
include/tst_numa.h | 2 ++ include/tst_test.h | 1 + testcases/kernel/syscalls/copy_file_range/copy_file_range01.c | 1 + testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c | 2 +- testcases/kernel/syscalls/epoll_wait/epoll_wait01.c | 1 + 5 files changed, 6 insertions(+), 1 deletion(-)include/tst_numa.h +2
-0@@ -7,6 +7,8 @@#ifndef TST_NUMA_H__ #define TST_NUMA_H__ +#include <string.h> +/** * Numa nodemap. */ include/tst_test.h +1
-0@@ -24,6 +24,7 @@#include <unistd.h> #include <limits.h> +#include <string.h> #include "tst_common.h" #include "tst_res_flags.h" testcases/kernel/syscalls/copy_file_range/copy_file_range01.c +1
-0@@ -15,6 +15,7 @@#define _GNU_SOURCE#include <stdio.h> #include <errno.h> +#include <stdlib.h> #include "tst_test.h" #include "tst_safe_stdio.h" #include "lapi/syscalls.h" testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c +0
-0@@ -31,7 +31,7 @@
Quoted 5 lines
testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c line 34
Quoted 4 lines
testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c +1
-1#include <sys/epoll.h> #include <poll.h> -#include <string.h> +#include <strings.h> Just a general question: did you test the non-Android case?
Yes, I have tested it using the default gcc on my Ubuntu 16.04 host.
Kind Regards,
Zhengwang
Quoted 15 lines
Quoted 15 lines
testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c +0
-0#include <errno.h> #include "tst_test.h" testcases/kernel/syscalls/epoll_wait/epoll_wait01.c +1
-0@@ -26,6 +26,7 @@#include <sys/epoll.h> #include <poll.h> #include <string.h> +#include <strings.h> #include <errno.h>
Quoted 7 lines
Quoted 7 lines
testcases/kernel/syscalls/epoll_wait/epoll_wait01.c +0
-0#include "tst_test.h" Signature · 5 lines
2.7.4 -- Mailing list info: https://lists.linux.it/listinfo/ltp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190412/819835a5/attachment.html>
PATCH 1/1 Fix build error caused by -Werror-implicit-function-declaration for Android
In reply to Zhengwang RuanHi,
Quoted 4 lines
Fix build errors caused by -Werror-implicit-function-declaration by add missing <
string.h> and <strings.h> for Android.Signed-off-by Zhengwang Ruan <[email protected]>
See also
http://lists.linux.it/pipermail/ltp/2019-April/011655.html
Kind regards,
Petr
PATCH 1/1 Fix build error caused by -Werror-implicit-function-declaration for Android
Hi Petr,
-------- Original Message --------
From: Petr Vorel
Sent: Fri, 12 Apr 2019 01:33:30 +0200
To: Zhengwang Ruan
Cc: Ltp
Subject: Re: [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android
Quoted 5 lines
Hi,
Quoted 3 lines
Fix build errors caused by -Werror-implicit-function-declaration by add missing <
string.h> and <strings.h> for Android.Signed-off-by Zhengwang Ruan <[email protected]>
Quoted 8 lines
Reviewed-by Petr Vorel <[email protected]>Suggested-by Petr Vorel <[email protected]>See also
http://lists.linux.it/pipermail/ltp/2019-April/011655.htmlKind regards,
Petr
Back to this thread, do you prefer this patch and accept it now? :-)
Kind Regards,
Zhengwang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190412/2d583e05/attachment-0001.html>
PATCH 1/1 Fix build error caused by -Werror-implicit-function-declaration for Android
In reply to Zhengwang RuanHi all,
Quoted 4 lines
Fix build errors caused by -Werror-implicit-function-declaration by add missing <
string.h> and <strings.h> for Android.Signed-off-by Zhengwang Ruan <[email protected]>
In the end merged this one (after rebase), which fixes android build for now and added a ticket for replacing deprecated functions from <strings.h>
https://github.com/linux-test-project/ltp/issues/521
Zhengwang, thanks for your work and testing.
Kind regards,
Petr