diff options
author | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2016-08-14 06:29:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-14 06:29:20 -0700 |
commit | 6e4ca31aa5febcc546ec3b32a09793085ea114f0 (patch) | |
tree | c4c745f17954aa1f54dd8b6ec28e40e6d124b648 /src/print_disk_info.c | |
parent | 712c5b0f0b64b62b7c0395acd6b295361f741735 (diff) | |
parent | eb0b6412af16fe00ce38faa31bd50c238f4e7098 (diff) |
Merge pull request #149 from tommie/incremental_multibatt
Fix some compilation warnings on OpenBSD and NetBSD
Diffstat (limited to 'src/print_disk_info.c')
-rw-r--r-- | src/print_disk_info.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 <sys/param.h> #include <sys/mount.h> +#elif defined(__NetBSD__) #else #include <mntent.h> #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; |