diff options
author | Laszlo Ersek <lersek@redhat.com> | 2014-11-14 10:24:33 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2014-11-14 10:24:33 +0000 |
commit | afc18ead283886bfe4b3e21d0a315aead31228af (patch) | |
tree | 725957ae2fec0dc0acf6a19805629cb0ba580921 /CryptoPkg/Include | |
parent | 017c285ef1c326853c4a1390b741cecb57677162 (diff) | |
download | edk2-afc18ead283886bfe4b3e21d0a315aead31228af.tar.gz edk2-afc18ead283886bfe4b3e21d0a315aead31228af.tar.bz2 edk2-afc18ead283886bfe4b3e21d0a315aead31228af.zip |
CryptoPkg: OpenSslSupport.h: edk2-ize offsetof() macro for gcc-4.8 / X64
Code added in SVN r16339 ("CryptoPkg Updates to support RFC3161 timestamp
signature verification.") introduced many new uses of the offsetof()
macro. Since the offsetof() macro in "OpenSslSupport.h" casts a pointer to
an "int", it triggers a large number of
error: cast from pointer to integer of different size
[-Werror=pointer-to-int-cast]
errors when building CryptoPkg with gcc-4.8 for X64.
Remedy this by directing offsetof() to the OFFSET_OF() macro in
"MdePkg/Include/Base.h" (which matches how "OpenSslSupport.h" resolves the
va_*() macros too).
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Build-tested-by: Scott Duplichan <scott@notabs.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16388 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'CryptoPkg/Include')
-rw-r--r-- | CryptoPkg/Include/OpenSslSupport.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/CryptoPkg/Include/OpenSslSupport.h b/CryptoPkg/Include/OpenSslSupport.h index 33eda7dd50..ed889e91c7 100644 --- a/CryptoPkg/Include/OpenSslSupport.h +++ b/CryptoPkg/Include/OpenSslSupport.h @@ -72,7 +72,7 @@ typedef VOID *FILE; portably, hence it is provided by a Standard C header file.
For pre-Standard C compilers, here is a version that usually works
(but watch out!): */
-#define offsetof(type, member) ( (int) & ((type*)0) -> member )
+#define offsetof(type, member) OFFSET_OF (type, member)
//
// Basic types from EFI Application Toolkit required to buiild Open SSL
|