]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
securityselinuxhelper.c: Don't try to include xattr.h if not available
authorJohn Ferlan <jferlan@redhat.com>
Mon, 14 Jan 2013 18:45:55 +0000 (13:45 -0500)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 14 Jan 2013 20:00:51 +0000 (21:00 +0100)
Commit 907a39e7 missed adding the WITH_ATTR around #include <attr/xattr.h>
resulting in a build failure:

  CC     libsecurityselinuxhelper_la-securityselinuxhelper.lo
  securityselinuxhelper.c:27:24: fatal error: attr/xattr.h: No such file or directory
  compilation terminated.
  make[2]: *** [libsecurityselinuxhelper_la-securityselinuxhelper.lo] Error 1
  make[2]: Leaving directory `/home/jferlan/libvirt.work/tests'
  make[1]: *** [all-recursive] Error 1
  make[1]: Leaving directory `/home/jferlan/libvirt.work'
  make: *** [all] Error 2

tests/securityselinuxhelper.c

index abe4d7cc49660037fd4bee3720e06d08d3229f79..647b84156c11a7fbe3e0e8bb311a3142d2c791bc 100644 (file)
@@ -24,7 +24,9 @@
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
-#include <attr/xattr.h>
+#if WITH_ATTR
+# include <attr/xattr.h>
+#endif
 
 
 /*