dring: fix offsetof undefined behavior 09/36009/1
authorBen Magistro <[email protected]>
Wed, 20 Apr 2022 16:01:18 +0000 (16:01 +0000)
committerBen Magistro <[email protected]>
Wed, 20 Apr 2022 16:12:10 +0000 (16:12 +0000)
commitb95866093913f48801a0cd7be554d51196e09ba0
tree98fe4386db19bb5fee4e4926c75860e378259534
parentfef6f51d19e390757db6007127878d56a17c4e24
dring: fix offsetof undefined behavior

In gcc 11 (maybe parts of 10) the identification of constant expressions
changed[1]. This causes the line changed to be an error. There is
additional discussion about the change here [2] with the revision being
based on the code referenced [3] in the discussion.

1) https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=beb019d346b903c16b9fd349937de444b6a8b6c0
2) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95942
3) https://github.com/dolphin-emu/dolphin/commit/118b2a3580972972c42a492347287fc292add50b

Signed-off-by: Ben Magistro <[email protected]>
Change-Id: Id9b0efdd8d9b351e6e6097375b7d9002dc1737c9
lib/libtle_dring/tle_dring.h