aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan <aidan@ArthurOBSD.localdomain>2019-12-16 14:35:29 -0700
committerAidan <aidan@ArthurOBSD.localdomain>2019-12-16 14:35:29 -0700
commitfa4eeff38d5c2787938b2defde4390d585ae4887 (patch)
tree203bf481b01751b9ccf29218b0b55ecadfd8a5f8
parent377f9903318d89934593348cda91c3c8fef4158c (diff)
downloaddwmblocks-fa4eeff38d5c2787938b2defde4390d585ae4887.tar.gz
dwmblocks-fa4eeff38d5c2787938b2defde4390d585ae4887.tar.bz2
dwmblocks-fa4eeff38d5c2787938b2defde4390d585ae4887.zip
Added ifndef for openbsd compatibility. SIGRTMIN is not defined on
OpenBSD.
-rw-r--r--dwmblocks.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/dwmblocks.c b/dwmblocks.c
index ad8e91c..88bdfb0 100644
--- a/dwmblocks.c
+++ b/dwmblocks.c
@@ -16,12 +16,14 @@ typedef struct {
void sighandler(int num);
void replace(char *str, char old, char new);
void getcmds(int time);
+#ifndef __OpenBSD__
void getsigcmds(int signal);
void setupsignals();
+void sighandler(int signum);
+#endif
int getstatus(char *str, char *last);
void setroot();
void statusloop();
-void sighandler(int signum);
void termhandler(int signum);
@@ -72,6 +74,7 @@ void getcmds(int time)
}
}
+#ifndef __OpenBSD__
void getsigcmds(int signal)
{
const Block *current;
@@ -92,6 +95,7 @@ void setupsignals()
}
}
+#endif
int getstatus(char *str, char *last)
{
@@ -128,7 +132,9 @@ void pstdout()
void statusloop()
{
+#ifndef __OpenBSD__
setupsignals();
+#endif
int i = 0;
getcmds(-1);
while(statusContinue)
@@ -140,12 +146,13 @@ void statusloop()
}
}
-
+#ifndef __OpenBSD__
void sighandler(int signum)
{
getsigcmds(signum-SIGRTMIN);
writestatus();
}
+#endif
void termhandler(int signum)
{