aboutsummaryrefslogtreecommitdiff
path: root/devel/RStudio/files/patch-src_cpp_shared__core_system_PosixSystem.cpp
blob: 6a304d8a4651872299941ffbec1f8e3f7dcf57af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- src/cpp/shared_core/system/PosixSystem.cpp.orig	2021-06-09 01:52:44 UTC
+++ src/cpp/shared_core/system/PosixSystem.cpp
@@ -29,8 +29,10 @@
 #include <memory.h>
 #include <netdb.h>
 #include <pwd.h>
+#include <netinet/in.h> // for sa_family_t
+#include <sys/socket.h> // for struct sockaddr
 
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
 #include <sys/prctl.h>
 #endif
 
@@ -80,7 +82,7 @@ Error restorePrivilegesImpl(uid_t in_uid)
 
 Error enableCoreDumps()
 {
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
    int res = ::prctl(PR_SET_DUMPABLE, 1);
    if (res == -1)
       return systemError(errno, ERROR_LOCATION);