All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android
@ 2019-04-11 14:18 Zhengwang Ruan
  2019-04-11 15:16 ` Enji Cooper
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Zhengwang Ruan @ 2019-04-11 14:18 UTC (permalink / raw)
  To: ltp

Fix build errors caused by -Werror-implicit-function-declaration by add missing
<string.h> and <strings.h> for Android.

Signed-off-by: Zhengwang Ruan <ruanzw@xiaopeng.com>
---
 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(-)

diff --git a/include/tst_numa.h b/include/tst_numa.h
index a4cd1be..4f98066 100644
--- a/include/tst_numa.h
+++ b/include/tst_numa.h
@@ -7,6 +7,8 @@
 #ifndef TST_NUMA_H__
 #define TST_NUMA_H__
 
+#include <string.h>
+
 /**
  * Numa nodemap.
  */
diff --git a/include/tst_test.h b/include/tst_test.h
index cf2447f..25b9763 100644
--- a/include/tst_test.h
+++ b/include/tst_test.h
@@ -24,6 +24,7 @@
 
 #include <unistd.h>
 #include <limits.h>
+#include <string.h>
 
 #include "tst_common.h"
 #include "tst_res_flags.h"
diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
index 2bca8a4..61a6042 100644
--- a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
+++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
@@ -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"
diff --git a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
index e837913..4df55b5 100644
--- a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
+++ b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
@@ -31,7 +31,7 @@
 
 #include <sys/epoll.h>
 #include <poll.h>
-#include <string.h>
+#include <strings.h>
 #include <errno.h>
 #include "tst_test.h"
 
diff --git a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
index 0ded127..6099b84 100644
--- a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
+++ b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
@@ -26,6 +26,7 @@
 #include <sys/epoll.h>
 #include <poll.h>
 #include <string.h>
+#include <strings.h>
 #include <errno.h>
 
 #include "tst_test.h"
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android
  2019-04-11 14:18 [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android Zhengwang Ruan
@ 2019-04-11 15:16 ` Enji Cooper
  2019-04-12  2:07   ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
  2019-04-11 23:33 ` Petr Vorel
  2019-04-15 13:49 ` Petr Vorel
  2 siblings, 1 reply; 6+ messages in thread
From: Enji Cooper @ 2019-04-11 15:16 UTC (permalink / raw)
  To: ltp


> On Apr 11, 2019, at 07:18, Zhengwang Ruan <ruanzw@xiaopeng.com> wrote:
> 
> 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.

> Signed-off-by: Zhengwang Ruan <ruanzw@xiaopeng.com>

Reviewed-by: Enji Cooper <yaneurabeya@gmail.com>

> ---
> 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(-)
> 
> diff --git a/include/tst_numa.h b/include/tst_numa.h
> index a4cd1be..4f98066 100644
> --- a/include/tst_numa.h
> +++ b/include/tst_numa.h
> @@ -7,6 +7,8 @@
> #ifndef TST_NUMA_H__
> #define TST_NUMA_H__
> 
> +#include <string.h>
> +
> /**
>  * Numa nodemap.
>  */
> diff --git a/include/tst_test.h b/include/tst_test.h
> index cf2447f..25b9763 100644
> --- a/include/tst_test.h
> +++ b/include/tst_test.h
> @@ -24,6 +24,7 @@
> 
> #include <unistd.h>
> #include <limits.h>
> +#include <string.h>
> 
> #include "tst_common.h"
> #include "tst_res_flags.h"
> diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
> index 2bca8a4..61a6042 100644
> --- a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
> +++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
> @@ -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"
> diff --git a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
> index e837913..4df55b5 100644
> --- a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
> +++ b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
> @@ -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?

