[libvirt] [PATCH] util: Change usage of ent->d_type != DT_DIR

John Ferlan jferlan at redhat.com
Wed Nov 14 18:59:00 UTC 2018


Fix a broken non-Linux build to use the !virFileIsDir instead

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 Pushed as build breaker fix for 

   https://travis-ci.org/libvirt/libvirt/builds/455121079

 All I can say is, well that wasn't obvious... Who knew!

 src/util/virresctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
index f7481a1036..ef5c668921 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -2693,7 +2693,7 @@ virResctrlMonitorGetStats(virResctrlMonitorPtr monitor,
          * "mon_L3_01" are two target directories for a two nodes system
          * with resource utilization data file for each node respectively.
          */
-        if (ent->d_type != DT_DIR)
+        if (!virFileIsDir(ent->d_name))
             continue;
 
         /* Looking for directory has a prefix 'mon_L' */
-- 
2.17.2




More information about the libvir-list mailing list