CI meson-disable-options builds were failing with:
../hw/xwayland/xwayland-screen.c: In function ‘xwl_close_screen’:
../hw/xwayland/xwayland-screen.c:246:5: error: implicit declaration of
function ‘XaceDeleteCallback’; did you mean ‘DeleteCallback’?
[-Werror=implicit-function-declaration]
246 | XaceDeleteCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, screen);
| ^~~~~~~~~~~~~~~~~~
| DeleteCallback
../hw/xwayland/xwayland-screen.c:246:24: error: ‘XACE_PROPERTY_ACCESS’
undeclared (first use in this function)
246 | XaceDeleteCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, screen);
| ^~~~~~~~~~~~~~~~~~~~
../hw/xwayland/xwayland-screen.c: In function ‘xwl_screen_init’:
../hw/xwayland/xwayland-screen.c:1174:5: error: implicit declaration of
function ‘XaceRegisterCallback’ [-Werror=implicit-function-declaration]
1174 | XaceRegisterCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, pScreen);
| ^~~~~~~~~~~~~~~~~~~~
../hw/xwayland/xwayland-screen.c:1174:26: error: ‘XACE_PROPERTY_ACCESS’
undeclared (first use in this function)
1174 | XaceRegisterCallback(XACE_PROPERTY_ACCESS, xwl_access_property_callback, pScreen);
| ^~~~~~~~~~~~~~~~~~~~
Fixes: a07c2cda9 ("xwayland: Add an XACE property access handler")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2056>
CI meson-disable-options builds were failing with:
../hw/xfree86/drivers/modesetting/driver.c:127:5: error: ‘ms_device_match’
undeclared here (not in a function)
127 | ms_device_match,
| ^~~~~~~~~~~~~~~
../hw/xfree86/drivers/modesetting/driver.c: In function ‘ms_get_drm_master_fd’:
../hw/xfree86/drivers/modesetting/driver.c:1179:19: error: variable ‘pEnt’
set but not used [-Werror=unused-but-set-variable]
1179 | EntityInfoPtr pEnt;
| ^~~~
../hw/xfree86/drivers/modesetting/driver.c: At top level:
../hw/xfree86/drivers/modesetting/driver.c:84:13: error: ‘ms_pci_probe’
used but never defined [-Werror]
84 | static Bool ms_pci_probe(DriverPtr driver,
| ^~~~~~~~~~~~
../hw/xfree86/drivers/modesetting/driver.c:313:1: error: ‘probe_hw_pci’
defined but not used [-Werror=unused-function]
313 | probe_hw_pci(const char *dev, struct pci_device *pdev)
| ^~~~~~~~~~~~
Fixes: a72bdf170 ("modesetting: rewrite probing based on fbdev.")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2056>
Building with -Dxace=false was generating many failures of the form:
../dix/cursor.c: In function ‘AllocARGBCursor’:
../dix/cursor.c:281:10: error: implicit declaration of function
‘XaceHookResourceAccess’; did you mean ‘XaceHookPropertyAccess’?
[-Werror=implicit-function-declaration]
281 | rc = XaceHookResourceAccess(client, cid, X11_RESTYPE_CURSOR,
| ^~~~~~~~~~~~~~~~~~~~~~
| XaceHookPropertyAccess
Fixes: ae3c57333 ("xace: typesafe hook function for XACE_RESOURCE_ACCESS")
Fixes: 9524ffee8 ("xace: typesafe hook function for XACE_DEVICE_ACCESS")
Fixes: 67e468c8b ("xace: typesafe hook function for XACE_SEND_ACCESS")
Fixes: 3dfe00d5e ("xace: typesafe hook function for XACE_RECEIVE_ACCESS")
Fixes: 922b7685d ("xace: typesafe hook function for XACE_CLIENT_ACCESS")
Fixes: 0f6bb23bc ("xace: typesafe hook function for XACE_EXT_ACCESS")
Fixes: 47d6c3ad7 ("xace: typesafe hook function for XACE_SERVER_ACCESS")
Fixes: 51d8bcfc0 ("xace: typesafe hook function for XACE_SCREEN_ACCESS")
Fixes: 305f2d59d ("xace: typesafe hook function for XACE_SCREENSAVER_ACCESS")
Fixes: 591d95c79 ("xace: typesafe hook function for XACE_AUTH_AVAIL")
Fixes: facdaae4e ("xace: typesafe hook function for XACE_KEY_AVAIL")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2056>
We have too many options to run an exhaustive matrix of the combinations,
but this should at least help us catch code that won't compile in many
of the ifdef paths we don't go down in the default configs.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2056>
This reverts commit a57db845bb.
It breaks when building with -Dxinerama=false:
../Xext/shape.c: In function ‘ProcShapeRectangles’:
../Xext/shape.c:318:12: error: too few arguments to function
‘ShapeRectangles’; expected 2, have 1
318 | return ShapeRectangles(client);
| ^~~~~~~~~~~~~~~
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2055>
../Xext/xf86bigfont.c: At top level:
../Xext/xf86bigfont.c:683:1: error: no previous prototype for
‘XFree86BigfontExtensionInit’ [-Werror=missing-prototypes]
683 | XFree86BigfontExtensionInit(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 33350ef8f ("include: move private definitions out of extinit.h")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2053>
Build breaks with gcc 14 & later when xf86bigfont is enabled:
../Xext/xf86bigfont.c: In function ‘XFree86BigfontExtensionInit’:
../Xext/xf86bigfont.c:709:28: error: implicit declaration of function
‘xfont2_allocate_font_private_index’;
did you mean ‘AllocateFontPrivateIndex’? [-Wimplicit-function-declaration]
709 | FontShmdescIndex = xfont2_allocate_font_private_index();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| AllocateFontPrivateIndex
Fixes: 05a793f5b ("dix: Switch to the libXfont2 API (v2)")
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2053>
This reverts commit 8e8bf63908.
It failed to build if xf86bigfont was enabled:
../os/utils.c: In function ‘AbortServer’:
../os/utils.c:1555:5: error: implicit declaration of function
‘XF86BigfontCleanup’ [-Wimplicit-function-declaration]
1555 | XF86BigfontCleanup();
| ^~~~~~~~~~~~~~~~~~
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2053>
This commit doesn't compile, but wasn't noticed since xf86bigfont
isn't enabled by default, so wasn't being built in our CI builds.
(The ".type = X_Reply;" line needs to end with a , not a ;)
This reverts commit b5a3ac9527.
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2053>
In most typical Linux X servers (like Xvfb, Xephyr, or Xwayland), no child process outlives the server, so this issue rarely arises. However, in embedded X servers (based on Xvfb or Kdrive) or in custom Xorg modules, the server might launch a long-running command with regular fork+exec calls. If the X server crashes or exits while that command is still running (for example, it spawns a tombstone generator or any process that hangs or turns to zombie), the file descriptor associated with the abstract socket can remain open in the child process. This leads to the kernel refusing to allow another X server to bind the same socket until the child process terminates (because there is no explicit way to unlink abstract socket, unlike Unix socket). By marking the file descriptor as close-on-exec, we ensure it is automatically closed in child processes, preserving the ability of a new X server process to bind the socket immediately.
Signed-off-by: Twaik Yont <9674930+twaik@users.noreply.github.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1906>
Previously, when parsing multiple configuration files containing the same
section names, only the last occurrence of each section would be retained.
Earlier definitions were silently discarded due to unconditional memory
allocation and overwriting of pointers during parsing.
This resulted in incomplete or incorrect configuration state when users
intended to merge or extend configuration through multiple files.
The section parsing functions in Files.c, Flags.c, and Module.c now
accept existing section pointers. These functions allocate new memory only
if the input pointer is NULL, preserving earlier data when re-parsing.
read.c has been updated to detect and pass existing section pointers when
encountering duplicate sections across files, preventing loss of prior content.
With these changes, the parser properly accumulates and merges configuration
data across multiple files, ensuring that all relevant settings are preserved.
Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/467
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2045>