[OE-core] [PATCH] tcp-wrappers: Fix build with clang
Oleksiy Obitotskyy (cisco)
oobitots at cisco.com
Fri Mar 23 11:16:56 UTC 2018
Hello,
I would like to clarify your question.
Function fix_options has no prototype into tcpd.c and miscd.c and
generate warnings
'warning: implicit declaration of function' but links fine.
So should I add prototype for fix_options or leave it as is?
Regards,
Oleksiy
On 23.03.18 07:21, Khem Raj wrote:
> On Thu, Mar 22, 2018 at 10:37 AM, Oleksiy Obitotskyy <oobitots at cisco.com> wrote:
>> Fix non-void function 'fix_options' should return a value.
>>
> this patch is ok. Can you also check if this function signature is needed in
> other source files as well ?
>
>> Signed-off-by: Oleksiy Obitotskyy <oobitots at cisco.com>
>> ---
>> .../0001-Fix-build-with-clang.patch | 30 ++++++++++++++++++++++
>> .../tcp-wrappers/tcp-wrappers_7.6.bb | 1 +
>> 2 files changed, 31 insertions(+)
>> create mode 100644 meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch
>>
>> diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch
>> new file mode 100644
>> index 0000000..e601409
>> --- /dev/null
>> +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch
>> @@ -0,0 +1,30 @@
>> +From 46ade5e6f3bd3e11b6dd25fa0116c39753d2ba06 Mon Sep 17 00:00:00 2001
>> +From: Oleksiy Obitotskyy <oobitots at cisco.com>
>> +Date: Mon, 5 Feb 2018 08:29:10 -0800
>> +Subject: [PATCH] Fix build with clang
>> +
>> +Fix "error: non-void function 'fix_options' should return a value".
>> +
>> +Upstream-Status: Pending
>> +
>> +Signed-off-by: Oleksiy Obitotskyy <oobitots at cisco.com>
>> +---
>> + fix_options.c | 2 +-
>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>> +
>> +diff --git a/fix_options.c b/fix_options.c
>> +index b5e81b8..9958ff4 100644
>> +--- a/fix_options.c
>> ++++ b/fix_options.c
>> +@@ -29,7 +29,7 @@ static char sccsid[] = "@(#) fix_options.c 1.6 97/04/08 02:29:19";
>> +
>> + /* fix_options - get rid of IP-level socket options */
>> +
>> +-fix_options(request)
>> ++void fix_options(request)
>> + struct request_info *request;
>> + {
>> + #ifdef IP_OPTIONS
>> +--
>> +2.10.3.dirty
>> +
>> diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
>> index 5fdbbce..8519da6 100644
>> --- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
>> +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
>> @@ -44,6 +44,7 @@ SRC_URI = "ftp://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
>> file://safe_finger.8 \
>> file://makefile-fix-parallel.patch \
>> file://musl-decls.patch \
>> + file://0001-Fix-build-with-clang.patch \
>> "
>>
>> SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
>> --
>> 2.10.3.dirty
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
More information about the Openembedded-core
mailing list