aboutsummaryrefslogtreecommitdiffstats
path: root/main/multipath-tools/fix-undeclared-PATH_MAX.patch
blob: 4a85027daba26ffb508127377671f04f4ccb8303 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Fixes the following error (on ppc64le):

    sysfs.c: In function 'sysfs_is_multipathed':
    sysfs.c:304:15: error: 'PATH_MAX' undeclared (first use in this function)
      char pathbuf[PATH_MAX];
                   ^~~~~~~~
    sysfs.c:304:15: note: each undeclared identifier is reported only once for each function it appears in
    sysfs.c:304:7: warning: unused variable 'pathbuf' [-Wunused-variable]
      char pathbuf[PATH_MAX];
           ^~~~~~~
    make[1]: *** [../Makefile.inc:134: sysfs.o] Error 1

--- a/libmultipath/sysfs.c
+++ b/libmultipath/sysfs.c
@@ -28,6 +28,7 @@
 #include <dirent.h>
 #include <libudev.h>
 #include <fnmatch.h>
+#include <limits.h>
 
 #include "checkers.h"
 #include "vector.h"