From 9f6184b21b4d768b43d94927b94ffc02e7a2bb34 Mon Sep 17 00:00:00 2001 From: wlemkows Date: Mon, 27 Mar 2017 12:06:42 +0200 Subject: [PATCH] jemalloc: fix setting errno on Windows Ref: pmem/issues#505 --- src/jemalloc/include/jemalloc/internal/util.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/jemalloc/include/jemalloc/internal/util.h b/src/jemalloc/include/jemalloc/internal/util.h index 799f861396b..095775b0091 100644 --- a/src/jemalloc/include/jemalloc/internal/util.h +++ b/src/jemalloc/include/jemalloc/internal/util.h @@ -237,6 +237,8 @@ set_errno(int errnum) { #ifdef _WIN32 + int err = errnum; + errno = err; SetLastError(errnum); #else errno = errnum;