diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-10-14 17:21:27 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-10-14 17:21:27 +0000 |
commit | a50b256dde29028a056176a2bef99096f6c5b619 (patch) | |
tree | 2380b51100fa82d3f8bbfbe7d6b57447266adb6f /src/libs6dns/s6dns_init.c | |
parent | 36fa9ff7abbc5a7ab8979073f401d84cba609322 (diff) | |
download | s6-dns-a50b256dde29028a056176a2bef99096f6c5b619.tar.xz |
Port to the new librandom API.
Diffstat (limited to 'src/libs6dns/s6dns_init.c')
-rw-r--r-- | src/libs6dns/s6dns_init.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libs6dns/s6dns_init.c b/src/libs6dns/s6dns_init.c new file mode 100644 index 0000000..04f94d9 --- /dev/null +++ b/src/libs6dns/s6dns_init.c @@ -0,0 +1,11 @@ +/* ISC license. */ + +#include <skalibs/random.h> +#include <s6dns/s6-dns.h> + +int s6dns_init (void) +{ + if (!random_init()) return 0 ; + if (!s6dns_rci_init(&s6dns_rci_here, "/etc/resolv.conf")) return 0 ; + return 1 ; +} |