aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2017-10-12 18:40:15 +0200
committerTobias Brunner <tobias@strongswan.org>2017-10-13 10:17:37 +0200
commit23e76d250f1fbc16537f039b00853aa71e8aa529 (patch)
tree0f55c94e30a7e89265015e9561a7b586ca9bcfe2 /src
parenta97de61e78df611207a2700dad7057d9b74fb5bc (diff)
downloadstrongswan-23e76d250f1fbc16537f039b00853aa71e8aa529.tar.bz2
strongswan-23e76d250f1fbc16537f039b00853aa71e8aa529.tar.xz
streams: Named systemd sockets are only supported since systemd v227
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/networking/streams/stream_service_systemd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstrongswan/networking/streams/stream_service_systemd.c b/src/libstrongswan/networking/streams/stream_service_systemd.c
index 64b92836a..5c6b3f690 100644
--- a/src/libstrongswan/networking/streams/stream_service_systemd.c
+++ b/src/libstrongswan/networking/streams/stream_service_systemd.c
@@ -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
}