<pre style='margin:0'>
Chih-Hsuan Yen (yan12125) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/00c521ae93b2fb0b9a716e198e1e5a9af24bda86">https://github.com/macports/macports-ports/commit/00c521ae93b2fb0b9a716e198e1e5a9af24bda86</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 00c521ae93b2fb0b9a716e198e1e5a9af24bda86
</span>Author: Chih-Hsuan Yen <yan12125@macports.org>
AuthorDate: Sat Jun 22 03:30:39 2019 +0800
<span style='display:block; white-space:pre;color:#404040;'> tcp_wrappers: fix prototypes in headers
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Lots of function protypes in tcpd.h are broken if it's included in
</span><span style='display:block; white-space:pre;color:#404040;'> C++ source files. In the old C days, it's allowed to define a function
</span><span style='display:block; white-space:pre;color:#404040;'> prototype without arguments and call it with one or more arguments.
</span><span style='display:block; white-space:pre;color:#404040;'> That's not allowed in C++, though. fix-prototypes.patch makes
</span><span style='display:block; white-space:pre;color:#404040;'> function prototypes and function definitions consistent.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Some projects maintain their own function prototypes instead of using
</span><span style='display:block; white-space:pre;color:#404040;'> ones from tcpd.h, so they are affected by such an inconsistency.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> fix-progress.patch is based on Debian's patches [1][2]
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> [1] https://salsa.debian.org/md/tcp-wrappers/blob/debian/7.6.q-28/debian/patches/13_shlib_weaksym
</span><span style='display:block; white-space:pre;color:#404040;'> [2] https://salsa.debian.org/md/tcp-wrappers/blob/debian/7.6.q-28/debian/patches/rfc931.diff
</span>---
net/tcp_wrappers/Portfile | 6 +-
net/tcp_wrappers/files/clang.patch | 4 +-
net/tcp_wrappers/files/fix-prototypes.patch | 131 ++++++++++++++++++++++++++++
3 files changed, 136 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/tcp_wrappers/Portfile b/net/tcp_wrappers/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 2304331..ca3586b 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/tcp_wrappers/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/tcp_wrappers/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,7 +1,7 @@
</span> PortSystem 1.0
name tcp_wrappers
version 20
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 3
</span> categories net
license Permissive
maintainers {jeremyhu @jeremyhu} openmaintainer
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -25,8 +25,8 @@ checksums sha1 6b197780e11633013bc6026e9f5d1b008c9e8e64 \
</span>
platforms darwin
<span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles clang.patch
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-patch.pre_args -p2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles clang.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fix-prototypes.patch
</span>
post-patch {
reinplace "s:/usr/lib/:${prefix}/lib/:g" ${worksrcpath}/Makefile
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/tcp_wrappers/files/clang.patch b/net/tcp_wrappers/files/clang.patch
</span><span style='display:block; white-space:pre;color:#808080;'>index a31bf67..d4aacbf 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/tcp_wrappers/files/clang.patch
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/tcp_wrappers/files/clang.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,6 +1,6 @@
</span> diff -Naurp tcp_wrappers-20.orig/tcp_wrappers/fix_options.c tcp_wrappers-20/tcp_wrappers/fix_options.c
<span style='display:block; white-space:pre;background:#ffe0e0;'>---- tcp_wrappers-20.orig/tcp_wrappers/fix_options.c 1999-04-22 18:57:28.000000000 -0700
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-+++ tcp_wrappers-20/tcp_wrappers/fix_options.c 2012-02-14 00:46:53.000000000 -0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- fix_options.c.orig 1999-04-22 18:57:28.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ fix_options.c 2012-02-14 00:46:53.000000000 -0800
</span> @@ -28,7 +28,7 @@ static char sccsid[] = "@(#) fix_options
#define BUFFER_SIZE 512 /* Was: BUFSIZ */
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/tcp_wrappers/files/fix-prototypes.patch b/net/tcp_wrappers/files/fix-prototypes.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..d746855
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/tcp_wrappers/files/fix-prototypes.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,131 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- tcpd.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ tcpd.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4,6 +4,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Need FILE. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdio.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++__BEGIN_DECLS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Structure to describe one communications endpoint. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define STRING_LENGTH 128 /* hosts, users, processes */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -29,10 +38,10 @@ struct request_info {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char pid[10]; /* access via eval_pid(request) */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct host_info client[1]; /* client endpoint info */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct host_info server[1]; /* server endpoint info */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void (*sink) (); /* datagram sink function or 0 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void (*hostname) (); /* address to printable hostname */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void (*hostaddr) (); /* address to printable address */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- void (*cleanup) (); /* cleanup function or 0 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void (*sink) (int); /* datagram sink function or 0 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void (*hostname) (struct host_info *); /* address to printable hostname */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void (*hostaddr) (struct host_info *); /* address to printable address */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ void (*cleanup) (struct request_info *); /* cleanup function or 0 */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct netconfig *config; /* netdir handle */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ };
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -70,20 +79,22 @@ extern void fromhost(); /* get/validat
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define fromhost sock_host /* no TLI support needed */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern int hosts_access(); /* access control */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern void shell_cmd(); /* execute shell command */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern char *percent_x(); /* do %<char> expansion */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern void rfc931(); /* client name from RFC 931 daemon */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern void clean_exit(); /* clean up and exit */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern void refuse(); /* clean up and exit */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern char *xgets(); /* fgets() on steroids */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern char *split_at(); /* strchr() and split */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern unsigned long dot_quad_addr(); /* restricted inet_addr() */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern int numeric_addr(); /* IP4/IP6 inet_addr (restricted) */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern struct hostent *tcpd_gethostbyname();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern int hosts_access(struct request_info *request); /* access control */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void shell_cmd(char *); /* execute shell command */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern char *percent_x(char *, int, char *, struct request_info *);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* do %<char> expansion */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void rfc931(struct sockaddr_gen *, struct sockaddr_gen *, char *);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* client name from RFC 931 daemon */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void clean_exit(struct request_info *); /* clean up and exit */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void refuse(struct request_info *); /* clean up and exit */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern char *xgets(char *, int, FILE *); /* fgets() on steroids */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern char *split_at(char *, int); /* strchr() and split */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern unsigned long dot_quad_addr(char *); /* restricted inet_addr() */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern int numeric_addr(char *str, union gen_addr *addr, int *af, int *len); /* IP4/IP6 inet_addr (restricted) */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern struct hostent *tcpd_gethostbyname(char *host, int af);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* IP4/IP6 gethostbyname */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef HAVE_IPV6
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern char *skip_ipv6_addrs(); /* skip over colons in IPv6 addrs */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern char *skip_ipv6_addrs(char *str); /* skip over colons in IPv6 addrs */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define skip_ipv6_addrs(x) x
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -121,20 +139,23 @@ extern struct request_info *request_set(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * host_info structures serve as caches for the lookup results.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern char *eval_user(); /* client user */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern char *eval_hostname(); /* printable hostname */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern char *eval_hostaddr(); /* printable host address */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern char *eval_hostinfo(); /* host name or address */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern char *eval_client(); /* whatever is available */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern char *eval_server(); /* whatever is available */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern char *eval_user(struct request_info *); /* client user */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern char *eval_hostname(struct host_info *); /* printable hostname */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern char *eval_hostaddr(struct host_info *); /* printable host address */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern char *eval_hostinfo(struct host_info *); /* host name or address */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern char *eval_client(struct request_info *);/* whatever is available */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern char *eval_server(struct request_info *);/* whatever is available */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define eval_daemon(r) ((r)->daemon) /* daemon process name */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define eval_pid(r) ((r)->pid) /* process id */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Socket-specific methods, including DNS hostname lookups. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern void sock_host(); /* look up endpoint addresses */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern void sock_hostname(); /* translate address to hostname */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern void sock_hostaddr(); /* address to printable address */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* look up endpoint addresses */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void sock_host(struct request_info *);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* translate address to hostname */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void sock_hostname(struct host_info *);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* address to printable address */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void sock_hostaddr(struct host_info *);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define sock_methods(r) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -182,7 +203,7 @@ extern struct tcpd_context tcpd_context;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * behavior.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-extern void process_options(); /* execute options */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++extern void process_options(char *, struct request_info *);/* execute options */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern int dry_run; /* verification flag */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Bug workarounds. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -221,3 +242,6 @@ extern char *fix_strtok();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define strtok my_strtok
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern char *my_strtok();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++__END_DECLS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- scaffold.c 2005-03-09 18:22:04.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ scaffold.c 2005-03-09 18:20:47.000000000 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -237,10 +237,12 @@ struct request_info *request;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* ARGSUSED */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void rfc931(request)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-struct request_info *request;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void rfc931(rmt_sin, our_sin, dest)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++struct sockaddr_gen *rmt_sin;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++struct sockaddr_gen *our_sin;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++char *dest;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- strcpy(request->user, unknown);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ strcpy(dest, unknown);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* check_path - examine accessibility */
</span></pre><pre style='margin:0'>
</pre>