Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Jan 2017 10:20:38 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r312162 - head/usr.sbin/inetd
Message-ID:  <201701141020.v0EAKcrx097482@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Sat Jan 14 10:20:38 2017
New Revision: 312162
URL: https://svnweb.freebsd.org/changeset/base/312162

Log:
  Fix up r312105
  
  - Only #include tcpd.h when LIBWRAP is true to avoid header include errors
  - Only define whichaf when LIBWRAP is true to avoid -Wunused warning and
    to avoid issues with structs being defined that should only be defined
    when tcpd.h is included.
  
  MFC after:	2 weeks
  X-MFC with:	r312105
  Pointyhat to:	ngie
  Reported by:	gcc tinderbox
  Sponsored by:	Dell EMC Isilon

Modified:
  head/usr.sbin/inetd/inetd.c

Modified: head/usr.sbin/inetd/inetd.c
==============================================================================
--- head/usr.sbin/inetd/inetd.c	Sat Jan 14 10:20:27 2017	(r312161)
+++ head/usr.sbin/inetd/inetd.c	Sat Jan 14 10:20:38 2017	(r312162)
@@ -138,7 +138,9 @@ __FBSDID("$FreeBSD$");
 #include <string.h>
 #include <sysexits.h>
 #include <syslog.h>
+#ifdef LIBWRAP
 #include <tcpd.h>
+#endif
 #include <unistd.h>
 
 #include "inetd.h"
@@ -307,6 +309,7 @@ getvalue(const char *arg, int *value, co
 	return 0;				/* success */
 }
 
+#ifdef LIBWRAP
 static sa_family_t
 whichaf(struct request_info *req)
 {
@@ -322,6 +325,7 @@ whichaf(struct request_info *req)
 #endif
 	return sa->sa_family;
 }
+#endif
 
 int
 main(int argc, char **argv)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701141020.v0EAKcrx097482>