This commit is contained in:
elvis
2022-04-17 23:50:38 +02:00
parent 5642ad4906
commit 3bf2a13e89
3 changed files with 41 additions and 26 deletions

View File

@ -14,10 +14,7 @@
#include <taglialegna.h>
#include <serverWorker.h>
#include <threadpool.h>
#if defined(__linux__)
#include <strsep_gnu.h>
#endif /* __linux__ */
int parser(int len, char *command, queueT *queue, long fd_c, taglia_t* taglia, pthread_mutex_t *lock, waiting_t **waiting);
@ -155,17 +152,9 @@ 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;