Skip to content
Snippets Groups Projects
Commit d30d95b8 authored by deuce's avatar deuce
Browse files

Include signal.h

Linux apparently doesn't have strcasestr()
parent d1da419b
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <unistd.h> #include <unistd.h>
#include <curses.h> #include <curses.h>
#include <sys/time.h> #include <sys/time.h>
#include <signal.h>
#endif #endif
#include "genwrap.h" #include "genwrap.h"
#include "uifc.h" #include "uifc.h"
...@@ -1657,8 +1658,13 @@ int finduser(scfg_t *cfg, user_t *user) ...@@ -1657,8 +1658,13 @@ int finduser(scfg_t *cfg, user_t *user)
for(i=1; i<=last; i++) { for(i=1; i<=last; i++) {
user->number=i; user->number=i;
getuserdat(cfg,user); getuserdat(cfg,user);
#ifdef BSD
if(strcasestr(user->alias, str)!=NULL || strcasestr(user->name, str)!=NULL || strcasestr(user->handle, str)!=NULL if(strcasestr(user->alias, str)!=NULL || strcasestr(user->name, str)!=NULL || strcasestr(user->handle, str)!=NULL
|| user->number==un) { || user->number==un) {
#else
if(strstr(user->alias, str)!=NULL || strstr(user->name, str)!=NULL || strstr(user->handle, str)!=NULL
|| user->number==un) {
#endif
if((opt[j]=(struct user_list *)malloc(sizeof(struct user_list)))==NULL) if((opt[j]=(struct user_list *)malloc(sizeof(struct user_list)))==NULL)
allocfail(sizeof(struct user_list)); allocfail(sizeof(struct user_list));
sprintf(opt[j]->info,"%1.1s%1.1s %-25.25s %-25.25s",user->misc&DELETED?"*":" ",user->misc&INACTIVE?"*":" ",user->name,user->alias); sprintf(opt[j]->info,"%1.1s%1.1s %-25.25s %-25.25s",user->misc&DELETED?"*":" ",user->misc&INACTIVE?"*":" ",user->name,user->alias);
...@@ -1788,7 +1794,7 @@ int main(int argc, char** argv) { ...@@ -1788,7 +1794,7 @@ int main(int argc, char** argv) {
} }
#ifdef __unix__ #ifdef __unix__
signal(SIGPIPE, SIG_IGN); signal(SIGPIPE, SIG_IGN);
#endif #endif
uifc.size=sizeof(uifc); uifc.size=sizeof(uifc);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment