mailing list of musl libc
 help / color / mirror / code / Atom feed
3659807c9aad0b0bb09450104db2bde4046712cd blob 561 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
27
 
#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) return __syscall_ret(r);
	if (cmd == IPC_STAT) {
		buf->shm_perm.mode >>= 16;
	}
	return r;
#endif
}
debug log:

solving 3659807 ...
found 3659807 in https://inbox.vuxu.org/musl/20180615020023.GM1392@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/20180615020023.GM1392@brightrain.aerifal.cx/
diff --git a/src/ipc/shmctl.c b/src/ipc/shmctl.c
index e2879f2..3659807 100644

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

index at:
100644 3659807c9aad0b0bb09450104db2bde4046712cd	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).