main/multipath-tools: fix build failure on ppc64le

This commit is contained in:
Jakub Jirutka 2018-05-21 01:08:54 +02:00
parent 2ac3a77dac
commit 8e98986689
2 changed files with 25 additions and 1 deletions

View File

@ -16,6 +16,7 @@ source="$pkgname-$pkgver.tar.gz::https://git.opensvc.com/gitweb.cgi?p=$pkgname/.
multipath-tools.initd
0001-disable-rados.patch
fix-unknown-mode_t.patch
fix-undeclared-PATH_MAX.patch
"
options="!check"
builddir="$srcdir/multipath-tools"
@ -51,4 +52,5 @@ e81462b22c0cbc92ea935d7544b9f9a0c4ccbcf13f3bc03dadf6de96407c9cf49964c9bbf02f12a1
303c62b7506b207ba2266310e7a701d76151e6f1544b44faf666dfabdc59c5aeb98544d380988e18b4a7b8235e4000380f025c4dd6c95d45a7b8b51bbf39dce5 multipath-tools.confd
1ca0a8be7ddd0d57b810ab4905bc35d6b89b924ef528a7ee77dad162b86b990e0b86ef714f63857def4a61e30bfabe7a3980f624d63b80108408dd876a7c468c multipath-tools.initd
2cdf669823d24fea230784fc911bf01942980ea04c611e973996ba6baa051c64ef5defc00161deccdf6ede45e3b38c526c6f6aaaf4ba9137c010ebbc1f97038f 0001-disable-rados.patch
079943d788d4ecf250a201f38cca4661c29499dd1ba9b74b471c66fe59785215fd096425d51e74664e5e68a21378179b081bc8d9503c7ed99bc3d7f785ecf8cd fix-unknown-mode_t.patch"
079943d788d4ecf250a201f38cca4661c29499dd1ba9b74b471c66fe59785215fd096425d51e74664e5e68a21378179b081bc8d9503c7ed99bc3d7f785ecf8cd fix-unknown-mode_t.patch
21b3bfb0a07749c63f40c5264953ed5e11ff1c35d5f602c658292b5dd9f176baeb49251d15e6f99dd4fd0470a56d278a17e9a999a232a3d96fbe17a8a9e4d277 fix-undeclared-PATH_MAX.patch"

View File

@ -0,0 +1,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"