mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
19 lines
383 B
C
19 lines
383 B
C
/* Compliments of Jay Freeman <saurik@saurik.com> */
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
# include "config.h"
|
|
#endif
|
|
|
|
#include <string.h>
|
|
|
|
#if !HAVE_STRSEP
|
|
char *strsep(char **stringp, const char *delim) {
|
|
char *ret = *stringp;
|
|
if (ret == NULL) return(NULL); /* grrr */
|
|
if ((*stringp = strpbrk(*stringp, delim)) != NULL) {
|
|
*((*stringp)++) = '\0';
|
|
}
|
|
return(ret);
|
|
}
|
|
#endif /* !HAVE_STRSEP */
|