From 7728cff37044943b05c4f9de5e9c6ef3d9e14a12 Mon Sep 17 00:00:00 2001 From: Tommie Gannert Date: Mon, 1 Aug 2016 14:34:39 +0100 Subject: Make print_disk_info, print_eth_info and print_wireless_info compile on NetBSD without warnings. --- src/print_disk_info.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/print_disk_info.c') diff --git a/src/print_disk_info.c b/src/print_disk_info.c index 629e05b..edc69ac 100644 --- a/src/print_disk_info.c +++ b/src/print_disk_info.c @@ -10,6 +10,7 @@ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || (__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) #include #include +#elif defined(__NetBSD__) #else #include #endif @@ -121,6 +122,11 @@ void print_disk_info(yajl_gen json_gen, char *buffer, const char *path, const ch if (statfs(path, &buf) == -1) return; +#elif defined(__NetBSD__) + struct statvfs buf; + + if (statvfs(path, &buf) == -1) + return; #else struct statvfs buf; -- cgit v1.2.3