[dm-devel] [PATCH 3/7] libmpathpersist: Add two missing #include directives

Bart Van Assche bart.vanassche at sandisk.com
Wed May 17 15:43:05 UTC 2017


Make sure that including mpathpr.h as the first header file does not
fail. Since mpath_updatepr.c defines functions declared in mpathpr.h,
include that header file in that .c file such that the compiler can
check consistency of the .h and the .c file.

Signed-off-by: Bart Van Assche <bart.vanassche at sandisk.com>
---
 libmpathpersist/mpath_updatepr.c | 1 +
 libmpathpersist/mpathpr.h        | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/libmpathpersist/mpath_updatepr.c b/libmpathpersist/mpath_updatepr.c
index 5af2e032..b3701b28 100644
--- a/libmpathpersist/mpath_updatepr.c
+++ b/libmpathpersist/mpath_updatepr.c
@@ -15,6 +15,7 @@
 #include "mpath_cmd.h"
 #include "uxsock.h"
 #include "memory.h"
+#include "mpathpr.h"
 
 
 int update_prflag(char * arg1, char * arg2, int noisy)
diff --git a/libmpathpersist/mpathpr.h b/libmpathpersist/mpathpr.h
index e6c2dedf..99e641b7 100644
--- a/libmpathpersist/mpathpr.h
+++ b/libmpathpersist/mpathpr.h
@@ -1,6 +1,8 @@
 #ifndef MPATHPR_H
 #define MPATHPR_H
 
+#include "structs.h" /* FILE_NAME_SIZE */
+
 struct prin_param {
 	char dev[FILE_NAME_SIZE];
 	int rq_servact;
-- 
2.12.2




More information about the dm-devel mailing list