[Lldb-commits] [PATCH] D10887: Use accept instead of accept4 for Android.

Oleksiy Vyalov ovyalov at google.com
Wed Jul 15 10:45:39 PDT 2015


ovyalov added inline comments.

================
Comment at: source/Host/common/Socket.cpp:77
@@ -72,2 +76,3 @@
 {
-#ifdef SOCK_CLOEXEC
+#if defined(__ANDROID_NDK__) && defined(__arm__)
+	// Temporary workaround for statically linking Android lldb-server with the
----------------
Is there any define that indicates that we're building statically?

================
Comment at: source/Host/common/Socket.cpp:82
@@ +81,3 @@
+	if (fd >= 0 && !child_processes_inherit)
+		fcntl(fd, F_SETFD, FD_CLOEXEC);
+	return fd;
----------------
Could you use such pattern for updating flags?
```
int flags = ::fcntl(fd, F_GETFD);
    if (flags == -1)
        return false;
    return (::fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == 0);
``` 


http://reviews.llvm.org/D10887







More information about the lldb-commits mailing list