summaryrefslogtreecommitdiff
path: root/ext/mysqlnd
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-01-28 09:19:45 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2020-01-28 09:19:45 +0100
commit7e5a8d9faac3c824027382a948b825a55c2a7918 (patch)
tree791b991cc2fefd7d2719328711d4bd1c17156b04 /ext/mysqlnd
parent5f92a085cc50718aa921ba1139f6cc576deb68fa (diff)
parent412b476b7fb386c6aa04efb936881f5b2250ded9 (diff)
downloadphp-git-7e5a8d9faac3c824027382a948b825a55c2a7918.tar.gz
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #79172: STRUCT_OFFSET() relies on undefined behavior
Diffstat (limited to 'ext/mysqlnd')
-rw-r--r--ext/mysqlnd/mysqlnd_portability.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mysqlnd/mysqlnd_portability.h b/ext/mysqlnd/mysqlnd_portability.h
index 873f49b0cd..2064906193 100644
--- a/ext/mysqlnd/mysqlnd_portability.h
+++ b/ext/mysqlnd/mysqlnd_portability.h
@@ -15,7 +15,7 @@ This file is public domain and comes with NO WARRANTY of any kind */
/* Comes from global.h as OFFSET, renamed to STRUCT_OFFSET */
-#define STRUCT_OFFSET(t, f) ((size_t)(char *)&((t *)0)->f)
+#define STRUCT_OFFSET(t, f) XtOffsetOf(t, f)
#ifndef __attribute
#if !defined(__GNUC__)