Am 09.11.2011 11:33, schrieb Avi Kivity:
Modern distributions place xattr.h in /usr/include/sys, and fold
libattr.so into libc. They also don't have an ENOATTR.
Make configure detect this, and add a qemu-xattr.h file that
directs the #include to the right place.
Signed-off-by: Avi Kivity<a...@redhat.com>
---
v2: try for libc first, libattr second
[...]
+
+/*
+ * Modern distributions (e.g. Fedora 15, have no libattr.so, place attr.h
+ * in /usr/include/sys, and don't have ENOATTR.
There is a ')' missing, so I add it here: :-)
Whoever commits the patch can add it, too, so no v3 is needed for this
patch.
+ */
+
+#include "config-host.h"
+
+#ifdef CONFIG_LIBATTR
+# include<attr/xattr.h>
+#else
+# define ENOATTR ENODATA
+# include<sys/xattr.h>
+#endif
+
+#endif