X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fbin%2Fmemcp.cc;h=7ad8678717b315a52437dba9e9e7ae91685c0c33;hb=aeac01630eed825d8a624e7fd7c107d47bb2e40c;hp=eb7151e65a8680155b565cd1a8870cae48e84792;hpb=dfdcce95b625e98144c1681f05b337648b92f20f;p=awesomized%2Flibmemcached diff --git a/src/bin/memcp.cc b/src/bin/memcp.cc index eb7151e6..7ad86787 100644 --- a/src/bin/memcp.cc +++ b/src/bin/memcp.cc @@ -25,10 +25,20 @@ #include #include #include -#include +#if HAVE_LIBGEN_H +# include +#endif #include #include +#ifndef PATH_MAX +# ifdef MAX_PATH +# define PATH_MAX MAX_PATH +# else +# define PATH_MAX 256 +# endif +#endif + struct memcp_file { enum class type { basename, @@ -130,7 +140,7 @@ static bool path2key(const client_options &opt, memcp_file &file, char **path) { } else if (file.key == memcp_file::type::relative) { *path = file.path; } else { - *path = basename((file.path)); + *path = basename(file.path); } return true; }