diff options
Diffstat (limited to 'cpio/mkbootfs.c')
-rw-r--r-- | cpio/mkbootfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpio/mkbootfs.c b/cpio/mkbootfs.c index 7d3740c..7175749 100644 --- a/cpio/mkbootfs.c +++ b/cpio/mkbootfs.c @@ -78,8 +78,9 @@ static void fix_stat(const char *path, struct stat *s) s->st_mode = empty_path_config->mode | (s->st_mode & ~07777); } else { // Use the compiled-in fs_config() function. - - fs_config(path, S_ISDIR(s->st_mode), &s->st_uid, &s->st_gid, &s->st_mode, &capabilities); + unsigned st_mode = s->st_mode; + fs_config(path, S_ISDIR(s->st_mode), &s->st_uid, &s->st_gid, &st_mode, &capabilities); + s->st_mode = (typeof(s->st_mode)) st_mode; } } |