xorg-server-21.1.3 error: redefinition of 'xf86AutoConfigOutputDevices'
Using gcc-11.2, xorg-server-21.1.3 build fails with meson and autotools with the following error:
FAILED: hw/xfree86/common/libxorg_common.a.p/xf86Init.c.o
gcc -mtune=generic -Os -pipe -Ihw/xfree86/common/libxorg_common.a.p -Ihw/xfree86/common -I../hw/xfree86/common -IXext -I../Xext -IXi -I../Xi -Icomposite -I../composite -Idamageext -I../damageext -Iexa -I../exa -Ifb -I../fb -Iglamor -I../glamor -Imi -I../mi -Imiext/damage -I../miext/damage -Imiext/shadow -I../miext/shadow -Imiext/sync -I../miext/sync -Idbe -I../dbe -Idri3 -I../dri3 -Iinclude -I../include -Ipresent -I../present -Irandr -I../randr -Irender -I../render -Ixfixes -I../xfixes -Ihw/xfree86/ddc -I../hw/xfree86/ddc -Ihw/xfree86/dri2 -I../hw/xfree86/dri2 -Ihw/xfree86/i2c -I../hw/xfree86/i2c -Ihw/xfree86/int10 -I../hw/xfree86/int10 -Ihw/xfree86/loader -I../hw/xfree86/loader -Ihw/xfree86/modes -I../hw/xfree86/modes -Ihw/xfree86/os-support -I../hw/xfree86/os-support -I../hw/xfree86/os-support/bus -Ihw/xfree86/parser -I../hw/xfree86/parser -Ihw/xfree86/ramdac -I../hw/xfree86/ramdac -Ihw/xfree86/vgahw -I../hw/xfree86/vgahw -I. -I.. -I/usr/local/include -I/usr/local/include/X11/dri -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/harfbuzz -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -DHAVE_DIX_CONFIG_H -fno-strict-aliasing -fvisibility=hidden -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fPIC -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -DHAVE_XORG_CONFIG_H -DXORG_NO_SDKSYMS '-DFALLBACK_INPUT_DRIVER="libinput"' -MD -MQ hw/xfree86/common/libxorg_common.a.p/xf86Init.c.o -MF hw/xfree86/common/libxorg_common.a.p/xf86Init.c.o.d -o hw/xfree86/common/libxorg_common.a.p/xf86Init.c.o -c ../hw/xfree86/common/xf86Init.c
../hw/xfree86/common/xf86Init.c:272:1: error: redefinition of 'xf86AutoConfigOutputDevices'
272 | xf86AutoConfigOutputDevices(void)