From 300f474737108e3cd9340d2d1eb1cdc7b9f21fa4 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 2 Mar 2017 18:04:41 -0800 Subject: Fix compilation with old libcrypt versions. Change-Id: If9c0631435e5380d3f158ebe6578adaf65a429bb Reviewed-on: https://code.wireshark.org/review/20351 Petri-Dish: Guy Harris Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris --- epan/crypt/airpdcap.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'epan/crypt') diff --git a/epan/crypt/airpdcap.c b/epan/crypt/airpdcap.c index fa5fe978f1..2b8c291235 100644 --- a/epan/crypt/airpdcap.c +++ b/epan/crypt/airpdcap.c @@ -2175,19 +2175,31 @@ static INT AirPDcapTDLSDeriveKey( PAIRPDCAP_SEC_ASSOCIATION sa, const guint8 *data, +#if GCRYPT_VERSION_NUMBER >= 0x010600 guint offset_rsne, +#else + guint offset_rsne _U_, +#endif guint offset_fte, +#if GCRYPT_VERSION_NUMBER >= 0x010600 guint offset_timeout, +#else + guint offset_timeout _U_, +#endif guint offset_link, +#if GCRYPT_VERSION_NUMBER >= 0x010600 guint8 action) +#else + guint8 action _U_) +#endif { gcry_md_hd_t sha256_handle; gcry_md_hd_t hmac_handle; const guint8 *snonce, *anonce, *initiator, *responder, *bssid; guint8 key_input[32]; - guint8 mic[16], seq_num = action + 1; #if GCRYPT_VERSION_NUMBER >= 0x010600 + guint8 mic[16], seq_num = action + 1; guint8 zeros[16] = { 0 }; gcry_mac_hd_t cmac_handle; size_t cmac_len = 16; -- cgit v1.2.3