X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=clients%2Fmemcp.c;h=5b0518e7caa63b4c94d0efb4a79794391f2519db;hb=c79b88bc75d37c933e9d05c83113ccb26ded3683;hp=df3ca77e315e46fa205955fcd880c11eee697af3;hpb=49a02c953ab03f71b819e7a5f68ef7a0e5857544;p=m6w6%2Flibmemcached diff --git a/clients/memcp.c b/clients/memcp.c index df3ca77e..5b0518e7 100644 --- a/clients/memcp.c +++ b/clients/memcp.c @@ -23,6 +23,10 @@ #include #include #include +#include +#include +#include + #include @@ -55,7 +59,7 @@ static long strtol_wrapper(const char *nptr, int base, bool *error) /* Check for various possible errors */ - if ((errno == ERANGE && (val == INTMAX_MAX || val == INTMAX_MIN)) + if ((errno == ERANGE && (val == LONG_MAX || val == LONG_MIN)) || (errno != 0 && val == 0)) { *error= true; @@ -81,6 +85,7 @@ int main(int argc, char *argv[]) int return_code= 0; options_parse(argc, argv); + initialize_sockets(); memc= memcached_create(NULL); process_hash_option(memc, opt_hash);