From b2ae7f4230a9f6d1c5d15039a0ebc1d49e4d6a5c Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Fri, 11 Mar 2022 07:59:08 -0600 Subject: [PATCH] wolfssl/openssl/asn1.h: in ASN1_SIMPLE(), use OFFSETOF() macro. --- wolfssl/openssl/asn1.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wolfssl/openssl/asn1.h b/wolfssl/openssl/asn1.h index 07da63319..362383bbf 100644 --- a/wolfssl/openssl/asn1.h +++ b/wolfssl/openssl/asn1.h @@ -142,12 +142,10 @@ typedef enum { } WOLFSSL_ASN1_TYPES; #define ASN1_SEQUENCE(type) \ - static type __##type##_dummy_struct;\ static const WOLFSSL_ASN1_TEMPLATE type##_member_data[] #define ASN1_SIMPLE(type, member, member_type) \ - { ((size_t)&__##type##_dummy_struct.member - \ - (size_t)&__##type##_dummy_struct), \ + { OFFSETOF(type, member), \ WOLFSSL_##member_type##_ASN1 } #define ASN1_SEQUENCE_END(type) \