diff --git a/srcpkgs/qemu/template b/srcpkgs/qemu/template
index 0db53425982..abe9af2f8f8 100644
--- a/srcpkgs/qemu/template
+++ b/srcpkgs/qemu/template
@@ -31,6 +31,9 @@ do_configure() {
 
 	sed -e 's,-rpath /usr/local/lib,,g' -i configure
 
+	# XXX remove this when kernel headers are updated to 3.16.
+	export CFLAGS+=" -D_LINUX_XATTR_H"
+
 	if [ "$CROSS_BUILD" ]; then
 		args+=" --cross-prefix=${XBPS_CROSS_TRIPLET}-"
 		export PKG_CONFIG=pkg-config