Commit 0932ce12 authored by Dominik Charousset's avatar Dominik Charousset

Fix missing-field-initializers warning

parent b46d7aad
...@@ -35,23 +35,23 @@ CAF_POP_WARNINGS ...@@ -35,23 +35,23 @@ CAF_POP_WARNINGS
#include "caf/detail/scope_guard.hpp" #include "caf/detail/scope_guard.hpp"
#include <signal.h> #include <signal.h>
#define CAF_BLOCK_SIGPIPE() \ # define CAF_BLOCK_SIGPIPE() \
sigset_t sigpipe_mask; \ sigset_t sigpipe_mask; \
sigemptyset(&sigpipe_mask); \ sigemptyset(&sigpipe_mask); \
sigaddset(&sigpipe_mask, SIGPIPE); \ sigaddset(&sigpipe_mask, SIGPIPE); \
sigset_t saved_mask; \ sigset_t saved_mask; \
if (pthread_sigmask(SIG_BLOCK, &sigpipe_mask, &saved_mask) == -1) { \ if (pthread_sigmask(SIG_BLOCK, &sigpipe_mask, &saved_mask) == -1) { \
perror("pthread_sigmask"); \ perror("pthread_sigmask"); \
exit(1); \ exit(1); \
} \ } \
auto sigpipe_restore_guard = ::caf::detail::make_scope_guard([&] { \ auto sigpipe_restore_guard = ::caf::detail::make_scope_guard([&] { \
struct timespec zerotime = {0}; \ struct timespec zerotime = {}; \
sigtimedwait(&sigpipe_mask, 0, &zerotime); \ sigtimedwait(&sigpipe_mask, 0, &zerotime); \
if (pthread_sigmask(SIG_SETMASK, &saved_mask, 0) == -1) { \ if (pthread_sigmask(SIG_SETMASK, &saved_mask, 0) == -1) { \
perror("pthread_sigmask"); \ perror("pthread_sigmask"); \
exit(1); \ exit(1); \
} \ } \
}) })
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment