diff options
author | Dario Lombardo <lomato@gmail.com> | 2019-05-08 13:56:01 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-05-08 13:51:38 +0000 |
commit | 6d160dad2db4199bd28e33d6f291f391e9704cfe (patch) | |
tree | 612f8f5a3a27447a91cda1f2f4afa43361154b60 /epan/dissectors/packet-btmesh.c | |
parent | 85773a21a9b173a49c7012f7d38095779bb7f5a0 (diff) |
btmesh: fix compilation with older gcrypt versions.
Fix compilation on Centos:
epan/dissectors/packet-btmesh.c: In function 'uat_btmesh_record_update_cb':
epan/dissectors/packet-btmesh.c:2057:9: error: implicit declaration of function 'k4' [-Werror=implicit-function-declaration]
if (k4(rec)) {
^
epan/dissectors/packet-btmesh.c: In function 'uat_btmesh_label_uuid_record_update_cb':
epan/dissectors/packet-btmesh.c:2198:9: error: implicit declaration of function 'label_uuid_hash' [-Werror=implicit-function-declaration]
if (label_uuid_hash(rec)) {
^
cc1: some warnings being treated as errors
[224/2387] Building C object epan/dissectors/CMakeFiles/dissectors.dir/packet-btmesh-pbadv.c.o
ninja: build stopped: subcommand failed.
Change-Id: I0ffbce46285c7883f3ef604d06fad3a94b2197cd
Reviewed-on: https://code.wireshark.org/review/33108
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-btmesh.c')
-rw-r--r-- | epan/dissectors/packet-btmesh.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-btmesh.c b/epan/dissectors/packet-btmesh.c index 2b647e8329..86cecfec20 100644 --- a/epan/dissectors/packet-btmesh.c +++ b/epan/dissectors/packet-btmesh.c @@ -2053,10 +2053,12 @@ uat_btmesh_record_update_cb(void *r, char **err _U_) if (rec->application_key_string) { g_free(rec->application_key); rec->application_key_length = compute_ascii_key(&rec->application_key, rec->application_key_string); +#if GCRYPT_VERSION_NUMBER >= 0x010600 /* 1.6.0 */ /* compute AID */ if (k4(rec)) { rec->valid++; } +#endif } else { rec->application_key_length = 0; rec->application_key = NULL; @@ -2195,9 +2197,11 @@ uat_btmesh_label_uuid_record_update_cb(void *r, char **err _U_) if (rec->label_uuid_string) { g_free(rec->label_uuid); rec->label_uuid_length = compute_ascii_key(&rec->label_uuid, rec->label_uuid_string); +#if GCRYPT_VERSION_NUMBER >= 0x010600 /* 1.6.0 */ if (label_uuid_hash(rec)) { rec->valid++; } +#endif } else { rec->label_uuid_length = 0; rec->label_uuid = NULL; |