aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-10-07 15:01:06 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-10-07 15:01:06 +0200
commitb04c5e0f9536d19b26efe1d69807c1f42b4b95ca (patch)
treea987deaa7d7f15342476675bff14c4575f251fd0
parent145dfce5f04a3a74a49cc016f15b0aa6d9996662 (diff)
Move print_version declaration from util.h to common.h
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--include/common.h8
-rw-r--r--include/util.h9
-rw-r--r--lib/common/print_version.c4
3 files changed, 9 insertions, 12 deletions
diff --git a/include/common.h b/include/common.h
index 0e9da0c..369c21f 100644
--- a/include/common.h
+++ b/include/common.h
@@ -156,4 +156,12 @@ int pushdn(const char *path, size_t len);
/* Returns 0 on success. On failure, prints error message to stderr. */
int popd(void);
+/*
+ A common implementation of the '--version' command line flag.
+
+ Prints out version information. The program name is extracted from the
+ BSD style __progname global variable.
+*/
+void print_version(void);
+
#endif /* COMMON_H */
diff --git a/include/util.h b/include/util.h
index a9cfffd..323bedd 100644
--- a/include/util.h
+++ b/include/util.h
@@ -50,15 +50,6 @@ SQFS_INTERNAL
int write_data(const char *errstr, int fd, const void *data, size_t size);
/*
- A common implementation of the '--version' command line flag.
-
- Prints out version information. The program name is extracted from the
- BSD style __progname global variable.
-*/
-SQFS_INTERNAL
-void print_version(void);
-
-/*
Helper for allocating data structures with flexible array members.
'base_size' is the size of the struct itself, 'item_size' the size of a
diff --git a/lib/common/print_version.c b/lib/common/print_version.c
index b23e2bd..6e36614 100644
--- a/lib/common/print_version.c
+++ b/lib/common/print_version.c
@@ -4,9 +4,7 @@
*
* Copyright (C) 2019 David Oberhollenzer <goliath@infraroot.at>
*/
-#include "config.h"
-
-#include "util.h"
+#include "common.h"
#include <stdio.h>