Blame SOURCES/libversion-display.patch
|
|
325406 |
diff --git a/lib/misc/lib_context.c b/lib/misc/lib_context.c
|
|
|
325406 |
index f1995e1..00023e7 100644
|
|
|
325406 |
--- a/lib/misc/lib_context.c
|
|
|
325406 |
+++ b/lib/misc/lib_context.c
|
|
|
325406 |
@@ -138,25 +138,30 @@ init_paths(struct lib_context *lc, void *arg)
|
|
|
325406 |
static void
|
|
|
325406 |
init_version(struct lib_context *lc, void *arg)
|
|
|
325406 |
{
|
|
|
325406 |
- lc->version.text = DMRAID_LIB_VERSION;
|
|
|
325406 |
+ static char version[80];
|
|
|
325406 |
+
|
|
|
325406 |
+ lc->version.text = version;
|
|
|
325406 |
lc->version.date = DMRAID_LIB_DATE;
|
|
|
325406 |
lc->version.v.major = DMRAID_LIB_MAJOR_VERSION;
|
|
|
325406 |
lc->version.v.minor = DMRAID_LIB_MINOR_VERSION;
|
|
|
325406 |
lc->version.v.sub_minor = DMRAID_LIB_SUBMINOR_VERSION;
|
|
|
325406 |
lc->version.v.suffix = DMRAID_LIB_VERSION_SUFFIX;
|
|
|
325406 |
+ snprintf(version, sizeof(version), "%d.%d.%d.%s",
|
|
|
325406 |
+ lc->version.v.major, lc->version.v.minor,
|
|
|
325406 |
+ lc->version.v.sub_minor, lc->version.v.suffix);
|
|
|
325406 |
}
|
|
|
325406 |
|
|
|
325406 |
/* Put init functions into an array because of the potentially growing list. */
|
|
|
325406 |
struct init_fn {
|
|
|
325406 |
void (*func) (struct lib_context * lc, void *arg);
|
|
|
325406 |
} init_fn[] = {
|
|
|
325406 |
- {
|
|
|
325406 |
- init_options}, {
|
|
|
325406 |
- init_cmd}, {
|
|
|
325406 |
- init_lists}, {
|
|
|
325406 |
- init_mode}, {
|
|
|
325406 |
- init_paths}, {
|
|
|
325406 |
-init_version},};
|
|
|
325406 |
+ { init_options},
|
|
|
325406 |
+ { init_cmd},
|
|
|
325406 |
+ { init_lists},
|
|
|
325406 |
+ { init_mode},
|
|
|
325406 |
+ { init_paths},
|
|
|
325406 |
+ { init_version},
|
|
|
325406 |
+};
|
|
|
325406 |
|
|
|
325406 |
struct lib_context *
|
|
|
325406 |
alloc_lib_context(char **argv)
|