This patch makes the xattr functions skip devices and special files, because OS X returns the wrong errno when getting/setting xattrs on them (it returns EPERM instead of ENOTSUP). To use this patch, run these commands for a successful build: patch -p1