freebsd-ports/x11/xdm/files/patch-include_greet.h
Dimitry Andric ffa7085ab4 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
2023-06-28 19:25:30 +02:00

11 lines
328 B
C

--- 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