[systemd-devel] missing sd_listen_fds & sd_is_socket

Lennart Poettering lennart at poettering.net
Sun Jan 1 06:28:13 PST 2012


On Sat, 31.12.11 20:57, Michael D. Berger (m.d.berger at ieee.org) wrote:

> I get undefined reference to sd_listen_fds and sd_is_socket.
> And also:
> 
>   # find / -name "sd_listen_fds.*"
>   /var/cache/man/cat3/sd_listen_fds.3.gz
>   /usr/share/man/man3/sd_listen_fds.3.gz
>   # find / -name "sd_is_socket.*"
>   /usr/share/man/man3/sd_is_socket.3.gz
> 
> So you see I cannot run MyDaemon.socket .
> It looks like my installation is incomplete.
> Any suggestions?

In older versions of systemd sd_listen_fds() is found in a drop-in
library which at least the Fedora version installs to
/usr/share/doc/systemd/. Just copy sd-daemon.c and sd-daemon.h into your
sources and add them to the code you build.

In newer versions of systemd we also provide this as norma shared
library, which you can build against via the libsystemd-daemon
pkg-config package.

I'd recommend everybody to use the shared library these days, but it's
also OK to continue to use the drop-in implementation, if it is
important not to add a dependency on the shared library to your project.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list