diff --git a/include/msvc_compat/windows_extra.h b/include/msvc_compat/windows_extra.h index 0c5e323f..114f43b1 100644 --- a/include/msvc_compat/windows_extra.h +++ b/include/msvc_compat/windows_extra.h @@ -23,4 +23,6 @@ # define ERANGE ERROR_INVALID_DATA #endif +#define getpid() GetCurrentProcessId() + #endif /* MSVC_COMPAT_WINDOWS_EXTRA_H */ diff --git a/src/prof.c b/src/prof.c index 31f5e601..3abb38e2 100644 --- a/src/prof.c +++ b/src/prof.c @@ -1384,6 +1384,8 @@ prof_dump_maps(bool propagate_err) cassert(config_prof); #ifdef __FreeBSD__ mfd = prof_open_maps("/proc/curproc/map"); +#elif defined(_WIN32) + mfd = -1; // Not implemented #else { int pid = getpid();