diff --git a/tools/com-parser/Makefile b/tools/com-parser/Makefile index b36e8af407..1a54e3242a 100644 --- a/tools/com-parser/Makefile +++ b/tools/com-parser/Makefile @@ -99,7 +99,7 @@ else endif endif -INCLUDE_DIRS += -I. -I../../deps/peglib +INCLUDE_DIRS += -I. -I../../deps/peglib -I../../libretro-common/include $(info os : $(OS)) $(info host : $(ARCH)) diff --git a/tools/com-parser/com-parse.cpp b/tools/com-parser/com-parse.cpp index b0dc1dc825..1252aa25e7 100644 --- a/tools/com-parser/com-parse.cpp +++ b/tools/com-parser/com-parse.cpp @@ -18,6 +18,7 @@ #include #include #include +#include using namespace peg; using namespace std; @@ -198,7 +199,7 @@ string insert_name(const string& fname, const string& name) { if(name.length() == 2 && name[1] == 'S') { - if(!strncmp(fname.c_str() + action.length(), "Shader", strlen("Shader"))) + if(!strncmp(fname.c_str() + action.length(), "Shader", STRLEN_CONST("Shader"))) return action + name[0] + (fname.c_str() + action.length()); else return action + name[0] + "Shader" + (fname.c_str() + action.length()); @@ -588,7 +589,8 @@ public: char* str = line; while (*str && ::isspace(*str)) str++; - if (*str && !strncmp(str, "typedef struct ", strlen("typedef struct "))) + if (*str && !strncmp(str, "typedef struct ", + STRLEN_CONST("typedef struct "))) { if(*str && strstr(str, "Vtbl")) {