[Lldb-commits] [PATCH] D14182: Centos 5 compile fixes for lldb

Mark Chandler via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 30 10:30:05 PDT 2015


mchandler-blizzard added inline comments.

================
Comment at: tools/lldb/source/Host/common/File.cpp:301
@@ -299,1 +300,3 @@
+    
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
     if (options & eOpenOptionCloseOnExec)
----------------
krytarowski wrote:
> labath wrote:
> > This needs to evaluate to true on non-linux systems.
> > Would `#ifdef O_CLOEXEC` work for you ?
> NetBSD:
> 
> ```
> /usr/include/fcntl.h:#define	O_CLOEXEC	0x00400000	/* set close on exec */
> ```
If that is ok by the coding standards im happy to change it to that

================
Comment at: tools/lldb/source/Host/linux/HostThreadLinux.cpp:33
@@ -32,3 +32,3 @@
 {
-#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || defined(__ANDROID__)
+#if (defined(__GLIBC__) && defined(_GNU_SOURCE) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 12) || defined(__ANDROID__)
     ::pthread_setname_np(thread, name.data());
----------------
brucem wrote:
> This is probably better done with weak symbols or a check in configure and cmake rather than hard-coding this stuff in the C pre-processor.
> 
If you want to provide code that does that, im happy to change it. 

================
Comment at: tools/lldb/source/Host/posix/PipePosix.cpp:32
@@ -31,1 +31,3 @@
 
+#include <linux/version.h>
+
----------------
brucem wrote:
> krytarowski wrote:
> > Is this file just for Linux?
> This file isn't Linux only, so the concerns expressed by Labath are valid here as well.  (The same thing is true of other inclusions of `<linux/version.h>`.)
I dont have other OS's to build on so not sure. Think @krytarowski comment below is the way to go.

================
Comment at: tools/lldb/source/Host/posix/PipePosix.cpp:254
@@ -251,1 +253,3 @@
+    
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
     if (!child_process_inherit)
----------------
krytarowski wrote:
> Stop breaking NetBSD.
:(


Repository:
  rL LLVM

http://reviews.llvm.org/D14182





More information about the lldb-commits mailing list