summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-hwdb
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-12-19 11:23:42 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-12-20 21:35:29 +0100
commita67c318df8800ba98d7361308937ed276dc73982 (patch)
tree5fd45225350cf5974714ea0c6cba4c9aecdfcdfd /src/libsystemd/sd-hwdb
parentd2aaf130991149055f2f9b606d0b52d673d75cfd (diff)
downloadsystemd-a67c318df8800ba98d7361308937ed276dc73982.tar.gz
meson: define PROJECT_VERSION as the "bare" project version
Let's not use atoi() if we can simply provide the project version as a number. In C code, this is the numerical project version. In substitutions in other files, this is just the bare substitution. The "PACKAGE_" prefix is from autotools, and is strange. We call systemd a "project", and "package" is something that distros build. Let's rename. PACKAGE_URL is renamed to PROJECT_URL for the same reasons and for consistency. (This leave PACKAGE_VERSION as the stringified define for C code.)
Diffstat (limited to 'src/libsystemd/sd-hwdb')
-rw-r--r--src/libsystemd/sd-hwdb/hwdb-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-hwdb/hwdb-util.c b/src/libsystemd/sd-hwdb/hwdb-util.c
index c5c329f2ac..f8529670b3 100644
--- a/src/libsystemd/sd-hwdb/hwdb-util.c
+++ b/src/libsystemd/sd-hwdb/hwdb-util.c
@@ -367,7 +367,7 @@ static int trie_store(struct trie *trie, const char *filename, bool compat) {
int64_t size;
struct trie_header_f h = {
.signature = HWDB_SIG,
- .tool_version = htole64(atoi(PACKAGE_VERSION)),
+ .tool_version = htole64(PROJECT_VERSION),
.header_size = htole64(sizeof(struct trie_header_f)),
.node_size = htole64(sizeof(struct trie_node_f)),
.child_entry_size = htole64(sizeof(struct trie_child_entry_f)),