[oe-commits] [openembedded-core] 04/07: tcp-wrappers: Remove redundant forward declarations

git at git.openembedded.org git at git.openembedded.org
Tue Jan 21 07:34:16 UTC 2020


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 61a3d0215bae31c4d2c2dbcd0d4707ab5a7a7ca4
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Mon Jan 20 09:52:28 2020 -0800

    tcp-wrappers: Remove redundant forward declarations
    
    fgets is already in stdio.h, and it can confuse the compilers when using
    fortified headers, therefore remove the declarations
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../0001-Remove-fgets-extern-declaration.patch     | 43 ++++++++++++++++++++++
 .../tcp-wrappers/tcp-wrappers_7.6.bb               |  1 +
 2 files changed, 44 insertions(+)

diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Remove-fgets-extern-declaration.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Remove-fgets-extern-declaration.patch
new file mode 100644
index 0000000..88c8d9c
--- /dev/null
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/0001-Remove-fgets-extern-declaration.patch
@@ -0,0 +1,43 @@
+From 24d10919b4bc5e37a2d80b274d2cd2ee77b03549 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Mon, 13 Jan 2020 14:25:47 -0800
+Subject: [PATCH] Remove fgets() extern declaration
+
+These sources already include <stdio.h> which should bring the correct
+declaration
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ hosts_access.c | 1 -
+ misc.c         | 2 --
+ 2 files changed, 3 deletions(-)
+
+diff --git a/hosts_access.c b/hosts_access.c
+index 329b35e..0133e5e 100644
+--- a/hosts_access.c
++++ b/hosts_access.c
+@@ -44,7 +44,6 @@ static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
+ #include <netdb.h>
+ #endif
+ 
+-extern char *fgets();
+ extern int errno;
+ 
+ #ifndef	INADDR_NONE
+diff --git a/misc.c b/misc.c
+index 74ca319..9a5e73a 100644
+--- a/misc.c
++++ b/misc.c
+@@ -18,8 +18,6 @@ static char sccsic[] = "@(#) misc.c 1.2 96/02/11 17:01:29";
+ 
+ #include "tcpd.h"
+ 
+-extern char *fgets();
+-
+ #ifndef	INADDR_NONE
+ #define	INADDR_NONE	(-1)		/* XXX should be 0xffffffff */
+ #endif
+-- 
+2.24.1
+
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 bd0c84c..e903b9d 100644
--- a/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -49,6 +49,7 @@ SRC_URI = "http://ftp.porcupine.org/pub/security/tcp_wrappers_${PV}.tar.gz \
            file://0001-Fix-build-with-clang.patch \
            file://fix_warnings.patch \
            file://fix_warnings2.patch \
+           file://0001-Remove-fgets-extern-declaration.patch \
            "
 
 SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list