#! /bin/sh /usr/share/dpatch/dpatch-run
## 10_shmem_incorrect_usage.dpatch by Alexander GQ Gerasiov <gq@cs.msu.su>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix for shared memory usage.
@DPATCH@
Index: xneur/lib/config/xnconfig_memory.c
===================================================================
--- xneur.orig/lib/config/xnconfig_memory.c 2009-11-25 00:57:13.000000000 +0300
+++ xneur/lib/config/xnconfig_memory.c 2009-11-25 00:57:20.000000000 +0300
@@ -34,7 +34,9 @@
{
*need_init = FALSE;
- key_t segment_key = ftok("/", getuid());
+ char * key_file = PACKAGE_SYSCONFDIR_DIR;
+ key_t segment_key = ftok(key_file, getuid());
+
if (segment_key == -1)
{
log_message(ERROR, _("Can't generate shared memory segment key"));