X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=support%2Fmisc%2Ftcpwrapper.c;h=ebe63e173a3ae22c513e10d64b82a0c720efb80e;hb=0523fd513c6baa8dbf45d1a7afea2044262aeb3d;hp=d8a742f49da0af6c9fec8a0262bcf89c8f28606f;hpb=ac84b80afc13d5a96813e678ad5c86c6036f022e;p=nfs-utils.git diff --git a/support/misc/tcpwrapper.c b/support/misc/tcpwrapper.c index d8a742f..ebe63e1 100644 --- a/support/misc/tcpwrapper.c +++ b/support/misc/tcpwrapper.c @@ -31,8 +31,10 @@ * Computing Science, Eindhoven University of Technology, The Netherlands. */ -#include "tcpwrapper.h" - +#ifdef HAVE_CONFIG_H +#include +#endif +#include #include #include #include @@ -55,8 +57,15 @@ int deny_severity = LOG_WARNING; /* A handful of macros for "readability". */ +#ifdef HAVE_LIBWRAP /* coming from libwrap.a (tcp_wrappers) */ extern int hosts_ctl(char *daemon, char *name, char *addr, char *user); +#else +int hosts_ctl(char *daemon, char *name, char *addr, char *user) +{ + return 0; +} +#endif #define legal_port(a,p) \ (ntohs((a)->sin_port) < IPPORT_RESERVED || (p) >= IPPORT_RESERVED)