tcp_wrappers: fix compilation without cdefs 13165/head
authorRosen Penev <rosenp@gmail.com>
Wed, 1 Jul 2020 05:38:21 +0000 (22:38 -0700)
committerRosen Penev <rosenp@gmail.com>
Tue, 18 Aug 2020 22:03:29 +0000 (15:03 -0700)
__DECLS are glibc specific.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/tcp_wrappers/Makefile
libs/tcp_wrappers/patches/001-debian_subset.patch

index 3bfa9d4e507516503418afe1fbbe290efc0c6b03..c3daa662098dc321276026d4d9362d4bd0ed8290 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tcp_wrappers
 PKG_VERSION:=7.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.porcupine.org/pub/security
index 0b3ad2cea12439bdbb2868d36139faa13c7f9db5..5e3a8fc4c51720b52af361713bbc8d0da708bc36 100644 (file)
@@ -38,7 +38,7 @@
        return (STR_NE(eval_hostaddr(host), unknown) && HOSTNAME_KNOWN(name));
 --- a/tcpd.h
 +++ b/tcpd.h
-@@ -4,6 +4,25 @@
+@@ -4,6 +4,27 @@
    * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
    */
  
 +#include <netinet/in.h>
 +#include <stdio.h>
 +
-+__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
 +
  /* Structure to describe one communications endpoint. */
  
  #define STRING_LENGTH 128             /* hosts, users, processes */
-@@ -25,10 +44,10 @@ struct request_info {
+@@ -25,10 +46,10 @@ struct request_info {
      char    pid[10];                  /* access via eval_pid(request) */
      struct host_info client[1];               /* client endpoint info */
      struct host_info server[1];               /* server endpoint info */
@@ -79,7 +81,7 @@
      struct netconfig *config;         /* netdir handle */
  };
  
-@@ -61,25 +80,30 @@ extern char paranoid[];
+@@ -61,25 +82,30 @@ extern char paranoid[];
  /* Global functions. */
  
  #if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT)
  extern char *hosts_allow_table;               /* for verification mode redirection */
  extern char *hosts_deny_table;                /* for verification mode redirection */
  extern int hosts_access_verbose;      /* for verbose matching mode */
-@@ -92,9 +116,14 @@ extern int resident;                       /* > 0 if residen
+@@ -92,9 +118,14 @@ extern int resident;                       /* > 0 if resident process */
    */
  
  #ifdef __STDC__
  extern struct request_info *request_init();   /* initialize request */
  extern struct request_info *request_set();    /* update request structure */
  #endif
-@@ -117,27 +146,31 @@ extern struct request_info *request_set(
+@@ -117,27 +148,31 @@ extern struct request_info *request_set();       /* update request structure */
    * host_info structures serve as caches for the lookup results.
    */
  
  #endif
  
   /*
-@@ -178,7 +211,7 @@ extern struct tcpd_context tcpd_context;
+@@ -178,7 +213,7 @@ extern struct tcpd_context tcpd_context;
    * behavior.
    */
  
  extern int dry_run;                   /* verification flag */
  
  /* Bug workarounds. */
-@@ -217,3 +250,7 @@ extern char *fix_strtok();
+@@ -217,3 +252,9 @@ extern char *fix_strtok();
  #define strtok        my_strtok
  extern char *my_strtok();
  #endif
 +
-+__END_DECLS
++#ifdef __cplusplus
++}
++#endif
 +
 +#endif /* tcpd.h */
 --- a/Makefile