Skip to content
Commit afc18ead authored by Laszlo Ersek's avatar Laszlo Ersek Committed by lersek
Browse files

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: default avatarLaszlo Ersek <lersek@redhat.com>

Build-tested-by: default avatarScott Duplichan <scott@notabs.org>

Reviewed-by: default avatarJordan Justen <jordan.l.justen@intel.com>

Reviewed-by: default avatarQin Long <qin.long@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16388 6f19259b-4bc3-4df7-8a09-765794883524
parent 017c285e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment