diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc index 6ffc8f04ad..823eeb674e 100644 --- a/nix/nix-daemon/guix-daemon.cc +++ b/nix/nix-daemon/guix-daemon.cc @@ -1,5 +1,5 @@ /* Guix --- Nix package management from Guile. -*- coding: utf-8 -*- - Copyright (C) 2012 Ludovic Courtès + Copyright (C) 2012, 2013 Ludovic Courtès This file is part of Guix. @@ -23,6 +23,8 @@ #include #include +#include + #include #include #include @@ -165,6 +167,13 @@ main (int argc, char *argv[]) { Strings nothing; + /* Initialize libgcrypt. */ + if (!gcry_check_version (GCRYPT_VERSION)) + { + fprintf (stderr, "error: libgcrypt version mismatch\n"); + exit (EXIT_FAILURE); + } + #ifdef HAVE_CHROOT settings.useChroot = true; #else