diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd24c52183c56c8d603a518bf945fb1234394f3a..287a889ed35be6114e90dcf7ba63724daca5de1d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,6 +71,7 @@ check_symbol_exists(MAP_ANONYMOUS sys/mman.h HAVE_MAP_ANONYMOUS)
 check_include_file(sys/time.h HAVE_SYS_TIME_H)
 check_include_file(unwind.h HAVE_UNWIND_H)
 check_include_file(cpuid.h HAVE_CPUID_H)
+check_include_file(sys/prctl.h HAVE_PRCTL_H)
 
 check_symbol_exists(O_DSYNC fcntl.h HAVE_O_DSYNC)
 check_function_exists(fdatasync HAVE_FDATASYNC)
diff --git a/include/tarantool/config.h.cmake b/include/tarantool/config.h.cmake
index d7d4bec5dadef592ed778e1b7b8f8894814b6fe9..fd180127adc4fc30454f6e66700e6b2006f4e7fa 100644
--- a/include/tarantool/config.h.cmake
+++ b/include/tarantool/config.h.cmake
@@ -97,6 +97,9 @@
 #cmakedefine ENABLE_BUNDLED_LIBEIO 1
 #cmakedefine ENABLE_BUNDLED_LIBCORO 1
 
+
+#cmakedefine HAVE_PRCTL_H 1
+
 /*
  * predefined /etc directory prefix.
  */
diff --git a/src/tarantool.cc b/src/tarantool.cc
index 9c1400a4a2007e42369d939155c41c9eb34a4f11..a418323e7fbf8aff395f37de73698a1c0b639af3 100644
--- a/src/tarantool.cc
+++ b/src/tarantool.cc
@@ -42,7 +42,7 @@
 #include <getopt.h>
 #include <libgen.h>
 #include <sysexits.h>
-#ifdef TARGET_OS_LINUX
+#if defined(TARGET_OS_LINUX) && defined(HAVE_PRCTL_H)
 # include <sys/prctl.h>
 #endif
 #include <admin.h>
@@ -793,7 +793,7 @@ main(int argc, char **argv)
 			say_syserror("setrlimit");
 			exit(EX_OSERR);
 		}
-#ifdef TARGET_OS_LINUX
+#if defined(TARGET_OS_LINUX) && defined(HAVE_PRCTL_H)
 		if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) {
 			say_syserror("prctl");
 			exit(EX_OSERR);
diff --git a/third_party/tarantool_ev.c b/third_party/tarantool_ev.c
index 763de0292e921f6e70db6d3b09ae1dedf25e4642..b004bf19f3adc77a558699caf533905b1bec0b71 100644
--- a/third_party/tarantool_ev.c
+++ b/third_party/tarantool_ev.c
@@ -30,4 +30,12 @@
 #include "tarantool_ev.h"
 #include "third_party/libev/ev.c"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif /* defined(__cplusplus) */
+
 const ev_tstamp TIMEOUT_INFINITY = 365*86400*100.0;
+
+#if defined(__cplusplus)
+} /* extern "C" */
+#endif /* defined(__cplusplus) */
diff --git a/third_party/tarantool_ev.h b/third_party/tarantool_ev.h
index ee9b6a37a26dd77f12dd4a4e238a94482d43b309..e48e0bd1ff98cd41a6638c19bfa9e507744b22c3 100644
--- a/third_party/tarantool_ev.h
+++ b/third_party/tarantool_ev.h
@@ -52,6 +52,15 @@
 #else /* !defined(ENABLE_BUNDLED_LIBEV) */
 #include <ev.h>
 #endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif /* defined(__cplusplus) */
+
 extern const ev_tstamp TIMEOUT_INFINITY;
 
+#if defined(__cplusplus)
+} /* extern "C" */
+#endif /* defined(__cplusplus) */
+
 #endif /* TARANTOOL_EV_H_INCLUDED */