diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2022-06-22 16:15:37 +0100 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2022-07-15 18:06:12 +0000 |
commit | 487e9489d1e086cc62c53045206ab6d6d9d02031 (patch) | |
tree | f1e76bb81bd615ff67796360f208116df55dbf96 | |
parent | 35ad99fad2f65ec2c69bd84bdeb8138329092b57 (diff) | |
download | xorg-lib-libX11-487e9489d1e086cc62c53045206ab6d6d9d02031.tar.gz |
Fix Win32 build with -fno-common
/work/xorg/lib/libX11/src/XlibInt.c:1968: multiple definition of `_Xdebug_p'; .libs/globals.o:globals.c:(.bss+0xc): first defined here
Avoid redundant definition of _Xdebug_p in globals.c (which is under the
influence of _Xdebug being #defined to _Xdebug_p.
This appears to be an ancient hack to work around data exports resolving
to the address of the import stub, not the import. (See [1]).
(This is probably no longer needed or can be done in a better way, as
per the discussion under --enable-auto-import in the ld manpage.)
[1] https://cygwin.com/pipermail/cygwin-xfree/2001-May/004606.html
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
-rw-r--r-- | src/globals.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/globals.c b/src/globals.c index ea3fe6e1..66b589fe 100644 --- a/src/globals.c +++ b/src/globals.c @@ -77,7 +77,9 @@ ZEROINIT (_XQEvent *, _qfree, NULL); /* * Debugging information and display list; used to be in XOpenDis.c */ +#ifndef WIN32 ZEROINIT (int, _Xdebug, 0); +#endif ZEROINIT (Display *, _XHeadOfDisplayList, NULL); |