mailing list of musl libc
 help / color / mirror / code / Atom feed
9d723d9b2abaa1630a6e1c349241e4210626126e blob 549 bytes (raw)

 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
 
#include <sys/shm.h>
#include "syscall.h"
#include "ipc.h"

int shmctl(int id, int cmd, struct shmid_ds *buf)
{
#ifdef SYSCALL_IPC_BROKEN_MODE
	struct shmid_ds tmp;
	if (cmd == IPC_SET) {
		tmp = *buf;
		tmp.shm_perm.mode *= 0x10000U;
		buf = &tmp;
	}
#endif
#ifdef SYS_shmctl
	int r = __syscall(SYS_shmctl, id, cmd | IPC_64, buf);
#else
	int r = __syscall(SYS_ipc, IPCOP_shmctl, id, cmd | IPC_64, 0, buf, 0);
#endif
#ifdef SYSCALL_IPC_BROKEN_MODE
	if (r >= 0 && cmd == IPC_STAT) {
		buf->shm_perm.mode >>= 16;
	}
#endif
	return __syscall_ret(r);
}
debug log:

solving 9d723d9 ...
found 9d723d9 in https://inbox.vuxu.org/musl/20180615020154.GN1392@brightrain.aerifal.cx/
found e2879f2 in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 e2879f20aa8009e15f4b0851a9bf749f4e3dd4ad	src/ipc/shmctl.c

applying [1/1] https://inbox.vuxu.org/musl/20180615020154.GN1392@brightrain.aerifal.cx/
diff --git a/src/ipc/shmctl.c b/src/ipc/shmctl.c
index e2879f2..9d723d9 100644

Checking patch src/ipc/shmctl.c...
Applied patch src/ipc/shmctl.c cleanly.

index at:
100644 9d723d9b2abaa1630a6e1c349241e4210626126e	src/ipc/shmctl.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).