chiark / gitweb /
Merge volume and build fixes
[disorder] / server / speaker.c
index 9b16cc8e2410eed1a2c74230d270b01cc7477edd..9cef6a43d370df40c146ac854382ecffd8fa818b 100644 (file)
@@ -79,6 +79,8 @@
 #include <sys/un.h>
 #include <sys/stat.h>
 #include <pthread.h>
+#include <sys/resource.h>
+#include <gcrypt.h>
 
 #include "configuration.h"
 #include "syscalls.h"
@@ -651,6 +653,11 @@ int main(int argc, char **argv) {
     info("set RLIM_NOFILE to %lu", (unsigned long)rl->rlim_cur);
   } else
     info("RLIM_NOFILE is %lu", (unsigned long)rl->rlim_cur);
+  /* gcrypt initialization */
+  if(!gcry_check_version(NULL))
+    disorder_fatal(0, "gcry_check_version failed");
+  gcry_control(GCRYCTL_INIT_SECMEM, 0);
+  gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
   /* create a pipe between the backend callback and the poll() loop */
   xpipe(sigpipe);
   nonblock(sigpipe[0]);