diff --git a/files/profile.c b/files/profile.c
index a09ed9517f35be39ffea6a48b7ca446bd9b7ce96..712b4f3185d22fa4719263a83850ae9115586a7e 100644
--- a/files/profile.c
+++ b/files/profile.c
@@ -12,6 +12,7 @@
 #include <sys/stat.h>
 
 #include "winbase.h"
+#include "winerror.h"
 #include "wine/winbase16.h"
 #include "winuser.h"
 #include "winnls.h"
@@ -1555,3 +1556,12 @@ void WINAPI WriteOutProfiles16(void)
     PROFILE_FlushFile();
     LeaveCriticalSection( &PROFILE_CritSect );
 }
+
+/***********************************************************************
+ *           CloseProfileUserMapping   (KERNEL.138)
+ */
+BOOL WINAPI CloseProfileUserMapping(void) {
+    FIXME("(), stub!\n");
+    SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+    return FALSE;
+}
diff --git a/relay32/kernel32.spec b/relay32/kernel32.spec
index 0218608ff64dfea43218736de00294aa529f7e2c..b14fa50f4169ea36c1a9c31f6b18ab19131066c2 100644
--- a/relay32/kernel32.spec
+++ b/relay32/kernel32.spec
@@ -153,7 +153,7 @@ import  ntdll.dll
 135 stdcall ClearCommBreak(long) ClearCommBreak
 136 stdcall ClearCommError(long ptr ptr) ClearCommError
 137 stdcall CloseHandle(long) CloseHandle
-138 stub CloseProfileUserMapping
+138 stdcall CloseProfileUserMapping() CloseProfileUserMapping
 139 stub CloseSystemHandle
 140 stub CommConfigDialogA
 141 stub CommConfigDialogW