File 0001-add-protypes.patch of Package sblim-cmpi-nfsv4
From 5dd0009b4c8d8c14c9aaf1e707e75b88e22a9d9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@gmail.com>
Date: Mon, 3 Feb 2025 17:33:33 +0100
Subject: [PATCH] add protypes
---
GLOBALS.h | 12 ++++++++++++
util/Linux_NFSv4SystemConfigurationUtil.c | 3 ---
util/xmlparser/setProperty.c | 1 +
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/GLOBALS.h b/GLOBALS.h
index c93bb6a..ce1fff5 100644
--- a/GLOBALS.h
+++ b/GLOBALS.h
@@ -6,3 +6,15 @@ static char * _CONFIGFILE = "/etc/exports";
#define _MAXNAMELENGTH 1024
#define _READONLY 0
+#include <stdio.h>
+
+int NFSv4yylex (void);
+void NFSv4yyerror(char *errmsg);
+void NFSv4yyrestart (FILE *input_file);
+int NFSv4yyparsefile( FILE * infile, FILE * outfile );
+
+int NFSv4xmlyylex (void);
+int NFSv4xmlyyparse(void);
+void NFSv4xmlyyerror(char *errmsg);
+void NFSv4xmlyyrestart (FILE *input_file);
+int NFSv4xmlyyparsefile( FILE * infile, FILE * outfile );
diff --git a/util/Linux_NFSv4SystemConfigurationUtil.c b/util/Linux_NFSv4SystemConfigurationUtil.c
index 6317a6b..11ff13b 100644
--- a/util/Linux_NFSv4SystemConfigurationUtil.c
+++ b/util/Linux_NFSv4SystemConfigurationUtil.c
@@ -59,9 +59,6 @@ typedef struct {
* IMPORTED EXTERNALLY DEFINED FUNCTIONS
* --------------------------------------------------------------------------- */
-extern int NFSv4yyparsefile( FILE * infile, FILE * outfile ); /* Config file parser */
-extern int NFSv4xmlyyparse(); /* XML instance parser */
-extern int NFSv4xmlyyrestart( FILE * infile ); /* Redirect XML parser input to a file */
extern int Linux_NFSv4_instance2string( const CMPIInstance * instance, char ** buffer ); /* Instance-to-text formatter */
diff --git a/util/xmlparser/setProperty.c b/util/xmlparser/setProperty.c
index f6dec33..be9d646 100644
--- a/util/xmlparser/setProperty.c
+++ b/util/xmlparser/setProperty.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include "GLOBALS.h"
/* Stand-in for the real setProperty() to test the XML parser in isolation */
int NFSv4setProperty( char * name, char * typename, char * valuebuffer)
--
2.48.1