Fix compile on QNX. Thanks to Will Miles.

This commit is contained in:
Roy Marples 2014-12-20 14:11:38 +00:00
parent 7329549972
commit 71d20c8a12
3 changed files with 18 additions and 8 deletions

3
configure vendored
View File

@ -506,6 +506,9 @@ if $XCC _inet_ntoa.c -o _inet_ntoa 2>&3; then
elif $XCC _inet_ntoa.c -lnsl -o _inet_ntoa 2>&3; then
echo "yes (-lnsl)"
echo "LDADD+= -lnsl" >>$CONFIG_MK
elif $XCC _inet_ntoa.c -lsocket -o _inet_ntoa 2>&3; then
echo "yes (-lsocket)"
echo "LDADD+= -lsocket" >>$CONFIG_MK
else
echo "no"
echo "libc support for inet_ntoa is required - aborting" >&2

5
if.c
View File

@ -70,6 +70,11 @@
#include "ipv4.h"
#include "ipv6nd.h"
#ifdef __QNX__
/* QNX carries defines for, but does not actually support PF_LINK */
#undef IFLR_ACTIVE
#endif
void
if_free(struct interface *ifp)
{

18
ipv6.c
View File

@ -48,15 +48,17 @@
# define IN6_IFF_DUPLICATED 0x08
# endif
# define IN6_IFF_DETACHED 0
#else
# include <sys/endian.h>
#else /* !__linux__ */
# ifndef __QNX__
# include <sys/endian.h>
# endif
# include <net/if.h>
#ifdef __FreeBSD__ /* Needed so that including netinet6/in6_var.h works */
# include <net/if_var.h>
#endif
#ifndef __sun
# include <netinet6/in6_var.h>
#endif
# ifdef __FreeBSD__ /* Needed so that including netinet6/in6_var.h works */
# include <net/if_var.h>
# endif
# ifndef __sun
# include <netinet6/in6_var.h>
# endif
#endif
#include <errno.h>