File: hurd-dev-shm-is-a-tmpfs-here-as-well.patch

package info (click to toggle)
libqb 2.0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,916 kB
  • sloc: ansic: 22,138; sh: 4,465; makefile: 586
file content (48 lines) | stat: -rw-r--r-- 1,689 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@debian.org>
Date: Thu, 12 Oct 2017 15:13:25 +0200
Subject: hurd: /dev/shm is a tmpfs here as well
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Ferenc Wágner <wferi@debian.org>
---
 lib/ipc_setup.c | 4 ++--
 lib/unix.c      | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c
index 0ef9bb6..ff1d57f 100644
--- a/lib/ipc_setup.c
+++ b/lib/ipc_setup.c
@@ -666,7 +666,7 @@ handle_new_connection(struct qb_ipcs_service *s,
 
 	memset(&response, 0, sizeof(response));
 
-#if defined(QB_LINUX) || defined(QB_CYGWIN)
+#if defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU)
 	desc_len = snprintf(c->description, CONNECTION_DESCRIPTION - sizeof suffix,
 			    "/dev/shm/qb-%d-%d-%d-XXXXXX", s->pid, ugp->pid, c->setup.u.us.sock);
 	if (desc_len < 0) {
@@ -927,7 +927,7 @@ retry_accept:
 
 void remove_tempdir(const char *name)
 {
-#if defined(QB_LINUX) || defined(QB_CYGWIN)
+#if defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU)
 	char dirname[PATH_MAX];
 	char *slash = strrchr(name, '/');
 
diff --git a/lib/unix.c b/lib/unix.c
index f59cd0b..b1e4952 100644
--- a/lib/unix.c
+++ b/lib/unix.c
@@ -126,7 +126,7 @@ qb_sys_mmap_file_open(char *path, const char *file, size_t bytes,
 	if (is_absolute) {
 		(void)strlcpy(path, file, PATH_MAX);
 	} else {
-#if defined(QB_LINUX) || defined(QB_CYGWIN)
+#if defined(QB_LINUX) || defined(QB_CYGWIN) || defined(QB_GNU)
 		/* This is only now called when talking to an old libqb
 		   where we need to add qb- to the name */
 		snprintf(path, PATH_MAX, "/dev/shm/qb-%s", file);