projects
/
platform
/
upstream
/
wayland.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4162863
)
adding O_RDWR flag in the open()
author
Jiayuan Ren
<renjiayuan1314@gmail.com>
Thu, 24 Oct 2019 22:31:56 +0000
(22:31 +0000)
committer
Simon Ser
<contact@emersion.fr>
Thu, 24 Oct 2019 22:31:56 +0000
(22:31 +0000)
According to the manual of open:
"The argument flags must include one of the following access modes:
O_RDONLY, O_WRONLY, or O_RDWR."
src/wayland-server.c
patch
|
blob
|
history
diff --git
a/src/wayland-server.c
b/src/wayland-server.c
index
c4c52ed
..
5f466a0
100644
(file)
--- a/
src/wayland-server.c
+++ b/
src/wayland-server.c
@@
-1435,7
+1435,7
@@
wl_socket_lock(struct wl_socket *socket)
snprintf(socket->lock_addr, sizeof socket->lock_addr,
"%s%s", socket->addr.sun_path, LOCK_SUFFIX);
- socket->fd_lock = open(socket->lock_addr, O_CREAT | O_CLOEXEC,
+ socket->fd_lock = open(socket->lock_addr, O_CREAT | O_CLOEXEC
| O_RDWR
,
(S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
if (socket->fd_lock < 0) {