Просмотр исходного кода

Stop hardcoding /var

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2123 fd59a12c-fef9-0310-b244-a6a79926bd2f
Fabio M. Di Nitto 17 лет назад
Родитель
Сommit
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);