import sys

bind(socket int, port uint16) -> int {
	addr := new(sys.sockaddr_in_bsd)
	addr.sin_family = 2
	addr.sin_port = htons(port)
	err := sys.bind(socket, addr, 16)
	delete(addr)
	return err
}