diff options
-rw-r--r-- | src/libmdsserver/macros.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libmdsserver/macros.h b/src/libmdsserver/macros.h index 10ae2af..7921fb5 100644 --- a/src/libmdsserver/macros.h +++ b/src/libmdsserver/macros.h @@ -387,8 +387,10 @@ do \ if (__VA_ARGS__) \ { \ + int _fail_if_saved_errno = errno; \ if ((errno != EMSGSIZE) && (errno != ECONNRESET) && (errno != EINTR)) \ fprintf(stderr, "failure at %s:%i\n", __FILE__, __LINE__); \ + errno = _fail_if_saved_errno; \ goto fail; \ } \ while (0) |