git: ffa7085ab412 - main - x11/xdm: fix build with clang 16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 28 Jun 2023 17:26:13 UTC
The branch main has been updated by dim:
URL: https://cgit.FreeBSD.org/ports/commit/?id=ffa7085ab4121e92eb61c4e1f6a7138e7ea43d6a
commit ffa7085ab4121e92eb61c4e1f6a7138e7ea43d6a
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-06-25 18:26:57 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-06-28 17:25:30 +0000
x11/xdm: fix build with clang 16
Clang 16 has a new error about incompatible function types, which shows
up when x11/xdm:
greet.c:451:20: error: incompatible function pointer types assigning to 'void (*)(void)' from 'int (*)(void)' [-Wincompatible-function-pointer-types]
__xdm_setgrent = dlfuncs->_setgrent;
^ ~~~~~~~~~~~~~~~~~~
This is because it assumes setgrent(3) returns int, which it has not
done since a very long time.
Reported by: O. Hartmann <ohartmann@walstatt.org>
PR: 272209
MFH: 2023Q2
---
x11/xdm/Makefile | 1 +
x11/xdm/files/patch-include_greet.h | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/x11/xdm/Makefile b/x11/xdm/Makefile
index 158166693ed5..f828df33c99b 100644
--- a/x11/xdm/Makefile
+++ b/x11/xdm/Makefile
@@ -1,5 +1,6 @@
PORTNAME= xdm
PORTVERSION= 1.1.14
+PORTREVISION= 1
CATEGORIES= x11
MAINTAINER= x11@FreeBSD.org
diff --git a/x11/xdm/files/patch-include_greet.h b/x11/xdm/files/patch-include_greet.h
new file mode 100644
index 000000000000..08b77fdfcc26
--- /dev/null
+++ b/x11/xdm/files/patch-include_greet.h
@@ -0,0 +1,11 @@
+--- include/greet.h.orig 2022-12-03 21:38:28 UTC
++++ include/greet.h
+@@ -45,7 +45,7 @@ from The Open Group.
+ # define GETPWNAM_ARGS /*unknown*/
+ #endif
+
+-#if defined(__FreeBSD__) || defined(__bsdi__) || defined(__osf__)
++#if defined(__bsdi__) || defined(__osf__)
+ # define SETGRENT_TYPE int
+ #else
+ # define SETGRENT_TYPE void