Index: platforms/unix/plugins/SocketPlugin/sqUnixSocket.c
===================================================================
--- platforms/unix/plugins/SocketPlugin/sqUnixSocket.c	(Revision 3016)
+++ platforms/unix/plugins/SocketPlugin/sqUnixSocket.c	(Arbeitskopie)
@@ -93,6 +93,12 @@
 # define MAXHOSTNAMELEN	256
 #endif
 
+#ifdef HAVE_SD_DAEMON
+# include <systemd/sd-daemon.h>
+#else
+# define SD_LISTEN_FDS_START 3
+# define sd_listen_fds(u) 0
+#endif
 
 /* debugging stuff. can probably be deleted */
 
@@ -119,6 +125,7 @@
 
 #define TCPSocketType	 	0
 #define UDPSocketType	 	1
+#define ProvidedTCPSocketType	2
 
 
 /*** Resolver states ***/
@@ -549,6 +556,20 @@
       /* --- UDP --- */
       newSocket= socket(domain, SOCK_DGRAM, 0);
     }
+  else if (ProvidedTCPSocketType == socketType)
+    {
+      /* --- Existing socket --- */
+      if (sd_listen_fds(0) == 0)
+        {
+          socketType = TCPSocketType;
+          newSocket= SD_LISTEN_FDS_START + 0;
+        }
+      else
+        {
+          interpreterProxy->success(false);
+          return;
+        }
+    }
   if (-1 == newSocket)
     {
       /* socket() failed, or incorrect socketType */
