Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/blacklist/port portability



details:   https://anonhg.NetBSD.org/src/rev/304b822d9e95
branches:  trunk
changeset: 335710:304b822d9e95
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jan 22 02:27:16 2015 +0000

description:
portability

diffstat:

 external/bsd/blacklist/port/sockaddr_snprintf.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (54 lines):

diff -r 523b81a4317e -r 304b822d9e95 external/bsd/blacklist/port/sockaddr_snprintf.c
--- a/external/bsd/blacklist/port/sockaddr_snprintf.c   Thu Jan 22 02:15:59 2015 +0000
+++ b/external/bsd/blacklist/port/sockaddr_snprintf.c   Thu Jan 22 02:27:16 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sockaddr_snprintf.c,v 1.1 2015/01/22 01:39:18 christos Exp $   */
+/*     $NetBSD: sockaddr_snprintf.c,v 1.2 2015/01/22 02:27:16 christos Exp $   */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: sockaddr_snprintf.c,v 1.1 2015/01/22 01:39:18 christos Exp $");
+__RCSID("$NetBSD: sockaddr_snprintf.c,v 1.2 2015/01/22 02:27:16 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -41,13 +41,17 @@
 #ifdef HAVE_NETATALK_AT_H
 #include <netatalk/at.h>
 #endif
+#ifdef HAVE_NET_IF_DL_H
 #include <net/if_dl.h>
+#endif
 
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
 #include <stdlib.h>
+#ifdef HAVE_UTIL_H
 #include <util.h>
+#endif
 #include <netdb.h>
 
 #ifdef HAVE_NETATALK_AT_H
@@ -99,6 +103,7 @@
            sun->sun_path);
 }
 
+#ifdef HAVE_NET_IF_DL_H
 static int
 debug_dl(char *str, size_t len, const struct sockaddr_dl *sdl)
 {
@@ -129,7 +134,9 @@
        const struct sockaddr_in *sin4 = NULL;
        const struct sockaddr_in6 *sin6 = NULL;
        const struct sockaddr_un *sun = NULL;
+#ifdef HAVE_NET_IF_DL_H
        const struct sockaddr_dl *sdl = NULL;
+#endif
        int na = 1;
 
 #define ADDC(c) do { if (buf < ebuf) *buf++ = c; else buf++; } \



Home | Main Index | Thread Index | Old Index