瀏覽代碼

Stop hardcoding /var

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2123 fd59a12c-fef9-0310-b244-a6a79926bd2f
Fabio M. Di Nitto 17 年之前
父節點
當前提交
a92f69632f
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lib/coroipcc.c

+ 2 - 2
lib/coroipcc.c

@@ -296,7 +296,7 @@ circular_memory_map (char *path, const char *file, void **buf, size_t bytes)
 
 	fd = mkstemp (path);
 	if (fd == -1) {
-		sprintf (path, "/var/run/%s", file);
+		sprintf (path, LOCALSTATEDIR "/run/%s", file);
 		fd = mkstemp (path);
 		if (fd == -1) {
 			return (-1);
@@ -351,7 +351,7 @@ memory_map (char *path, const char *file, void **buf, size_t bytes)
 
 	fd = mkstemp (path);
 	if (fd == -1) {
-		sprintf (path, "/var/run/%s", file);
+		sprintf (path, LOCALSTATEDIR "/run/%s", file);
 		fd = mkstemp (path);
 		if (fd == -1) {
 			return (-1);