Skip to contentSkip to conversation

tcp-wrappers: Fix build with clang

PATCH Superseded Oleksiy Obitotskyy 2 participants 4 messages Mar 22, 2018 – Mar 23, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcp-wrappers: Fix build with clang

Fix non-void function 'fix_options' should return a value.

---
 .../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
meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch new file +30 -0
new file mode 100644
index 0000000..e601409
@@ -0,0 +1,30 @@
+From 46ade5e6f3bd3e11b6dd25fa0116c39753d2ba06 Mon Sep 17 00:00:00 2001
+From: Oleksiy Obitotskyy <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +1 -0
index 5fdbbce..8519da6 100644
@@ -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"
Signature · 1 line
2.10.3.dirty
#1 lore raw
Quoted 2 lines · Oleksiy Obitotskyy

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 ?

Quoted 63 lines
---
 .../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
meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch new file +30 -0
new file mode 100644
index 0000000..e601409
@@ -0,0 +1,30 @@
+From 46ade5e6f3bd3e11b6dd25fa0116c39753d2ba06 Mon Sep 17 00:00:00 2001
+From: Oleksiy Obitotskyy <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +1 -1
index 5fdbbce..8519da6 100644
@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw

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

Quoted 69 lines · Khem Raj
Quoted 2 lines · Oleksiy Obitotskyy

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 ?

Quoted 63 lines
---
  .../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

meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch new file +30 -0
new file mode 100644
index 0000000..e601409
@@ -0,0 +1,30 @@
+From 46ade5e6f3bd3e11b6dd25fa0116c39753d2ba06 Mon Sep 17 00:00:00 2001
+From: Oleksiy Obitotskyy <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +1 -1
index 5fdbbce..8519da6 100644
@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw
Quoted 7 lines · Oleksiy Obitotskyy (cisco)

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?

I would suggest that fix it also now while you are there.

Quoted 85 lines · Khem Raj
Quoted 81 lines
Quoted 3 lines · Oleksiy Obitotskyy

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 ?

Quoted 71 lines
---
  .../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

meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch new file +19 -0
@@ -0,0 +1,30 @@
+From 46ade5e6f3bd3e11b6dd25fa0116c39753d2ba06 Mon Sep 17 00:00:00 2001
+From: Oleksiy Obitotskyy <[email protected]>
+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 <[email protected]>
+---
+ 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";

meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Fix-build-with-clang.patch new file +11 -0
+
+ /* 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
+
meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb +1 -0
index 5fdbbce..8519da6 100644
@@ -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
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core