]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/io-util.h
tree-wide: use UINT64_MAX or friends
[thirdparty/systemd.git] / src / basic / io-util.h
index 719e19e85d6124e86b9f7f18ff01393297f1fb88..d98817f760955104a6b655a27d79de05d31b9051 100644 (file)
@@ -1,6 +1,7 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 #pragma once
 
+#include <poll.h>
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdint.h>
@@ -18,6 +19,7 @@ int loop_write(int fd, const void *buf, size_t nbytes, bool do_poll);
 
 int pipe_eof(int fd);
 
+int ppoll_usec(struct pollfd *fds, size_t nfds, usec_t timeout);
 int fd_wait_for_event(int fd, int event, usec_t timeout);
 
 ssize_t sparse_write(int fd, const void *p, size_t sz, size_t run_length);
@@ -60,7 +62,7 @@ static inline bool FILE_SIZE_VALID_OR_INFINITY(uint64_t l) {
 
         /* Same as above, but allows one extra value: -1 as indication for infinity. */
 
-        if (l == (uint64_t) -1)
+        if (l == UINT64_MAX)
                 return true;
 
         return FILE_SIZE_VALID(l);