美文网首页
'system' is unavailable: not ava

'system' is unavailable: not ava

作者: 我亦非凡 | 来源:发表于2017-11-29 17:02 被阅读0次

1.添加了:

#include ftw.h

int unlink_cb(const char *fpath, const struct stat *sb, int typeflag, struct FTW     *ftwbuf)

{

int rv = remove(fpath);

if (rv)

perror(fpath);

return rv;

}

2.替换

lua_pushinteger(L, system(luaL_optstring(L, 1, NULL)));

lua_pushinteger(L, nftw(luaL_optstring(L, 1, NULL), unlink_cb, 64, FTW_DEPTH | FTW_PHYS));

相关文章

网友评论

      本文标题:'system' is unavailable: not ava

      本文链接:https://www.haomeiwen.com/subject/uywubxtx.html