From 9d9d0ea60cc27a7f1cabe4f318c65aca089e69dd Mon Sep 17 00:00:00 2001 From: Yossi Itigin Date: Tue, 17 Aug 2021 00:27:04 +0300 Subject: [PATCH] EXAMPLES/HELLO: Compilation fix --- examples/hello_world_util.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/hello_world_util.h b/examples/hello_world_util.h index 30d0e2d88c75..6f3a3c166366 100644 --- a/examples/hello_world_util.h +++ b/examples/hello_world_util.h @@ -269,7 +269,7 @@ int client_connect(const char *server, uint16_t server_port) static inline int barrier(int oob_sock, void (*progress_cb)(void *arg), void *arg) { - struct pollfd pfd = { .fd = oob_sock, .events = POLLIN }; + struct pollfd pfd; int dummy = 0; ssize_t res; @@ -278,6 +278,9 @@ barrier(int oob_sock, void (*progress_cb)(void *arg), void *arg) return res; } + pfd.fd = oob_sock; + pfd.events = POLLIN; + pfd.revents = 0; do { res = poll(&pfd, 1, 1); progress_cb(arg);