Added ifndef for openbsd compatibility. SIGRTMIN is not defined on

OpenBSD.
This commit is contained in:
Aidan 2019-12-16 14:35:29 -07:00
parent 377f990331
commit fa4eeff38d

View File

@ -16,12 +16,14 @@ typedef struct {
void sighandler(int num); void sighandler(int num);
void replace(char *str, char old, char new); void replace(char *str, char old, char new);
void getcmds(int time); void getcmds(int time);
#ifndef __OpenBSD__
void getsigcmds(int signal); void getsigcmds(int signal);
void setupsignals(); void setupsignals();
void sighandler(int signum);
#endif
int getstatus(char *str, char *last); int getstatus(char *str, char *last);
void setroot(); void setroot();
void statusloop(); void statusloop();
void sighandler(int signum);
void termhandler(int signum); void termhandler(int signum);
@ -72,6 +74,7 @@ void getcmds(int time)
} }
} }
#ifndef __OpenBSD__
void getsigcmds(int signal) void getsigcmds(int signal)
{ {
const Block *current; const Block *current;
@ -92,6 +95,7 @@ void setupsignals()
} }
} }
#endif
int getstatus(char *str, char *last) int getstatus(char *str, char *last)
{ {
@ -128,7 +132,9 @@ void pstdout()
void statusloop() void statusloop()
{ {
#ifndef __OpenBSD__
setupsignals(); setupsignals();
#endif
int i = 0; int i = 0;
getcmds(-1); getcmds(-1);
while(statusContinue) while(statusContinue)
@ -140,12 +146,13 @@ void statusloop()
} }
} }
#ifndef __OpenBSD__
void sighandler(int signum) void sighandler(int signum)
{ {
getsigcmds(signum-SIGRTMIN); getsigcmds(signum-SIGRTMIN);
writestatus(); writestatus();
} }
#endif
void termhandler(int signum) void termhandler(int signum)
{ {