aports/main/cvechecker/gcc14.patch

92 lines
2.6 KiB
Diff

diff --git a/src/cvecheck.h b/src/cvecheck.h
index affedb1..6cb20e1 100644
--- a/src/cvecheck.h
+++ b/src/cvecheck.h
@@ -104,3 +104,5 @@ void initialize_arguments(struct arguments * arg);
// initialize_workstate - Initialize the workstate variable OKOK
int initialize_workstate(struct workstate * ws, struct arguments * arg);
+
+int copy_cpe_bare(struct cpe_data * target, struct cpe_data * source);
diff --git a/src/mysql/mysql_impl.c b/src/mysql/mysql_impl.c
index 479f121..4566eb3 100644
--- a/src/mysql/mysql_impl.c
+++ b/src/mysql/mysql_impl.c
@@ -1,5 +1,5 @@
#include "mysql_impl.h"
-
+#include "cvecheck.h"
/*
* Copyright 2011-2020 Sven Vermeulen.
* Subject to the GNU Public License, version 3.
@@ -104,21 +104,6 @@ int mysql_dbimpl_load_databases(struct workstate * ws) {
};
};
-/**
- * Add the selected CPE to the database
- */
-int mysql_dbimpl_add_cpe_to_database(struct workstate * ws, struct cpe_data cpe) {
- char buffer[BUFFERSIZE];
- int rc;
-
- rc = add_to_mysql_database(ws, cpe);
- update_binmatch_files(ws, rc);
- cpe_to_string(buffer, BUFFERSIZE, cpe);
- fprintf(stdout, " - Added watch for %s\n", buffer);
-
- return 0;
-};
-
/**
* Delete the binary
*
@@ -262,6 +247,21 @@ int update_binmatch_files(struct workstate * ws, int cpeid) {
MYSQL_QUERY(ws->conn, stmt)
};
+/**
+ * Add the selected CPE to the database
+ */
+int mysql_dbimpl_add_cpe_to_database(struct workstate * ws, struct cpe_data cpe) {
+ char buffer[BUFFERSIZE];
+ int rc;
+
+ rc = add_to_mysql_database(ws, cpe);
+ update_binmatch_files(ws, rc);
+ cpe_to_string(buffer, BUFFERSIZE, cpe);
+ fprintf(stdout, " - Added watch for %s\n", buffer);
+
+ return 0;
+};
+
/**
* Process the binary
diff --git a/src/cvecheck.c b/src/cvecheck.c
index 58aedb9..36b280e 100644
--- a/src/cvecheck.c
+++ b/src/cvecheck.c
@@ -1,4 +1,8 @@
#include "cvecheck.h"
+
+const char * argp_program_version = "cvechecker 4.0";
+const char * argp_program_bug_address = "<sven.vermeulen@siphos.be>";
+
/*
* Copyright 2010-2020 Sven Vermeulen.
* Subject to the GNU Public License, version 3.
diff --git a/src/cvecheck.h b/src/cvecheck.h
index 6cb20e1..7922486 100644
--- a/src/cvecheck.h
+++ b/src/cvecheck.h
@@ -35,9 +35,6 @@ static error_t parse_opt (int key, char * arg, struct argp_state *state);
#include "dummy/dummy_mysql.h"
#endif
-const char * argp_program_version = "cvechecker 4.0";
-const char * argp_program_bug_address = "<sven.vermeulen@siphos.be>";
-
static char doc[] = "cvechecker -- Verify the state of the system against a CVE database";
static char args_doc[] = "";