Skip to content
Snippets Groups Projects
Commit 5501e6b6 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

daemon: Properly initialize libgcrypt.

* nix/nix-daemon/guix-daemon.cc (main): Call `gcry_check_version'.
parent 03fa2758
No related branches found
No related tags found
No related merge requests found
/* Guix --- Nix package management from Guile. -*- coding: utf-8 -*- /* Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org> Copyright (C) 2012, 2013 Ludovic Courtès <ludo@gnu.org>
This file is part of Guix. This file is part of Guix.
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <globals.hh> #include <globals.hh>
#include <util.hh> #include <util.hh>
#include <gcrypt.h>
#include <stdlib.h> #include <stdlib.h>
#include <argp.h> #include <argp.h>
#include <unistd.h> #include <unistd.h>
...@@ -165,6 +167,13 @@ main (int argc, char *argv[]) ...@@ -165,6 +167,13 @@ main (int argc, char *argv[])
{ {
Strings nothing; Strings nothing;
/* Initialize libgcrypt. */
if (!gcry_check_version (GCRYPT_VERSION))
{
fprintf (stderr, "error: libgcrypt version mismatch\n");
exit (EXIT_FAILURE);
}
#ifdef HAVE_CHROOT #ifdef HAVE_CHROOT
settings.useChroot = true; settings.useChroot = true;
#else #else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment