summaryrefslogtreecommitdiff
path: root/lib/udf/udf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/udf/udf.c')
-rw-r--r--lib/udf/udf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/udf/udf.c b/lib/udf/udf.c
index e612b7c2..bd8cb868 100644
--- a/lib/udf/udf.c
+++ b/lib/udf/udf.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2005, 2008, 2010 Rocky Bernstein <rocky@gnu.org>
+ Copyright (C) 2005, 2008, 2010, 2012 Rocky Bernstein <rocky@gnu.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
say opensolaris. */
#include "udf_private.h"
#include <cdio/bytesex.h>
+#include "filemode.h"
#ifdef HAVE_STRING_H
# include <string.h>
@@ -53,11 +54,13 @@ udf_get_posix_filemode(const udf_dirent_t *p_udf_dirent)
mode_t mode = 0;
if (udf_get_file_entry(p_udf_dirent, &udf_fe)) {
- uint16_t i_flags;
uint32_t i_perms;
+#ifdef S_ISUID
+ uint16_t i_flags;
- i_perms = uint32_from_le(udf_fe.permissions);
i_flags = uint16_from_le(udf_fe.icb_tag.flags);
+#endif
+ i_perms = uint32_from_le(udf_fe.permissions);
if (i_perms & FE_PERM_U_READ) mode |= S_IRUSR;
if (i_perms & FE_PERM_U_WRITE) mode |= S_IWUSR;