Skip to content

Commit e2e17c6

Browse files
committed
fix: builds on 32bit android now work.
Thanks to new CI tests, these should keep working as well.
1 parent c8f804c commit e2e17c6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

gix-index/src/fs.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl Metadata {
4444
pub fn is_dir(&self) -> bool {
4545
#[cfg(not(windows))]
4646
{
47-
(self.0.st_mode & libc::S_IFMT) == libc::S_IFDIR
47+
(self.0.st_mode as u32 & libc::S_IFMT as u32) == libc::S_IFDIR as u32
4848
}
4949
#[cfg(windows)]
5050
self.0.is_dir()
@@ -133,7 +133,8 @@ impl Metadata {
133133
pub fn is_executable(&self) -> bool {
134134
#[cfg(not(windows))]
135135
{
136-
(self.0.st_mode & libc::S_IFMT) == libc::S_IFREG && self.0.st_mode & libc::S_IXUSR == libc::S_IXUSR
136+
(self.0.st_mode as u32 & libc::S_IFMT as u32) == libc::S_IFREG as u32
137+
&& self.0.st_mode as u32 & libc::S_IXUSR as u32 == libc::S_IXUSR as u32
137138
}
138139
#[cfg(windows)]
139140
gix_fs::is_executable(&self.0)
@@ -143,7 +144,7 @@ impl Metadata {
143144
pub fn is_symlink(&self) -> bool {
144145
#[cfg(not(windows))]
145146
{
146-
(self.0.st_mode & libc::S_IFMT) == libc::S_IFLNK
147+
(self.0.st_mode as u32 & libc::S_IFMT as u32) == libc::S_IFLNK as u32
147148
}
148149
#[cfg(windows)]
149150
self.0.is_symlink()
@@ -153,7 +154,7 @@ impl Metadata {
153154
pub fn is_file(&self) -> bool {
154155
#[cfg(not(windows))]
155156
{
156-
(self.0.st_mode & libc::S_IFMT) == libc::S_IFREG
157+
(self.0.st_mode as u32 & libc::S_IFMT as u32) == libc::S_IFREG as u32
157158
}
158159
#[cfg(windows)]
159160
self.0.is_file()

0 commit comments

Comments
 (0)