[转]Build squashfs tools for Mac OS X
来源:互联网 发布:如何登录淘宝账户 编辑:程序博客网 时间:2024/05/18 21:42
转自:Build squashfs tools for Mac OS X
因为尝试自建android-x86-*.iso的原因 碰到了sfs文件系统 而所搜索到的相关解压/压缩源码均来自于Linux系统 github上有相关开源代码squashfs-tools 但无法在mac上编译 最后天不亡我 找到了这个blog 还是vpn好用啊 更改hosts完全无法满足需求了
以下是完美解:
To squash/unsquash a Linux squashfs filesystem on a Mac, you can build the squashfs tools.
A few modifications of the source are required for OS X:
The FNM_EXTMATCH flag doesn’t exist in the fnmatch library on OS X. This just means that you can’t use glob patterns with mksquashfs.
The constants to figure out how many CPUs the machine has are in the sysctl header instead of the sysinfo header.
The C99 compiler has different semantics for the inline keyword, so inline functions should also be static.
Instead of llistxattr(), lgetxattr(), lsetxattr(), Apple uses a XATTR_NOFOLLOW flag on the non-link equivalent functions.
Here’s a complete download-and-build recipe:
curl -OL http://iweb.dl.sourceforge.net/project/squashfs/squashfs/squashfs4.2/squashfs4.2.tar.gztar xzvf squashfs4.2.tar.gzcd squashfs4.2/squashfs-toolssed -i.orig 's/FNM_EXTMATCH/0/; s/sysinfo.h/sysctl.h/; s/^inline/static inline/' mksquashfs.c unsquashfs.ccat <<END >> xattr.h#define llistxattr(path, list, size) \ (listxattr(path, list, size, XATTR_NOFOLLOW))#define lgetxattr(path, name, value, size) \ (getxattr(path, name, value, size, 0, XATTR_NOFOLLOW))#define lsetxattr(path, name, value, size, flags) \ (setxattr(path, name, value, size, 0, flags | XATTR_NOFOLLOW))ENDmakesudo cp mksquashfs unsquashfs /usr/local/bin
- [转]Build squashfs tools for Mac OS X
- Xcode Command Line Tools for Mac OS X 10.9 Mavericks
- Mac OS X Hacking Tools
- VMware Tools for OS X
- Git for mac os x
- UISwitch for Mac OS X
- Build WebKit on Mac OS X 10.9
- Build obs-studio on Mac OS X
- SecureCRT for Mac OS X(破解方法)转
- Hadoop 2.x build native library on Mac os x
- Hadoop 2.x build native library on Mac os x
- [Mac OS] Mac OS X for x86 下载
- Great Web Sites for Mac OS X
- Installing Qt for Mac OS X
- Updating SVN for Mac OS X
- A better ls for Mac OS X
- Env setup for MAC OS X
- Android Studio 快捷键 for Mac OS X
- iOS中使用ZipArchive压缩和解压缩文件
- spring学习笔记(5)——bean的继承与依赖关系
- windows下cmake+vs2012编译qtgstreamer
- linux wc(word count)命令
- 纯easyui简单的后台登录界面
- [转]Build squashfs tools for Mac OS X
- asp.net mvc 网站发布后IIS配置问题小结
- 运行jsp文件出现nomethod异常
- HealthKit开发教程之HealthKit的主要类型数据
- read/write/connect自由函数
- eclipse sequoyah - 本地化字符串编辑插件,可以很方便的检查和编辑字符串翻译情况
- C#学习第十天 文件操作、文件流
- JSP页面Ajax发送请求与乱码解决
- 获取滚动条位置documentElement.scrollTop和body.scrollTo