File sblim-cmpi-nfsv3-1.0.13_gcc4.patch of Package sblim-cmpi-nfsv3

Index: util/parser/lexer.l
===================================================================
--- util/parser/lexer.l.orig
+++ util/parser/lexer.l
@@ -4,6 +4,7 @@
 	/* Everything between %{ ... %} is copied verbatim to the start of the lex generated C code. */
 
 %{
+#include <string.h>
 #include "cmpidt.h"
 #include "parser.h"
 #ifndef YY_FLEX_LEX_COMPAT
@@ -165,7 +166,7 @@
 	/* USER SUBROUTINE SECTION */
 	/* Everything below is copied verbatim to the end of the lex generated C code. */
 
-yyerror(char *errmsg)
+void yyerror(char *errmsg)
 {
    fprintf(stderr, "NFSv3 parser, line %d: %s at '%s'\n", yylineno, errmsg, yytext);
 }
Index: util/parser/parser.y
===================================================================
--- util/parser/parser.y.orig
+++ util/parser/parser.y
@@ -18,12 +18,12 @@
 static char pathname[_MAXNAMELENGTH];		/* Pathname of the current exported directory */
 static char * entryname;			/* String containing the unique entry name; i.e. "hostname:pathname" */
 
-static setentryvalue(char * pathname, char * hostname);
-static startinstance (char * classname);
-static endinstance();
-static startproperty (char * name, CMPIType type);
-static endproperty();
-static setvalue (void * value);
+static void setentryvalue(char * pathname, char * hostname);
+static void startinstance (char * classname);
+static void endinstance();
+static void startproperty (char * name, CMPIType type);
+static void endproperty();
+static void setvalue (void * value);
 
 %}
 
@@ -157,7 +157,7 @@
 /* USER SUBROUTINE SECTION */
 
 /* Short routine to write a compound SettingID value "hostname:pathname" */
-static setentryvalue(char * pathname, char * hostname)
+static void setentryvalue(char * pathname, char * hostname)
 {
    char * entryname = malloc(strlen(pathname)+strlen(hostname)+2);
    sprintf(entryname, "%s:%s", hostname, pathname);
@@ -170,19 +170,19 @@
 /* XML CIM output subroutines */
 
 /* Start XML CIM instance specification */
-static startinstance (char * classname)
+static void startinstance (char * classname)
 {
    fprintf(NFSv3yyout, "<INSTANCE CLASSNAME=\"%s\">\n", classname);
 }
 
 /* End XML CIM instance specification */
-static endinstance()
+static void endinstance()
 {
    fprintf(NFSv3yyout, "</INSTANCE>\n\n");
 }
 
 /* Start XML CIM property specification */
-static startproperty (char * name, CMPIType type)
+static void startproperty (char * name, CMPIType type)
 {
    fprintf(NFSv3yyout, " <PROPERTY NAME=\"%s\"", name);
    propertytype = type;
@@ -209,13 +209,13 @@
 }
 
 /* End XML CIM property specification */
-static endproperty()
+static void endproperty()
 {
    fprintf(NFSv3yyout, " </PROPERTY>\n");
 }
 
 /* Set an XML CIM value */
-static setvalue (void * value)
+static void setvalue (void * value)
 {
    fprintf(NFSv3yyout, " <VALUE>");
    switch(propertytype) {
Index: util/xmlparser/xmllexer.l
===================================================================
--- util/xmlparser/xmllexer.l.orig
+++ util/xmlparser/xmllexer.l
@@ -4,6 +4,7 @@
 	/* Everything between %{ ... %} is copied verbatim to the start of the lex generated C code. */
 
 %{
+#include <string.h>
 #include "xmlparser.h"
 #ifndef YY_FLEX_LEX_COMPAT
 int yylineno = 1;
@@ -123,7 +124,7 @@
 	/* USER SUBROUTINE SECTION */
 	/* Everything below is copied verbatim to the end of the lex generated C code. */
 
-yyerror(char *errmsg)
+void yyerror(char *errmsg)
 {
    fprintf(stderr, "line %d: %s at '%s'\n", yylineno, errmsg, yytext);
 }
openSUSE Build Service is sponsored by