From 8cf7eb1801bac66094a220af68997c091e917591 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Sun, 10 Jan 2016 18:45:04 +0100 Subject: [PATCH] fix for issue #91 - redefinition of macro "setbit" --- src/pk/asn1/der/bit/der_decode_raw_bit_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pk/asn1/der/bit/der_decode_raw_bit_string.c b/src/pk/asn1/der/bit/der_decode_raw_bit_string.c index a7f355c..ee8e9a4 100644 --- a/src/pk/asn1/der/bit/der_decode_raw_bit_string.c +++ b/src/pk/asn1/der/bit/der_decode_raw_bit_string.c @@ -18,7 +18,7 @@ #ifdef LTC_DER -#define setbit(v, n) (v=((unsigned char)(v) | (1U << (unsigned char)(n)))) +#define SETBIT(v, n) (v=((unsigned char)(v) | (1U << (unsigned char)(n)))) /** Store a BIT STRING @@ -87,7 +87,7 @@ int der_decode_raw_bit_string(const unsigned char *in, unsigned long inlen, /* decode/store the bits */ for (y = 0; y < blen; y++) { if (in[x] & (1 << (7 - (y & 7)))) { - setbit(out[y/8], 7-(y%8)); + SETBIT(out[y/8], 7-(y%8)); } if ((y & 7) == 7) { ++x;