Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | From: Xose Vazquez Perez <xose.vazquez@gmail.com> |
| 3 | Date: Fri, 11 May 2018 18:39:44 +0200 |
| 4 | Subject: [PATCH] multipath-tools: fix compilation with musl libc |
| 5 | MIME-Version: 1.0 |
| 6 | Content-Type: text/plain; charset=UTF-8 |
| 7 | Content-Transfer-Encoding: 8bit |
| 8 | |
| 9 | In file included from alias.c:15: |
| 10 | file.h:9:47: error: unknown type name ‘mode_t’; did you mean ‘time_t’? |
| 11 | int ensure_directories_exist(const char *str, mode_t dir_mode); |
| 12 | ^~~~~~ |
| 13 | time_t |
| 14 | |
| 15 | sysfs.c: In function ‘sysfs_is_multipathed’: |
| 16 | sysfs.c:304:15: error: ‘PATH_MAX’ undeclared (first use in this function); did you mean ‘PATH_UP’? |
| 17 | char pathbuf[PATH_MAX]; |
| 18 | ^~~~~~~~ |
| 19 | PATH_UP |
| 20 | |
| 21 | Cc: Martin Wilck <mwilck@suse.com> |
| 22 | Cc: Christophe Varoqui <christophe.varoqui@opensvc.com> |
| 23 | Cc: DM ML <dm-devel@redhat.com> |
| 24 | Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> |
| 25 | Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> |
| 26 | --- |
| 27 | libmultipath/file.h | 2 ++ |
| 28 | libmultipath/sysfs.c | 1 + |
| 29 | 2 files changed, 3 insertions(+) |
| 30 | |
| 31 | diff --git a/libmultipath/file.h b/libmultipath/file.h |
| 32 | index 29520c7..3c75c90 100644 |
| 33 | --- a/libmultipath/file.h |
| 34 | +++ b/libmultipath/file.h |
| 35 | @@ -5,6 +5,8 @@ |
| 36 | #ifndef _FILE_H |
| 37 | #define _FILE_H |
| 38 | |
| 39 | +#include <sys/stat.h> |
| 40 | + |
| 41 | #define FILE_TIMEOUT 30 |
| 42 | int ensure_directories_exist(const char *str, mode_t dir_mode); |
| 43 | int open_file(const char *file, int *can_write, const char *header); |
| 44 | diff --git a/libmultipath/sysfs.c b/libmultipath/sysfs.c |
| 45 | index ee72e6a..16e0a73 100644 |
| 46 | --- a/libmultipath/sysfs.c |
| 47 | +++ b/libmultipath/sysfs.c |
| 48 | @@ -28,6 +28,7 @@ |
| 49 | #include <dirent.h> |
| 50 | #include <libudev.h> |
| 51 | #include <fnmatch.h> |
| 52 | +#include <limits.h> |
| 53 | |
| 54 | #include "checkers.h" |
| 55 | #include "vector.h" |
| 56 | -- |
| 57 | 2.7.4 |
| 58 | |