-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x11-apps/xdm: Fix -Wincompatible-pointer-types warning from GCC 14
Although there is a merge request[0] but for some reason the changes didn't land in 1.1.15[1]. It has been reported upstream[2]. [0]: https://gitlab.freedesktop.org/xorg/app/xdm/-/merge_requests/18 [1]: https://gitlab.freedesktop.org/xorg/app/xdm/-/blob/xdm-1.1.15/chooser/chooser.c?ref_type=tags#L229 [2]: https://gitlab.freedesktop.org/xorg/app/xdm/-/issues/16 Closes: https://bugs.gentoo.org/927712 Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
- Loading branch information
Showing
2 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
https://gitlab.freedesktop.org/xorg/app/xdm/-/merge_requests/18 | ||
From: Alan Coopersmith <alan.coopersmith@oracle.com> | ||
Date: Tue, 5 Dec 2023 17:25:28 -0800 | ||
Subject: [PATCH] Fix -Wincompatible-pointer-types warning from gcc (issue #15) | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
chooser.c:280:26: warning: passing argument 2 of ‘XawListChange’ from | ||
incompatible pointer type [-Wincompatible-pointer-types] | ||
280 | XawListChange (list, newTable, size, 0, TRUE); | ||
| ^~~~~~~~ | ||
| | | ||
| char ** | ||
In file included from chooser.c:59: | ||
/usr/include/X11/Xaw/List.h:170:27: note: expected ‘const char **’ but | ||
argument is of type ‘char **’ | ||
170 | _Xconst char **list, | ||
|
||
Closes: #15 | ||
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> | ||
--- a/chooser/chooser.c | ||
+++ b/chooser/chooser.c | ||
@@ -226,7 +226,7 @@ RebuildTable (int size) | ||
newTable[i] = names->fullname; | ||
qsort (newTable, size, sizeof (char *), HostnameCompare); | ||
} | ||
- XawListChange (list, (_Xconst char **) newTable, size, 0, TRUE); | ||
+ XawListChange (list, newTable, size, 0, TRUE); | ||
free (NameTable); | ||
NameTable = newTable; | ||
NameTableSize = size; | ||
-- | ||
GitLab | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Copyright 1999-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
XORG_TARBALL_SUFFIX="xz" | ||
inherit xorg-3 pam systemd | ||
|
||
DEFAULTVT=vt7 | ||
|
||
DESCRIPTION="X.Org xdm application" | ||
|
||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" | ||
IUSE="pam systemd truetype xinerama xpm" | ||
|
||
RDEPEND=" | ||
x11-apps/sessreg | ||
x11-apps/xconsole | ||
x11-apps/xinit | ||
x11-apps/xrdb | ||
x11-apps/xsm | ||
x11-libs/libX11 | ||
x11-libs/libXau | ||
x11-libs/libXaw | ||
x11-libs/libXdmcp | ||
x11-libs/libXext | ||
x11-libs/libXmu | ||
x11-libs/libXt | ||
virtual/libcrypt:= | ||
pam? ( sys-libs/pam ) | ||
systemd? ( >=sys-apps/systemd-209:= ) | ||
truetype? ( | ||
x11-libs/libXrender | ||
x11-libs/libXft | ||
) | ||
xinerama? ( x11-libs/libXinerama ) | ||
xpm? ( x11-libs/libXpm ) | ||
elibc_glibc? ( dev-libs/libbsd )" | ||
DEPEND="${RDEPEND} | ||
x11-base/xorg-proto" | ||
|
||
PATCHES=( | ||
"${FILESDIR}/${PN}-1.1.15-gcc14.patch" | ||
) | ||
|
||
src_prepare() { | ||
sed -i -e 's:^Alias=.*$:Alias=display-manager.service:' \ | ||
xdm.service.in || die | ||
|
||
# Disable XDM-AUTHORIZATION-1 (bug #445662). | ||
# it causes issue with libreoffice and SDL games (bug #306223). | ||
sed -i -e '/authorize/a DisplayManager*authName: MIT-MAGIC-COOKIE-1' \ | ||
config/xdm-config.in || die | ||
|
||
xorg-3_src_prepare | ||
} | ||
|
||
src_configure() { | ||
local XORG_CONFIGURE_OPTIONS=( | ||
--enable-ipv6 | ||
$(use_with pam) | ||
$(use_with systemd systemd-daemon) | ||
$(use_with truetype xft) | ||
$(use_with xinerama) | ||
$(use_enable xpm xpm-logos) | ||
--with-systemdsystemunitdir="$(systemd_get_systemunitdir)" | ||
--with-default-vt=${DEFAULTVT} | ||
--with-xdmconfigdir=/etc/X11/xdm | ||
) | ||
xorg-3_src_configure | ||
} | ||
|
||
src_install() { | ||
xorg-3_src_install | ||
|
||
exeinto /usr/$(get_libdir)/X11/xdm | ||
doexe "${FILESDIR}"/Xsession | ||
|
||
use pam && pamd_mimic system-local-login xdm auth account session | ||
|
||
# Keep /var/lib/xdm. This is where authfiles are stored. See #286350. | ||
keepdir /var/lib/xdm | ||
} |