mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 14:26:03 -04:00
[libsa] Fix typecast of pointer for st_dev
This code was trying to use a pointer value for st_dev, which is definitely not a pointer. Instead, cast to uintptr_t so it becomes a non-pointer value before casting it. Tested: mips-gcc cross compile, mips32 build
This commit is contained in:
parent
2538a4b1b4
commit
6c88ef1c81
1 changed files with 1 additions and 1 deletions
|
|
@ -399,7 +399,7 @@ pkg_stat(struct open_file *f, struct stat *sb)
|
|||
sb->st_size = tf->tf_size;
|
||||
sb->st_blocks = (tf->tf_size + 511) / 512;
|
||||
sb->st_mtime = pkg_atol(tf->tf_hdr.ut_mtime, 12);
|
||||
sb->st_dev = (off_t)tf->tf_pkg;
|
||||
sb->st_dev = (off_t)((uintptr_t)tf->tf_pkg);
|
||||
sb->st_ino = tf->tf_ofs; /* unique per tf_pkg */
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue