Fix build on non-x86 architectures
This commit is contained in:
parent
ea92bf7718
commit
f2741116a7
1 changed files with 10 additions and 10 deletions
20
src/main.c
20
src/main.c
|
@ -576,30 +576,30 @@ void handle_x_events()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void prepare_fd_set(fd_set *fd_set, int *max_fd)
|
void prepare_fd_set(fd_set *set, int *max_fd)
|
||||||
{
|
{
|
||||||
FD_ZERO(fd_set);
|
FD_ZERO(set);
|
||||||
FD_SET(server.x11_fd, fd_set);
|
FD_SET(server.x11_fd, set);
|
||||||
*max_fd = server.x11_fd;
|
*max_fd = server.x11_fd;
|
||||||
if (sigchild_pipe_valid) {
|
if (sigchild_pipe_valid) {
|
||||||
FD_SET(sigchild_pipe[0], fd_set);
|
FD_SET(sigchild_pipe[0], set);
|
||||||
*max_fd = MAX(*max_fd, sigchild_pipe[0]);
|
*max_fd = MAX(*max_fd, sigchild_pipe[0]);
|
||||||
}
|
}
|
||||||
for (GList *l = panel_config.execp_list; l; l = l->next) {
|
for (GList *l = panel_config.execp_list; l; l = l->next) {
|
||||||
Execp *execp = (Execp *)l->data;
|
Execp *execp = (Execp *)l->data;
|
||||||
int fd = execp->backend->child_pipe_stdout;
|
int fd = execp->backend->child_pipe_stdout;
|
||||||
if (fd > 0) {
|
if (fd > 0) {
|
||||||
FD_SET(fd, fd_set);
|
FD_SET(fd, set);
|
||||||
*max_fd = MAX(*max_fd, fd);
|
*max_fd = MAX(*max_fd, fd);
|
||||||
}
|
}
|
||||||
fd = execp->backend->child_pipe_stderr;
|
fd = execp->backend->child_pipe_stderr;
|
||||||
if (fd > 0) {
|
if (fd > 0) {
|
||||||
FD_SET(fd, fd_set);
|
FD_SET(fd, set);
|
||||||
*max_fd = MAX(*max_fd, fd);
|
*max_fd = MAX(*max_fd, fd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (uevent_fd > 0) {
|
if (uevent_fd > 0) {
|
||||||
FD_SET(uevent_fd, fd_set);
|
FD_SET(uevent_fd, set);
|
||||||
*max_fd = MAX(*max_fd, uevent_fd);
|
*max_fd = MAX(*max_fd, uevent_fd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -742,13 +742,13 @@ void run_tint2_event_loop()
|
||||||
if (panel_refresh)
|
if (panel_refresh)
|
||||||
handle_panel_refresh();
|
handle_panel_refresh();
|
||||||
|
|
||||||
fd_set fd_set;
|
fd_set fds;
|
||||||
int max_fd;
|
int max_fd;
|
||||||
prepare_fd_set(&fd_set, &max_fd);
|
prepare_fd_set(&fds, &max_fd);
|
||||||
|
|
||||||
// Wait for an event and handle it
|
// Wait for an event and handle it
|
||||||
ts_event_read = 0;
|
ts_event_read = 0;
|
||||||
if (XPending(server.display) > 0 || select(max_fd + 1, &fd_set, 0, 0, get_next_timeout()) >= 0) {
|
if (XPending(server.display) > 0 || select(max_fd + 1, &fds, 0, 0, get_next_timeout()) >= 0) {
|
||||||
#ifdef HAVE_TRACING
|
#ifdef HAVE_TRACING
|
||||||
start_tracing((void*)run_tint2_event_loop);
|
start_tracing((void*)run_tint2_event_loop);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue