--- scheduler/main.c 2026-04-28 01:13:21.000000000 +0800 +++ scheduler/main.c 2026-06-08 22:01:57.000000000 +0800 @@ -17,8 +17,12 @@ #include "cupsd.h" #include #ifdef __APPLE__ -# include -# include +# if defined(HAVE_XPC) +# include +# endif +# if defined(HAVE_QOS) +# include +# endif #endif /* __APPLE__ */ #ifdef HAVE_ASL_H # include @@ -1933,7 +1937,7 @@ count; /* Number of listeners */ int *ld_sockets; /* Listener sockets */ -# ifdef __APPLE__ +# if defined(__APPLE__) && defined(HAVE_QOS) /* * Force "user initiated" priority for the main thread... */ @@ -1962,7 +1966,7 @@ free(ld_sockets); -# ifdef __APPLE__ +#if defined(__APPLE__) && defined(HAVE_XPC) xpc_transaction_begin(); # endif /* __APPLE__ */ } @@ -2132,7 +2136,7 @@ cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to create KeepAlive/PID file \"%s\": %s", pidfile, strerror(errno)); } -# ifdef __APPLE__ +#if defined(__APPLE__) && defined(HAVE_XPC) if (OnDemand && shutdown) xpc_transaction_end(); # endif /* __APPLE__ */ --- scheduler/cups-lpd.c 2026-04-28 01:13:21.000000000 +0800 +++ scheduler/cups-lpd.c 2026-06-08 21:56:06.000000000 +0800 @@ -26,7 +26,7 @@ #ifdef HAVE_INTTYPES_H # include #endif /* HAVE_INTTYPES_H */ -#ifdef __APPLE__ +#if defined(__APPLE__) && defined(HAVE_XPC) # include #endif /* __APPLE__ */ @@ -97,7 +97,7 @@ int hostlookups; /* Do hostname lookups? */ -#ifdef __APPLE__ +#if defined(__APPLE__) && defined(HAVE_XPC) xpc_transaction_begin(); #endif /* __APPLE__ */ @@ -215,7 +215,7 @@ syslog(LOG_ERR, "Unable to get command line from client!"); putchar(1); -#ifdef __APPLE__ +#if defined(__APPLE__) && defined(HAVE_XPC) xpc_transaction_end(); #endif /* __APPLE__ */ @@ -306,7 +306,7 @@ syslog(LOG_INFO, "Closing connection"); closelog(); -#ifdef __APPLE__ +#if defined(__APPLE__) && defined(HAVE_XPC) xpc_transaction_end(); #endif /* __APPLE__ */