Skip to contentSkip to conversation

multipath-tools: fix compilation with musl libc

PATCH New Xose Vazquez Perez 1 participant 1 message May 11, 2018 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 multipath-tools: fix compilation with musl libc

In file included from alias.c:15:
file.h:9:47: error: unknown type name ‘mode_t’; did you mean ‘time_t’?

 int ensure_directories_exist(const char *str, mode_t dir_mode);
                                               ^~~~~~
                                               time_t

sysfs.c: In function ‘sysfs_is_multipathed’:
sysfs.c:304:15: error: ‘PATH_MAX’ undeclared (first use in this function); did you mean ‘PATH_UP’?

  char pathbuf[PATH_MAX];
               ^~~~~~~~
               PATH_UP
Cc Martin Wilck <[email protected]>
Cc Christophe Varoqui <[email protected]>
---
 libmultipath/file.h  | 2 ++
 libmultipath/sysfs.c | 1 +
 2 files changed, 3 insertions(+)
libmultipath/file.h +2 -0
index 29520c7..3c75c90 100644
@@ -5,6 +5,8 @@
 #ifndef _FILE_H
 #define _FILE_H
 
+#include <sys/stat.h>
+
 #define FILE_TIMEOUT 30
 int ensure_directories_exist(const char *str, mode_t dir_mode);
 int open_file(const char *file, int *can_write, const char *header);
libmultipath/sysfs.c +1 -0
index ee72e6a..16e0a73 100644
@@ -28,6 +28,7 @@
 #include <dirent.h>
 #include <libudev.h>
 #include <fnmatch.h>
+#include <limits.h>
 
 #include "checkers.h"
 #include "vector.h"
Signature · 6 lines
2.17.0

--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel