Skip to content

Commit

Permalink
Fix a compilation error:
Browse files Browse the repository at this point in the history
```
rFaaS/rdmalib/lib/rdmalib.cpp:37:48: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
```

- Compiler: GNU g++ 12.2.0
- Linux Distribution: Ubuntu 20.04.3 LTS

Signed-off-by: William-Mou <[email protected]>
  • Loading branch information
William-Mou authored and William-Mou committed Mar 23, 2023
1 parent bd27b57 commit dec6fc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rdmalib/lib/rdmalib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace rdmalib {
if(passive)
hints.ai_flags = RAI_PASSIVE;

impl::expect_zero(rdma_getaddrinfo(ip.c_str(), std::to_string(port).c_str(), &hints, &addrinfo));
impl::expect_zero(rdma_getaddrinfo(const_cast<char *>(ip.c_str()), const_cast<char *>(std::to_string(port).c_str()), &hints, &addrinfo));
this->_port = port;
}

Expand Down

0 comments on commit dec6fc0

Please sign in to comment.