MaxWit linux 在ubuntu9.10上sbox2 编译出错!add sbox2-2.0.patch

发布于 2022-09-18 04:57:34 字数 727 浏览 23 评论 0

In file included from luaif/sb_log.c:49:
/root/maxwit/build/host/sbox2-2.0/preload/exported.h:505: error: conflicting types for ‘scandir’
/usr/include/dirent.h:252: note: previous declaration of ‘scandir’ was here
/root/maxwit/build/host/sbox2-2.0/preload/exported.h:521: error: conflicting types for ‘scandir64’
/usr/include/dirent.h:275: note: previous declaration of ‘scandir64’ was here
luaif/sb_log.c: In function ‘write_to_logfile’:
luaif/sb_log.c:116: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result
make[1]: *** [luaif/sb_log.o] Error 1
make[1]: Leaving directory `/root/maxwit/build/host/sbox2-2.0'
make: *** [regular] Error 2

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眉目亦如画i 2022-09-25 04:57:34

diff --git a/preload/generate.py b/preload/generate.py
old mode 100644
new mode 100755
diff --git a/preload/interface.master b/preload/interface.master
index a8c145a..04d80d7 100644
--- a/preload/interface.master
+++ b/preload/interface.master
@@ -411,17 +411,17 @@ WRAP: int rmdir(const char *pathname) : \
#ifdef HAVE_SCANDIR
#ifdef HAVE_LINUX_SCANDIR
WRAP: int scandir(const char *dir, struct dirent ***namelist, \
-        SCANDIR_TYPE_ARG3, int(*compar)(const void *, const void *)) : \
+        SCANDIR_TYPE_ARG3, int(*compar)(const struct dirent **, const struct dirent **)) : \
        map(dir) hardcode_param(3,filter)
#endif
#ifdef HAVE_OSX_SCANDIR
-WRAP: int scandir(const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*compar)(const void *, const void *)): map(dirname)
+WRAP: int scandir(const char *dirname, struct dirent ***namelist, int (*select)(struct dirent *), int (*compar)(const struct dirent **, const struct dirent **)): map(dirname)
#endif
#endif
#ifdef HAVE_SCANDIR64
WRAP: int scandir64(const char *dir, struct dirent64 ***namelist, \
        int(*filter)(const struct dirent64 *), \
-        int(*compar)(const void *, const void *)) : \
+        int(*compar)(const struct dirent64 **, const struct dirent64 **)) : \
        map(dir)
#endif
#ifdef HAVE_SETXATTR

花想c 2022-09-25 04:57:34

在debian上不需要此patch

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文