Skip to content

Commit

Permalink
EXAMPLES/HELLO: Compilation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yosefe committed Aug 16, 2021
1 parent 58407ae commit 9d9d0ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/hello_world_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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);
Expand Down

0 comments on commit 9d9d0ea

Please sign in to comment.