================ @@ -25,13 +25,10 @@ #include <sstream> #ifdef __ANDROID__ ---------------- enh-google wrote:
looking around, i see a few others that aren't true either: ``` #ifdef __ANDROID__ // Android does not have SUN_LEN #ifndef SUN_LEN #define SUN_LEN(ptr) \ (offsetof(struct sockaddr_un, sun_path) + strlen((ptr)->sun_path)) #endif #endif // #ifdef __ANDROID__ ``` or ``` #if defined(_WIN32) || defined(__ANDROID__) || defined(_AIX) // Defines from ar, missing on Windows ``` for example. please let us know any time you find yourself needing to add a workaround like this, so we can try to make it "just work". anything like ``` #ifdef __ANDROID__ #include <arpa/inet.h> #include <asm-generic/errno-base.h> #include <cerrno> #include <fcntl.h> #include <linux/tcp.h> #include <sys/syscall.h> #include <unistd.h> #endif // __ANDROID__ ``` is exceptionally weird. any time you're having to include stuff from `<asm` (and to a lesser extent `<linux/`) is probably a bug on our side. i don't suppose anyone knows the history of this? ``` static Environment::Envp FixupEnvironment(Environment env) { #ifdef __ANDROID__ // If there is no PATH variable specified inside the environment then set the // path to /system/bin. It is required because the default path used by // execve() is wrong on android. env.try_emplace("PATH", "/system/bin"); #endif return env.getEnvp(); } ``` that's especially weird because execve() doesn't _use_ $PATH ... it's the members of the exec family that have a 'p' in the name that do. https://github.com/llvm/llvm-project/pull/124047 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits