MaxWit linux 在ubuntu9.10上sbox2 编译出错!add sbox2-2.0.patch
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
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
在debian上不需要此patch