From 8354850c3fa2da57ed1695dbb2da1d2eb1a83f55 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Wed, 13 Sep 2023 10:36:02 +0200 Subject: [PATCH] Merge fix from master regarding lpstat hanging Master commit: https://github.com/OpenPrinting/cups/commit/3f763a960f3 Fixes #773 --- CHANGES.md | 1 + cups/request.c | 6 ++++-- scheduler/log.c | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 23dbb6e1b3..5832cd13d2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ Changes in CUPS v2.4.7 (TBA) - Added OpenSSL support for cupsHashData (Issue #762) - Fixed delays in lpd backend (Issue #741) - Fixed extensive logging in scheduler (Issue #604) +- Fixed hanging of `lpstat` on IBM AIX (Issue #773) - Fixed printing to stderr if we can't open cups-files.conf (Issue #777) - Fixed purging job files via `cancel -x` (Issue #742) - Fixed a bug in the PPD command interpretation code (Issue #768) diff --git a/cups/request.c b/cups/request.c index 66c803a04c..4526dd687f 100644 --- a/cups/request.c +++ b/cups/request.c @@ -25,9 +25,11 @@ #ifndef O_BINARY # define O_BINARY 0 #endif /* O_BINARY */ -#ifndef MSG_DONTWAIT +#ifdef _AIX +# define MSG_DONTWAIT MSG_NONBLOCK +#elif !defined(MSG_DONTWAIT) # define MSG_DONTWAIT 0 -#endif /* !MSG_DONTWAIT */ +#endif /* _AIX */ /* diff --git a/scheduler/log.c b/scheduler/log.c index 8aafb66b72..8a2996e30d 100644 --- a/scheduler/log.c +++ b/scheduler/log.c @@ -22,6 +22,9 @@ # include #endif /* HAVE_ASL_H */ #include +#ifndef va_copy +# define va_copy(__list1, __list2) ((void)(__list1 = __list2)) +#endif /*