[PATCH] D98581: [llvm-jitlink] Add diagnostic output and port executor to getaddrinfo(3) as well

Rafik Zurob via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 21:05:59 PDT 2021


rzurob added inline comments.


================
Comment at: llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp:93
+  outs() << "Listening at " << Host << ":" << PortStr << "\n";
+  return accept(SockFD, AI->ai_addr, &AI->ai_addrlen);
 #endif
----------------
This line fails compilation on AIX in 64-bit mode:

```
llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp:93:10: error: no matching function for call to 'accept'
  return accept(SockFD, AI->ai_addr, &AI->ai_addrlen);
         ^~~~~~
/usr/include/sys/socket.h:635:9: note: candidate function not viable: no known conversion from 'size_t *' (aka 'unsigned long *') to 'socklen_t *' (aka 'unsigned int *') for 3rd argument
int     accept(int, struct sockaddr *__restrict__, socklen_t *__restrict__);
        ^
1 error generated.
Error while processing llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp.
```

The size is always going to fit into an unsigned int.  So perhaps we need to store AI->ai_addrlen into a socklen_t temp first?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98581/new/

https://reviews.llvm.org/D98581



More information about the llvm-commits mailing list