libaacs | branch: master | npzacs <npz...@gmail.com> | Tue Feb 23 00:30:20 2016 +0200| [56fc492156f65cdc127ad8d065661ec69346937c] | committer: npzacs
Build fixes > http://git.videolan.org/gitweb.cgi/libaacs.git/?a=commit;h=56fc492156f65cdc127ad8d065661ec69346937c --- src/file/keydbcfg-parser.y | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/file/keydbcfg-parser.y b/src/file/keydbcfg-parser.y index b94c6fa..28bfc20 100644 --- a/src/file/keydbcfg-parser.y +++ b/src/file/keydbcfg-parser.y @@ -28,6 +28,10 @@ #include <stdlib.h> #include <string.h> +#ifdef _WIN32 +#include <windows.h> +#endif + /* Disable some warnings triggered by generated parser */ #if defined __GNUC__ #pragma GCC diagnostic ignored "-Wimplicit-function-declaration" @@ -471,12 +475,12 @@ int keydbcfg_parse_config(config_file *cfgfile, const char *path) #ifdef _WIN32 wchar_t wfilename[MAX_PATH]; - if (!MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, filename, -1, wfilename, MAX_PATH)) + if (!MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, path, -1, wfilename, MAX_PATH)) { return 0; } - fp = _wfopen(wfilename, L"r"); + FILE *fp = _wfopen(wfilename, L"r"); #else - FILE * fp = fopen(path, "r"); + FILE *fp = fopen(path, "r"); #endif if (!fp) return 0; _______________________________________________ libaacs-devel mailing list libaacs-devel@videolan.org https://mailman.videolan.org/listinfo/libaacs-devel