> #include <errno.h>
> #include "tst_test.h"
> 
> diff --git a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
> index 0ded127..6099b84 100644
> --- a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
> +++ b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
> @@ -26,6 +26,7 @@
> #include <sys/epoll.h>
> #include <poll.h>
> #include <string.h>
> +#include <strings.h>
> #include <errno.h>
> 
> #include "tst_test.h"
> -- 
> 2.7.4
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android
  2019-04-11 14:18 [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android Zhengwang Ruan
  2019-04-11 15:16 ` Enji Cooper
@ 2019-04-11 23:33 ` Petr Vorel
  2019-04-12 15:41   ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
  2019-04-15 13:49 ` Petr Vorel
  2 siblings, 1 reply; 6+ messages in thread
From: Petr Vorel @ 2019-04-11 23:33 UTC (permalink / raw)
  To: ltp

Hi,

> Fix build errors caused by -Werror-implicit-function-declaration by add missing
> <string.h> and <strings.h> for Android.

> Signed-off-by: Zhengwang Ruan <ruanzw@xiaopeng.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Suggested-by: Petr Vorel <pvorel@suse.cz>

See also
http://lists.linux.it/pipermail/ltp/2019-April/011655.html

Kind regards,
Petr

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android
  2019-04-11 15:16 ` Enji Cooper
@ 2019-04-12  2:07   ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
  0 siblings, 0 replies; 6+ messages in thread
From: =?unknown-8bit?b?6Ziu5q2j5pe6?= @ 2019-04-12  2:07 UTC (permalink / raw)
  To: ltp

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
>> On Apr 11, 2019, at 07:18, Zhengwang Ruan <ruanzw@xiaopeng.com> wrote:
>>
>> 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.
>
>> Signed-off-by: Zhengwang Ruan <ruanzw@xiaopeng.com>
> Reviewed-by: Enji Cooper <yaneurabeya@gmail.com>
>
>> ---
>> 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(-)
>>
>> diff --git a/include/tst_numa.h b/include/tst_numa.h
>> index a4cd1be..4f98066 100644
>> --- a/include/tst_numa.h
>> +++ b/include/tst_numa.h
>> @@ -7,6 +7,8 @@
>> #ifndef TST_NUMA_H__
>> #define TST_NUMA_H__
>>
>> +#include <string.h>
>> +
>> /**
>>   * Numa nodemap.
>>   */
>> diff --git a/include/tst_test.h b/include/tst_test.h
>> index cf2447f..25b9763 100644
>> --- a/include/tst_test.h
>> +++ b/include/tst_test.h
>> @@ -24,6 +24,7 @@
>>
>> #include <unistd.h>
>> #include <limits.h>
>> +#include <string.h>
>>
>> #include "tst_common.h"
>> #include "tst_res_flags.h"
>> diff --git a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
>> index 2bca8a4..61a6042 100644
>> --- a/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
>> +++ b/testcases/kernel/syscalls/copy_file_range/copy_file_range01.c
>> @@ -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"
>> diff --git a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
>> index e837913..4df55b5 100644
>> --- a/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
>> +++ b/testcases/kernel/syscalls/epoll_ctl/epoll_ctl01.c
>> @@ -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?

Yes, I have tested it using the default gcc on my Ubuntu 16.04 host.


Kind Regards,

Zhengwang

>
>> #include <errno.h>
>> #include "tst_test.h"
>>
>> diff --git a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
>> index 0ded127..6099b84 100644
>> --- a/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
>> +++ b/testcases/kernel/syscalls/epoll_wait/epoll_wait01.c
>> @@ -26,6 +26,7 @@
>> #include <sys/epoll.h>
>> #include <poll.h>
>> #include <string.h>
>> +#include <strings.h>
>> #include <errno.h>
>>
>> #include "tst_test.h"
>> -- 
>> 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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android
  2019-04-11 23:33 ` Petr Vorel
@ 2019-04-12 15:41   ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
  0 siblings, 0 replies; 6+ messages in thread
From: =?unknown-8bit?b?6Ziu5q2j5pe6?= @ 2019-04-12 15:41 UTC (permalink / raw)
  To: ltp

  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
> Hi,
>
>> Fix build errors caused by -Werror-implicit-function-declaration by add missing
>> <string.h> and <strings.h> for Android.
>> Signed-off-by: Zhengwang Ruan <ruanzw@xiaopeng.com>
> Reviewed-by: Petr Vorel <pvorel@suse.cz>
> Suggested-by: Petr Vorel <pvorel@suse.cz>
>
> See also
> http://lists.linux.it/pipermail/ltp/2019-April/011655.html
>
> Kind 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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android
  2019-04-11 14:18 [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android Zhengwang Ruan
  2019-04-11 15:16 ` Enji Cooper
  2019-04-11 23:33 ` Petr Vorel
@ 2019-04-15 13:49 ` Petr Vorel
  2 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2019-04-15 13:49 UTC (permalink / raw)
  To: ltp

Hi all,

> Fix build errors caused by -Werror-implicit-function-declaration by add missing
> <string.h> and <strings.h> for Android.

> Signed-off-by: Zhengwang Ruan <ruanzw@xiaopeng.com>
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-04-15 13:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-11 14:18 [LTP] [PATCH v1] Fix build error caused by -Werror-implicit-function-declaration for Android Zhengwang Ruan
2019-04-11 15:16 ` Enji Cooper
2019-04-12  2:07   ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-11 23:33 ` Petr Vorel
2019-04-12 15:41   ` =?unknown-8bit?b?6Ziu5q2j5pe6?=
2019-04-15 13:49 ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.