X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=blobdiff_plain;f=usock.h;h=5f2b84b092ce9ac17cde4645517fb1f9b3cc788a;hp=2ead7e5fc4affdac19ccb2471970d300cd125bbc;hb=f714be125c9b85e184a482bc22e958b5cadfad3a;hpb=f8b32f7620efdb73055f7fd6af4c796a770050e2 diff --git a/usock.h b/usock.h index 2ead7e5..5f2b84b 100644 --- a/usock.h +++ b/usock.h @@ -32,7 +32,13 @@ const char *usock_port(int port); int usock(int type, const char *host, const char *service); -int usock_inet(int type, const char *host, const char *service, void *addr); +int usock_inet_timeout(int type, const char *host, const char *service, + void *addr, int timeout); +static inline int +usock_inet(int type, const char *host, const char *service, void *addr) +{ + return usock_inet_timeout(type, host, service, addr, -1); +} /** * Wait for a socket to become ready.