mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Release redbean 2.0.7
This commit is contained in:
parent
4b9ee980a1
commit
a9d77362f9
3 changed files with 41 additions and 28 deletions
|
@ -390,7 +390,7 @@ int LuaResolveIp(lua_State *L) {
|
|||
struct addrinfo hint = {AI_NUMERICSERV, AF_INET, SOCK_STREAM, IPPROTO_TCP};
|
||||
host = luaL_checkstring(L, 1);
|
||||
if ((ip = ParseIp(host, -1)) != -1) {
|
||||
lua_pushinteger(L, ntohl(ai->ai_addr4->sin_addr.s_addr));
|
||||
lua_pushinteger(L, ip);
|
||||
return 1;
|
||||
} else if ((rc = getaddrinfo(host, "0", &hint, &ai)) == EAI_SUCCESS) {
|
||||
lua_pushinteger(L, ntohl(ai->ai_addr4->sin_addr.s_addr));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue