mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-02 12:20:51 +00:00
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
This commit is contained in:
parent
28699efd43
commit
484b700751
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312162
@ -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, const char *whine)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user