diff options
author | Thomas Haller <thaller@redhat.com> | 2019-04-04 09:49:37 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-04-04 09:49:37 +0200 |
commit | 917cd3eb0388d872119667f119b90f3927844d50 (patch) | |
tree | b38f6e0c016094fe6aff975544b6492738a996dd /src/systemd/src/libsystemd/sd-event | |
parent | 9598adac60b08d627aec324e63addacfe5e0ebd7 (diff) | |
parent | b6032223988616c7d5c6c5715521aff1c5a81e40 (diff) | |
download | NetworkManager-917cd3eb0388d872119667f119b90f3927844d50.tar.gz |
systemd: merge branch systemd into master
Diffstat (limited to 'src/systemd/src/libsystemd/sd-event')
-rw-r--r-- | src/systemd/src/libsystemd/sd-event/sd-event.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemd/src/libsystemd/sd-event/sd-event.c b/src/systemd/src/libsystemd/sd-event/sd-event.c index 6f77421b0e..dad0801b71 100644 --- a/src/systemd/src/libsystemd/sd-event/sd-event.c +++ b/src/systemd/src/libsystemd/sd-event/sd-event.c @@ -17,6 +17,7 @@ #include "hashmap.h" #include "list.h" #include "macro.h" +#include "memory-util.h" #include "missing.h" #include "prioq.h" #include "process-util.h" @@ -25,7 +26,6 @@ #include "string-table.h" #include "string-util.h" #include "time-util.h" -#include "util.h" #define DEFAULT_ACCURACY_USEC (250 * USEC_PER_MSEC) @@ -3120,7 +3120,7 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { timeout = 0; m = epoll_wait(e->epoll_fd, ev_queue, ev_queue_max, - timeout == (uint64_t) -1 ? -1 : (int) ((timeout + USEC_PER_MSEC - 1) / USEC_PER_MSEC)); + timeout == (uint64_t) -1 ? -1 : (int) DIV_ROUND_UP(timeout, USEC_PER_MSEC)); if (m < 0) { if (errno == EINTR) { e->state = SD_EVENT_PENDING; |