From 03f78410658782fcd7354f79ea6bc4804750b522 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Fri, 16 Jun 2017 15:27:23 -0500 Subject: [PATCH] libpkgconf: pkg: windows can use either \ or / as directory separators ref #118 --- libpkgconf/pkg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c index 7aebd61..3f43f76 100644 --- a/libpkgconf/pkg.c +++ b/libpkgconf/pkg.c @@ -278,6 +278,10 @@ pkgconf_pkg_new_from_file(pkgconf_client_t *client, const char *filename, FILE * /* make module id */ if ((idptr = strrchr(pkg->filename, PKG_DIR_SEP_S)) != NULL) idptr++; +#ifdef _WIN32 + else if ((idptr = strrchr(pkg->filename, '/')) != NULL) + idptr++; +#endif else idptr = pkg->filename;