streams: Named systemd sockets are only supported since systemd v227

This commit is contained in:
Tobias Brunner
2017-10-13 10:17:37 +02:00
parent a97de61e78
commit 23e76d250f
2 changed files with 10 additions and 0 deletions
@@ -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
}