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_LIBS)]
|
||||
)
|
||||
saved_LIBS=$LIBS
|
||||
LIBS="$systemd_LIBS $systemd_daemon_LIBS"
|
||||
AC_CHECK_FUNCS(sd_listen_fds_with_names)
|
||||
LIBS=$saved_LIBS
|
||||
fi
|
||||
|
||||
if test x$tss_trousers = xtrue; then
|
||||
|
||||
@@ -29,6 +29,11 @@
|
||||
*/
|
||||
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;
|
||||
char **fdmap;
|
||||
|
||||
@@ -62,4 +67,5 @@ stream_service_t *stream_service_create_systemd(char *uri, int backlog)
|
||||
return NULL;
|
||||
}
|
||||
return stream_service_create_from_fd(fd);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user