diff options
author | Karel Zak | 2017-12-12 11:29:02 +0100 |
---|---|---|
committer | Karel Zak | 2017-12-12 11:29:02 +0100 |
commit | 3bd55be742aec60a93ebcdebc325b49737cd6642 (patch) | |
tree | 4894d789632459349384f271ba6d10c5e6840e82 /libuuid | |
parent | Merge branch '2017wk48' of https://github.com/kerolasa/lelux-utiliteetit (diff) | |
download | kernel-qcow2-util-linux-3bd55be742aec60a93ebcdebc325b49737cd6642.tar.gz kernel-qcow2-util-linux-3bd55be742aec60a93ebcdebc325b49737cd6642.tar.xz kernel-qcow2-util-linux-3bd55be742aec60a93ebcdebc325b49737cd6642.zip |
lib/sha1: use ul_/UL_prefix for symbols
Unfortunately, the symbols are visible in statically compiled libuuid
and the names are too generic.
Addresses: https://github.com/karelzak/util-linux/issues/548
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libuuid')
-rw-r--r-- | libuuid/src/gen_uuid.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libuuid/src/gen_uuid.c b/libuuid/src/gen_uuid.c index cf7cacd55..431bf2064 100644 --- a/libuuid/src/gen_uuid.c +++ b/libuuid/src/gen_uuid.c @@ -589,15 +589,15 @@ void uuid_generate_md5(uuid_t out, const uuid_t ns, const char *name, size_t len */ void uuid_generate_sha1(uuid_t out, const uuid_t ns, const char *name, size_t len) { - SHA1_CTX ctx; - char hash[SHA1LENGTH]; + UL_SHA1_CTX ctx; + char hash[UL_SHA1LENGTH]; - SHA1Init(&ctx); + ul_SHA1Init(&ctx); /* hash concatenation of well-known UUID with name */ - SHA1Update(&ctx, ns, sizeof(uuid_t)); - SHA1Update(&ctx, (const unsigned char *)name, len); + ul_SHA1Update(&ctx, ns, sizeof(uuid_t)); + ul_SHA1Update(&ctx, (const unsigned char *)name, len); - SHA1Final((unsigned char *)hash, &ctx); + ul_SHA1Final((unsigned char *)hash, &ctx); memcpy(out, hash, sizeof(uuid_t)); |