1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-23 06:25:24 +00:00

avoid fnmatch() on _WIN32 and fall back to strcmp(). Seems that MinGW does half-implement fnmatch()...

svn path=/icecast/trunk/icecast/; revision=18905
This commit is contained in:
Philipp Schafft 2013-04-03 02:04:38 +00:00
parent 47dd39a67c
commit f19107adc7

View File

@ -20,7 +20,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef _WIN32
#include <fnmatch.h>
#endif
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
@ -1243,8 +1245,13 @@ mount_proxy *config_find_mount (ice_config_t *config, const char *mount, mount_t
if (mountinfo->mounttype == MOUNT_TYPE_NORMAL && strcmp (mountinfo->mountname, mount) == 0)
break;
#ifndef _WIN32
if (fnmatch(mountinfo->mountname, mount, FNM_PATHNAME) == 0)
break;
#else
if (strcmp(mountinfo->mountname, mount) == 0)
break;
#endif
}
/* retry with default mount */