]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix systemd build on Linux.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 21 Mar 2014 18:28:30 +0000 (18:28 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Fri, 21 Mar 2014 18:28:30 +0000 (18:28 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11722 a1ca3aef-8c08-0410-bb20-df032aa958be

scheduler/main.c

index cb7d4e3017ae2d45ebf767160a5e0b36e57459eb..132cc6060a93214245f81820fba4222b65e6b452 100644 (file)
@@ -35,6 +35,7 @@ extern int launch_activate_socket(const char *name, int **fds, size_t *cnt);
 #endif /* HAVE_LAUNCH_H */
 
 #ifdef HAVE_SYSTEMD
+#  include <systemd/sd-daemon.h>
 #  define CUPS_KEEPALIVE CUPS_CACHEDIR "/org.cups.cupsd"
                                        /* Name of the systemd path file */
 #endif /* HAVE_SYSTEMD */
@@ -2042,7 +2043,7 @@ service_checkin(void)
 
   if ((count = sd_listen_fds(0)) < 0)
   {
-    cupsdLogMessage(CUPSD_LOG_ERROR, "service_checkin: Unable to get listener sockets: %s", strerror(error));
+    cupsdLogMessage(CUPSD_LOG_ERROR, "service_checkin: Unable to get listener sockets: %s", strerror(-count));
     exit(EXIT_FAILURE);
     return; /* anti-compiler-warning */
   }