added portability to non-BSD systems
This commit is contained in:
@ -399,7 +399,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
destroyThreadPool(pool, 0); // notifico che i thread dovranno uscire
|
||||
clearWaiting(&waiting);
|
||||
clearWaiting(&waiting); // destroy waiting list
|
||||
taglia_stats(taglia, stdout); // print stats
|
||||
|
||||
// print all files in storage during shutdown
|
||||
|
||||
@ -151,9 +151,17 @@ int parser(int len, char *command, queueT *queue, long fd_c, taglia_t* taglia, p
|
||||
char *token2 = NULL;
|
||||
char *token3 = NULL;
|
||||
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
token = strsep(&string, "|");
|
||||
token2 = strsep(&string, "|");
|
||||
token3 = strsep(&string, "|");
|
||||
#endif /* __APPLE__ or __FreeBSD__ */
|
||||
#if defined(__linux__)
|
||||
token = strsep_gnu(&string, "|");
|
||||
token2 = strsep_gnu(&string, "|");
|
||||
token3 = strsep_gnu(&string, "|");
|
||||
#endif
|
||||
|
||||
|
||||
if(!token)
|
||||
goto _parser_cleanup;
|
||||
|
||||
Reference in New Issue
Block a user