blob: 05667175c3429bfbab3bb3fb231a72fd03b70f78 (
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
|
--- base/files/scoped_file_linux.cc.orig 2021-07-28 11:34:50 UTC
+++ base/files/scoped_file_linux.cc
@@ -80,12 +80,20 @@ bool IsFDOwned(int fd) {
extern "C" {
+#if defined(OS_FREEBSD)
+int __sys_close(int);
+#else
int __close(int);
+#endif
__attribute__((visibility("default"), noinline)) int close(int fd) {
if (base::IsFDOwned(fd) && g_is_ownership_enforced)
CrashOnFdOwnershipViolation();
+#if defined(OS_FREEBSD)
+ return __sys_close(fd);
+#else
return __close(fd);
+#endif
}
} // extern "C"
|