From ef4ccd7fa4b0af1c420ae7635255956945cb5448 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Tue, 2 Apr 2024 18:48:54 -0400 Subject: [PATCH] Fix some build issues (Issue #674) --- CHANGES.md | 2 ++ cups/dest.c | 2 +- scheduler/auth.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 00efcded87..c273e3d888 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -20,6 +20,8 @@ Changes in CUPS v2.5b1 (TBA) - Updated CUPS to require ZLIB. - Updated CUPS to require support for `poll` API. - Updated `cupsArray` APIs to support modern naming and types. +- Updated internal usage of CUPS array API to include callback pointer even when + not used (Issue #674) - Updated `cups_enum_dests()` timeout for listing available IPP printers (Issue #751) - Updated `httpAddrConnect2()` to handle `POLLHUP` together with `POLLIN` or diff --git a/cups/dest.c b/cups/dest.c index d406af2270..103e878bbd 100644 --- a/cups/dest.c +++ b/cups/dest.c @@ -125,7 +125,7 @@ static int cups_block_cb(cups_dest_block_t block, unsigned flags, cups_dest_t * #endif // __BLOCKS__ static int cups_compare_dests(cups_dest_t *a, cups_dest_t *b); static void cups_dest_browse_cb(cups_dnssd_browse_t *browse, void *cb_data, cups_dnssd_flags_t flags, uint32_t if_index, const char *name, const char *regtype, const char *domain); -static int cups_dnssd_compare_devices(_cups_dnssd_device_t *a, _cups_dnssd_device_t *b); +static int cups_dnssd_compare_devices(_cups_dnssd_device_t *a, _cups_dnssd_device_t *b, void *data); static void cups_dnssd_free_device(_cups_dnssd_device_t *device, _cups_dnssd_data_t *data); static _cups_dnssd_device_t *cups_dnssd_get_device(_cups_dnssd_data_t *data, const char *serviceName, const char *regtype, const char *replyDomain); static void cups_dest_query_cb(cups_dnssd_query_t *query, void *cb_data, cups_dnssd_flags_t flags, uint32_t if_index, const char *fullname, uint16_t rrtype, const void *qdata, uint16_t qlen); diff --git a/scheduler/auth.c b/scheduler/auth.c index 26bc9f3d0c..669ff1667d 100644 --- a/scheduler/auth.c +++ b/scheduler/auth.c @@ -157,8 +157,8 @@ cupsdAddName(cupsd_location_t *loc, /* I - Location to add to */ if (!loc->names) loc->names = cupsArrayNew3(NULL, NULL, NULL, 0, - (cups_acopy_func_t)_cupsStrPrivAlloc, - (cups_afree_func_t)_cupsStrPrivFree); + (cups_acopy_func_t)_cupsArrayStrdup, + (cups_afree_func_t)_cupsArrayFree); if (!cupsArrayAdd(loc->names, name)) { -- 2.47.2