Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
fa9b5fd1
Commit
fa9b5fd1
authored
Jan 03, 2009
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
event_pipe: use _pipe() on WIN32
Windows has no pipe(), it only has _pipe() with two additional parameters.
parent
4e0973a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
event_pipe.c
src/event_pipe.c
+13
-2
No files found.
src/event_pipe.c
View file @
fa9b5fd1
...
...
@@ -26,6 +26,11 @@
#include <glib.h>
#include <string.h>
#ifdef WIN32
/* for _O_BINARY */
#include <fcntl.h>
#endif
static
int
event_pipe
[
2
];
static
GMutex
*
event_pipe_mutex
;
static
bool
pipe_events
[
PIPE_EVENT_MAX
];
...
...
@@ -76,8 +81,14 @@ main_notify_event(G_GNUC_UNUSED GIOChannel *source,
void
event_pipe_init
(
void
)
{
GIOChannel
*
channel
;
if
(
pipe
(
event_pipe
)
<
0
)
int
ret
;
#ifdef WIN32
ret
=
_pipe
(
event_pipe
,
512
,
_O_BINARY
);
#else
ret
=
pipe
(
event_pipe
);
#endif
if
(
ret
<
0
)
g_error
(
"Couldn't open pipe: %s"
,
strerror
(
errno
));
if
(
set_nonblocking
(
event_pipe
[
1
])
<
0
)
g_error
(
"Couldn't set non-blocking I/O: %s"
,
strerror
(
errno
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment