Add gethostname to nativesockets (#5443)

This commit is contained in:
Federico Ceratto 2017-03-01 08:44:24 +00:00 • committed by Andreas Rumpf
commit dd4d47c671
3 changed files with 27 additions and 0 deletions

View file

@ -542,6 +542,9 @@ proc gethostbyaddr*(ip: ptr InAddr, len: cuint, theType: cint): ptr Hostent {.
proc gethostbyname*(name: cstring): ptr Hostent {.
stdcall, importc: "gethostbyname", dynlib: ws2dll.}
proc gethostname*(hostname: cstring, len: cint): cint {.
stdcall, importc: "gethostname", dynlib: ws2dll.}
proc socket*(af, typ, protocol: cint): SocketHandle {.
stdcall, importc: "socket", dynlib: ws2dll.}