From 5365b5845a660b792924347efe36585a817e95f5 Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Sat, 18 Jul 2015 02:18:43 +0200 Subject: [PATCH] Conditionalize a debug message that doesn't compile on Linux. --- src/osdnet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osdnet.c b/src/osdnet.c index 96e0093..8c9dd52 100644 --- a/src/osdnet.c +++ b/src/osdnet.c @@ -403,13 +403,15 @@ osn_ifctab_show(FILE *f, struct ifconf *ifc) fprintf(f, "sizeof struct ifreq = %d\r\n", (int) sizeof(struct ifreq)); fprintf(f, "IFNAMSIZ = %d\r\n", (int) IFNAMSIZ); +#if CENV_SYS_NETBSD fprintf(f, "offset of struct sockaddr_storage = %d\r\n", (int) offsetof(struct ifreq, ifr_space)); +#endif fprintf(f, "sizeof struct sockaddr = %d\r\n", (int) sizeof(struct sockaddr)); fprintf(f, "sizeof struct sockaddr_storage = %d\r\n", (int) sizeof(struct sockaddr_storage)); fprintf(f, "sizeof union ifr_ifru = %d\r\n", (int) sizeof(ifr->ifr_ifru)); fprintf(f, "Interface table: %ld bytes (%d entries if std addr len %d)\r\n", - (long)ifc->ifc_len, ifc->ifc_len/sizeof(struct ifreq), + (long)ifc->ifc_len, (int)(ifc->ifc_len/sizeof(struct ifreq)), (int)sizeof(struct sockaddr)); ifr = ifc->ifc_req;