[libvirt] [PATCH 1/3] nodedev: add macro guard to node_device_udev header file

Wu Zongyong cordius.wu at huawei.com
Wed Jan 10 12:14:49 UTC 2018


Signed-off-by: Wu Zongyong <cordius.wu at huawei.com>
---
 src/node_device/node_device_udev.h | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/node_device/node_device_udev.h b/src/node_device/node_device_udev.h
index f15e520..300f57e 100644
--- a/src/node_device/node_device_udev.h
+++ b/src/node_device/node_device_udev.h
@@ -19,10 +19,15 @@
  *
  * Author: Dave Allan <dallan at redhat.com>
  */
+#ifndef __VIR_NODE_DEVICE_UDEV_H__
+# define __VIR_NODE_DEVICE_UDEV_H__
 
-#include <libudev.h>
-#include <stdint.h>
+# include <libudev.h>
+# include <stdint.h>
 
-#define SYSFS_DATA_SIZE 4096
-#define DMI_DEVPATH "/sys/devices/virtual/dmi/id"
-#define DMI_DEVPATH_FALLBACK "/sys/class/dmi/id"
+# define SYSFS_DATA_SIZE 4096
+# define DMI_DEVPATH "/sys/devices/virtual/dmi/id"
+# define DMI_DEVPATH_FALLBACK "/sys/class/dmi/id"
+
+
+#endif /* __VIR_NODE_DEVICE_UDEV_H__ */
-- 
1.9.1




More information about the libvir-list mailing list