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
#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)
{
# 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>