Commit f19107ad authored by Philipp Schafft's avatar Philipp Schafft 🦁

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

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

svn path=/icecast/trunk/icecast/; revision=18905
parent 47dd39a6
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment