diff options
| author | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2015-07-07 23:12:13 -0700 | 
|---|---|---|
| committer | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2015-07-07 23:12:13 -0700 | 
| commit | 55a23712ade74836be11feb9602f90d360aea44a (patch) | |
| tree | 8de541c9dffaaf20f078807ca6489e6cbf211301 /src | |
| parent | 326f26c5138526eccc7c57a22c3a1138e1535fcc (diff) | |
| parent | 80e7b83d541044c698d6e9e40cc122e0cf287858 (diff) | |
Merge pull request #40 from afh/pull/osx
Mac OS X compatibility changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/print_cpu_temperature.c | 2 | ||||
| -rw-r--r-- | src/print_disk_info.c | 6 | 
2 files changed, 4 insertions, 4 deletions
diff --git a/src/print_cpu_temperature.c b/src/print_cpu_temperature.c index c0a6baa..71ee4d4 100644 --- a/src/print_cpu_temperature.c +++ b/src/print_cpu_temperature.c @@ -261,8 +261,8 @@ void print_cpu_temperature_info(yajl_gen json_gen, char *buffer, int zone, const      OUTPUT_FULL_TEXT(buffer);      return;  error: -#endif      free(thermal_zone); +#endif      OUTPUT_FULL_TEXT("can't read temp");      (void)fputs("i3status: Cannot read temperature. Verify that you have a thermal zone in /sys/class/thermal or disable the cpu_temperature module in your i3status config.\n", stderr); diff --git a/src/print_disk_info.c b/src/print_disk_info.c index 7fd47b9..e5e3ab1 100644 --- a/src/print_disk_info.c +++ b/src/print_disk_info.c @@ -7,7 +7,7 @@  #include <sys/stat.h>  #include <sys/statvfs.h>  #include <sys/types.h> -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || (__OpenBSD__) || defined(__DragonFly__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || (__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)  #include <sys/param.h>  #include <sys/mount.h>  #else @@ -59,7 +59,7 @@ static int print_bytes_human(char *outwalk, uint64_t bytes, const char *prefix_t   * Determines whether remaining bytes are below given threshold.   *   */ -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)  static bool below_threshold(struct statfs buf, const char *prefix_type, const char *threshold_type, const double low_threshold) {  #else  static bool below_threshold(struct statvfs buf, const char *prefix_type, const char *threshold_type, const double low_threshold) { @@ -116,7 +116,7 @@ void print_disk_info(yajl_gen json_gen, char *buffer, const char *path, const ch      INSTANCE(path); -#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)      struct statfs buf;      if (statfs(path, &buf) == -1)  | 
