summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/print_volume.c7
-rw-r--r--src/print_wireless_info.c5
2 files changed, 8 insertions, 4 deletions
diff --git a/src/print_volume.c b/src/print_volume.c
index 0eca0c0..2945b1e 100644
--- a/src/print_volume.c
+++ b/src/print_volume.c
@@ -27,19 +27,17 @@ struct mixer_hdl {
};
TAILQ_HEAD(handles_head, mixer_hdl) cached = TAILQ_HEAD_INITIALIZER(cached);
-#endif
static void free_hdl(struct mixer_hdl *hdl) {
free(hdl->device);
free(hdl->mixer);
free(hdl);
}
+#endif
void print_volume(const char *fmt, const char *device, const char *mixer, int mixer_idx) {
/* Printing volume only works with ALSA at the moment */
-#ifndef LINUX
- return;
-#endif
+#ifdef LINUX
/* Check if we already opened the mixer and get the handle
* from cache if so */
bool found = false;
@@ -151,4 +149,5 @@ void print_volume(const char *fmt, const char *device, const char *mixer, int mi
walk += strlen("volume");
}
}
+#endif
}
diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c
index 3a96b86..511a9ab 100644
--- a/src/print_wireless_info.c
+++ b/src/print_wireless_info.c
@@ -4,6 +4,8 @@
#ifdef LINUX
#include <iwlib.h>
+#else
+#define IW_ESSID_MAX_SIZE 32
#endif
#include "i3status.h"
@@ -140,6 +142,7 @@ static int get_wireless_info(const char *interface, wireless_info_t *info) {
close(skfd);
return 1;
#endif
+ return 0;
}
void print_wireless_info(const char *interface, const char *format_up, const char *format_down) {
@@ -216,6 +219,7 @@ void print_wireless_info(const char *interface, const char *format_up, const cha
walk += strlen("ip");
}
+#ifdef LINUX
if (BEGINS_WITH(walk+1, "bitrate")) {
char buffer[128];
@@ -224,6 +228,7 @@ void print_wireless_info(const char *interface, const char *format_up, const cha
printf("%s", buffer);
walk += strlen("bitrate");
}
+#endif
}
(void)printf("%s", endcolor());