diff options
| author | Alejandro Colomar <colomar.6.4.3@gmail.com> | 2020-09-10 23:13:25 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-09-11 11:33:28 +0200 |
| commit | 77de385db6d215a3a61a94e92ddf7a996a75e0ee (patch) | |
| tree | 33c5f876f3dec382959245eb5266843c7823f071 | |
| parent | 86d90299aeac74da489ea3a08a0f66c311efae3a (diff) | |
| download | man-pages-77de385db6d215a3a61a94e92ddf7a996a75e0ee.tar.gz | |
eventfd.2: Use 'PRIxN' macros when printing C99 fixed-width integer types
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man2/eventfd.2 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/man2/eventfd.2 b/man2/eventfd.2 index 929234ab79..71e9d85b4c 100644 --- a/man2/eventfd.2 +++ b/man2/eventfd.2 @@ -386,6 +386,7 @@ Parent read 28 (0x1c) from efd .EX #include <sys/eventfd.h> #include <unistd.h> +#include <inttypes.h> /* Definition of PRIu64 & PRIx64 */ #include <stdlib.h> #include <stdio.h> #include <stdint.h> /* Definition of uint64_t */ @@ -430,8 +431,7 @@ main(int argc, char *argv[]) s = read(efd, &u, sizeof(uint64_t)); if (s != sizeof(uint64_t)) handle_error("read"); - printf("Parent read %llu (0x%llx) from efd\en", - (unsigned long long) u, (unsigned long long) u); + printf("Parent read %"PRIu64" (0x%"PRIx64") from efd\en", u, u); exit(EXIT_SUCCESS); case \-1: |
