added portability to non-BSD systems
This commit is contained in:
@ -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