aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/error_handler.h14
-rw-r--r--lib/error_handler.c12
2 files changed, 13 insertions, 13 deletions
diff --git a/include/error_handler.h b/include/error_handler.h
index 9e7c1b8..92705fe 100644
--- a/include/error_handler.h
+++ b/include/error_handler.h
@@ -18,19 +18,7 @@
#define SPM_ERR_MANIFEST_EMPTY _SPM_ERR(8) // manifest file has no data
extern int spmerrno;
-
-static const char *SPM_ERR_STRING[] = {
- "Success",
- "No root record",
- "Dangerous root path",
- "Package not found",
- "Invalid package",
- "Bad package checksum",
- "Failed to fetch package",
- "Manifest has no header",
- "Manifest has no data",
- NULL,
-};
+extern const char *SPM_ERR_STRING[];
void spmerrno_cause(const char *reason);
char *spm_strerror(int code);
diff --git a/lib/error_handler.c b/lib/error_handler.c
index 292fa6f..4e06919 100644
--- a/lib/error_handler.c
+++ b/lib/error_handler.c
@@ -3,6 +3,18 @@
int spmerrno = 0;
static char spmerrbuf[255];
static char spmerrbuf_reason[255];
+const char *SPM_ERR_STRING[] = {
+ "Success",
+ "No root record",
+ "Dangerous root path",
+ "Package not found",
+ "Invalid package",
+ "Bad package checksum",
+ "Failed to fetch package",
+ "Manifest has no header",
+ "Manifest has no data",
+ NULL,
+};
void spmerrno_cause(const char *reason) {
char *buf = spmerrbuf_reason;