mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-08-02 23:18:16 +00:00
Add patch
This commit is contained in:
parent
e956e97150
commit
b3a8f0b1b7
41
debian/patches/kfreebsd-build-fix.patch
vendored
Normal file
41
debian/patches/kfreebsd-build-fix.patch
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
## Description: add some description
|
||||
## Origin/Author: add some origin or author
|
||||
## Bug: bug URL
|
||||
Description: Avoid usage of F_DUPFD_CLOEXEC where not available (e.g. kfreebsd*)
|
||||
The patch is mostly taken from 10_kfreebsd-f_dupfd_cloexec.patch (gnome-terminal)
|
||||
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711529
|
||||
Description: Fix build on kfreebsd
|
||||
|
||||
kfreebsd doesn't have F_DUPFD_CLOEXEC, so use it conditionally.
|
||||
As mentioned in the bug report, it will have support for it in
|
||||
jessie, so we can drop it in jessie+1
|
||||
Author: Emilio Pozuelo Monfort <pochu@debian.org>
|
||||
Author: Petr Salinger <Petr.Salinger@seznam.cz>
|
||||
|
||||
Author: Gianfranco Costamagna <locutusofborg@debian.org>
|
||||
--- llvm-toolchain-3.7-3.7~+rc3.orig/lldb/source/Plugins/Process/FreeBSD/ProcessPOSIX.cpp
|
||||
+++ llvm-toolchain-3.7-3.7~+rc3/lldb/source/Plugins/Process/FreeBSD/ProcessPOSIX.cpp
|
||||
@@ -214,11 +214,24 @@ ProcessPOSIX::DoLaunch (Module *module,
|
||||
int terminal = m_monitor->GetTerminalFD();
|
||||
if (terminal >= 0) {
|
||||
// The reader thread will close the file descriptor when done, so we pass it a copy.
|
||||
+#ifdef F_DUPFD_CLOEXEC
|
||||
int stdio = fcntl(terminal, F_DUPFD_CLOEXEC, 0);
|
||||
if (stdio == -1) {
|
||||
error.SetErrorToErrno();
|
||||
return error;
|
||||
}
|
||||
+#else
|
||||
+ int stdio = fcntl(terminal, F_DUPFD, 0);
|
||||
+ if (stdio == -1) {
|
||||
+ error.SetErrorToErrno();
|
||||
+ return error;
|
||||
+ }
|
||||
+ stdio = fcntl(terminal, F_SETFD, FD_CLOEXEC);
|
||||
+ if (stdio == -1) {
|
||||
+ error.SetErrorToErrno();
|
||||
+ return error;
|
||||
+ }
|
||||
+#endif
|
||||
SetSTDIOFileDescriptor(stdio);
|
||||
}
|
Loading…
Reference in New Issue
Block a user