Blame SOURCES/openpgm-c99.patch

9abaa2
Include <grp.h> for the setgroups function.  This avoids an implicit
9abaa2
function declaration and build failures with C99 compilers that do not
9abaa2
support them.
9abaa2
9abaa2
Submitted upstream: <https://github.com/steve-o/openpgm/pull/73>
9abaa2
9abaa2
diff -ur openpgm-release-5-2-122.orig/openpgm/pgm/configure.ac openpgm-release-5-2-122/openpgm/pgm/configure.ac
9abaa2
--- openpgm-release-5-2-122.orig/openpgm/pgm/configure.ac	2012-12-04 03:56:54.000000000 +0100
9abaa2
+++ openpgm-release-5-2-122/openpgm/pgm/configure.ac	2023-01-03 16:07:39.751560631 +0100
9abaa2
@@ -62,7 +62,7 @@
9abaa2
 
9abaa2
 # Checks for header files.
9abaa2
 AC_FUNC_ALLOCA
9abaa2
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h libintl.h limits.h locale.h malloc.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h wchar.h])
9abaa2
+AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h grp.h inttypes.h libintl.h limits.h locale.h malloc.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h wchar.h])
9abaa2
 
9abaa2
 # Checks for typedefs, structures, and compiler characteristics.
9abaa2
 AC_HEADER_STDBOOL
9abaa2
diff -ur openpgm-release-5-2-122.orig/openpgm/pgm/engine.c openpgm-release-5-2-122/openpgm/pgm/engine.c
9abaa2
--- openpgm-release-5-2-122.orig/openpgm/pgm/engine.c	2023-01-03 16:03:16.834181524 +0100
9abaa2
+++ openpgm-release-5-2-122/openpgm/pgm/engine.c	2023-01-03 16:08:05.458304376 +0100
9abaa2
@@ -31,6 +31,10 @@
9abaa2
 #	include <config.h>
9abaa2
 #endif
9abaa2
 
9abaa2
+#ifdef HAVE_GRP_H
9abaa2
+#	include <grp.h>
9abaa2
+#endif
9abaa2
+
9abaa2
 #ifndef _BSD_SOURCE
9abaa2
 #	define _BSD_SOURCE	1	/* getprotobyname_r */
9abaa2
 #endif