streams: Named systemd sockets are only supported since systemd v227
This commit is contained in:
@@ -1002,6 +1002,10 @@ if test x$systemd = xtrue; then
|
|||||||
AC_SUBST(systemd_journal_CFLAGS)
|
AC_SUBST(systemd_journal_CFLAGS)
|
||||||
AC_SUBST(systemd_journal_LIBS)]
|
AC_SUBST(systemd_journal_LIBS)]
|
||||||
)
|
)
|
||||||
|
saved_LIBS=$LIBS
|
||||||
|
LIBS="$systemd_LIBS $systemd_daemon_LIBS"
|
||||||
|
AC_CHECK_FUNCS(sd_listen_fds_with_names)
|
||||||
|
LIBS=$saved_LIBS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$tss_trousers = xtrue; then
|
if test x$tss_trousers = xtrue; then
|
||||||
|
|||||||
@@ -29,6 +29,11 @@
|
|||||||
*/
|
*/
|
||||||
stream_service_t *stream_service_create_systemd(char *uri, int backlog)
|
stream_service_t *stream_service_create_systemd(char *uri, int backlog)
|
||||||
{
|
{
|
||||||
|
#ifndef HAVE_SD_LISTEN_FDS_WITH_NAMES
|
||||||
|
DBG1(DBG_NET, "unable to open stream URI '%s': named systemd sockets not "
|
||||||
|
"supported", uri);
|
||||||
|
return NULL;
|
||||||
|
#else
|
||||||
int i, num_fds, fd;
|
int i, num_fds, fd;
|
||||||
char **fdmap;
|
char **fdmap;
|
||||||
|
|
||||||
@@ -62,4 +67,5 @@ stream_service_t *stream_service_create_systemd(char *uri, int backlog)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return stream_service_create_from_fd(fd);
|
return stream_service_create_from_fd(fd);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user