summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog6
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/use-nfds_t-in-cl_poll.patch118
3 files changed, 125 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 2da4978..5fb0657 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+cluster-glue (1.0.12-24) unstable; urgency=medium
+
+ * New patch: Use nfds_t in cl_poll() (Closes: #1077353)
+
+ -- Ferenc Wágner <wferi@debian.org> Sat, 31 Aug 2024 15:48:18 +0200
+
cluster-glue (1.0.12-23~progress7.99u1) graograman-backports; urgency=medium
* Uploading to graograman-updates, remaining changes:
diff --git a/debian/patches/series b/debian/patches/series
index c8cb124..c1c24bb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -18,3 +18,4 @@ ha_logger_man.patch
fix-configure-libxml2.patch
0019-Current-Pacemaker-does-not-use-ha_logd.patch
0020-Fix-typo-bounary-boundary.patch
+use-nfds_t-in-cl_poll.patch
diff --git a/debian/patches/use-nfds_t-in-cl_poll.patch b/debian/patches/use-nfds_t-in-cl_poll.patch
new file mode 100644
index 0000000..9f7af90
--- /dev/null
+++ b/debian/patches/use-nfds_t-in-cl_poll.patch
@@ -0,0 +1,118 @@
+From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org>
+Date: Sat, 31 Aug 2024 14:29:02 +0200
+Subject: Use nfds_t in cl_poll()
+
+This complements our long-existing ipc_param_type patch.
+
+Closes: #1077353
+---
+
+Index: cluster-glue/lib/clplumbing/cl_poll.c
+===================================================================
+--- cluster-glue.orig/lib/clplumbing/cl_poll.c 2024-08-31 14:47:54.956141061 +0200
++++ cluster-glue/lib/clplumbing/cl_poll.c 2024-08-31 14:48:12.635692755 +0200
+@@ -98,8 +98,8 @@
+ }
+
+ #else /* HAVE_FCNTL_F_SETSIG */
+-static void dump_fd_info(struct pollfd *fds, unsigned int nfds, int timeoutms);
+-static void check_fd_info(struct pollfd *fds, unsigned int nfds);
++static void dump_fd_info(struct pollfd *fds, nfds_t nfds, int timeoutms);
++static void check_fd_info(struct pollfd *fds, nfds_t nfds);
+ static void cl_real_poll_fd(int fd);
+ static void cl_poll_sigpoll_overflow_sigaction(int nsig, siginfo_t* , void*);
+ static void cl_poll_sigpoll_overflow(void);
+@@ -136,7 +136,7 @@
+ static int cl_nsig = 0;
+ static gboolean SigQOverflow = FALSE;
+
+-static int cl_init_poll_sig(struct pollfd *fds, unsigned int nfds);
++static int cl_init_poll_sig(struct pollfd *fds, nfds_t nfds);
+ static short cl_poll_assignsig(int fd);
+ static void cl_poll_sigaction(int nsig, siginfo_t* info, void* v);
+ static int cl_poll_prepsig(int nsig);
+@@ -216,9 +216,9 @@
+ * file descriptors.
+ */
+ static int
+-cl_init_poll_sig(struct pollfd *fds, unsigned int nfds)
++cl_init_poll_sig(struct pollfd *fds, nfds_t nfds)
+ {
+- unsigned j;
++ nfds_t j;
+ int maxmonfd = -1;
+ int nmatch = 0;
+
+@@ -543,7 +543,7 @@
+ */
+
+ int
+-cl_poll(struct pollfd *fds, unsigned int nfds, int timeoutms)
++cl_poll(struct pollfd *fds, nfds_t nfds, int timeoutms)
+ {
+ int nready;
+ struct timespec ts;
+@@ -551,7 +551,7 @@
+ const struct timespec* itertime = &ts;
+ siginfo_t info;
+ int eventcount = 0;
+- unsigned int j;
++ nfds_t j;
+ int savederrno = errno;
+ int stw_errno;
+ int rc;
+@@ -679,19 +679,20 @@
+ * Debugging routine for printing current poll arguments, etc.
+ */
+ static void
+-dump_fd_info(struct pollfd *fds, unsigned int nfds, int timeoutms)
++dump_fd_info(struct pollfd *fds, nfds_t nfds, int timeoutms)
+ {
+ unsigned j;
++ nfds_t fd_index;
+
+ cl_log(LOG_DEBUG, "timeout: %d milliseconds", timeoutms);
+- for (j=0; j < nfds; ++j) {
+- int fd = fds[j].fd;
++ for (fd_index=0; fd_index < nfds; ++fd_index) {
++ int fd = fds[fd_index].fd;
+ poll_info_t* moni = monitorinfo+fd;
+
+ cl_log(LOG_DEBUG, "fd %d flags: 0%o, signal: %d, events: 0x%x"
+ ", revents: 0x%x, pendevents: 0x%x"
+ , fd, fcntl(fd, F_GETFL), moni->nsig
+- , fds[j].events, fds[j].revents, moni->pendevents);
++ , fds[fd_index].events, fds[fd_index].revents, moni->pendevents);
+ }
+ for (j=SIGRTMIN; j < (unsigned)SIGRTMAX; ++j) {
+ if (!sigismember(&SignalSet, j)) {
+@@ -705,12 +706,13 @@
+ * Debugging routine for auditing our file descriptors, etc.
+ */
+ static void
+-check_fd_info(struct pollfd *fds, unsigned int nfds)
++check_fd_info(struct pollfd *fds, nfds_t nfds)
+ {
+ unsigned j;
++ nfds_t fd_index;
+
+- for (j=0; j < nfds; ++j) {
+- int fd = fds[j].fd;
++ for (fd_index=0; fd_index < nfds; ++fd_index) {
++ int fd = fds[fd_index].fd;
+ poll_info_t* moni = monitorinfo+fd;
+
+ if (!sigismember(&SignalSet, moni->nsig)) {
+Index: cluster-glue/include/clplumbing/cl_poll.h
+===================================================================
+--- cluster-glue.orig/include/clplumbing/cl_poll.h 2024-08-31 14:47:54.956141061 +0200
++++ cluster-glue/include/clplumbing/cl_poll.h 2024-08-31 14:47:54.952141163 +0200
+@@ -31,7 +31,7 @@
+ * uses the real poll() call.
+ *
+ */
+-int cl_poll(struct pollfd *fds, unsigned int nfds, int timeout_ms);
++int cl_poll(struct pollfd *fds, nfds_t nfds, int timeout_ms);
+
+ /*
+ * Call cl_poll_ignore() when you close a file descriptor you monitored