From 20aae1caa3c4301d0055f8e40729e57384ae2cea Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 18 Aug 2016 15:26:24 +0200 Subject: [PATCH] map ell the err code --- TSRM/tsrm_win32.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index c080f17a7ce..fc5e58f2f4a 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -729,10 +729,7 @@ TSRM_API void *shmat(int key, const void *shmaddr, int flags) err = GetLastError(); if (err) { - /* Catch more errors */ - if (ERROR_NOT_ENOUGH_MEMORY == err) { - _set_errno(ENOMEM); - } + SET_ERRNO_FROM_WIN32_CODE(err); return (void*)-1; }