Should use an unsigned int for eventfd

This commit is contained in:
Kovid Goyal 2019-07-09 18:42:17 +05:30
parent c169f7ae83
commit c0000fb24e
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -245,7 +245,7 @@ initPollData(EventLoopData *eld, int display_fd) {
void
wakeupEventLoop(EventLoopData *eld) {
#ifdef HAS_EVENT_FD
static const int64_t value = 1;
static const uint64_t value = 1;
while (write(eld->wakeupFd, &value, sizeof value) < 0 && (errno == EINTR || errno == EAGAIN));
#else
while (write(eld->wakeupFds[1], "w", 1) < 0 && (errno == EINTR || errno == EAGAIN));