Skip to content

Commit

Permalink
Match stat struct def with mlibc
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalmiel committed May 5, 2024
1 parent 18e1cbd commit 50116cf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
8 changes: 5 additions & 3 deletions syscall-defs/src/stat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@ impl Mode {
pub struct Stat {
pub st_dev: u64,
pub st_ino: u64,
pub st_mode: Mode,
pub st_nlink: u32,
pub st_mode: Mode,
pub st_uid: u32,
pub st_gid: u32,
__pad0: u32,
pub st_rdev: u64,
pub st_size: i64,
pub st_blksize: u64,
pub st_blocks: u64,
pub st_atim: crate::time::Timespec,
pub st_mtim: crate::time::Timespec,
pub st_ctim: crate::time::Timespec,
pub st_blksize: u64,
pub st_blocks: u64,
__unused: [u64; 3],
}
13 changes: 13 additions & 0 deletions sysroot/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,19 @@ function _sysroot {
cp $SPATH/cfg/resolv.conf $SYSROOT/etc/
}

function _sysroot_rust_bindings {
_prepare_mlibc

SYSROOT_BIND=${SYSROOT}_mlibc
rm -rf $SYSROOT_BIND

mkdir -p $BUILD_DIR

rm -rf $MLIBC_BUILD_DIR
meson setup --cross-file $SPATH/cfg/cross-file.ini --prefix /usr -Dlinux_kernel_headers=${LINUX_HEADERS_SRC}/include -Dheaders_only=true $MLIBC_BUILD_DIR $MLIBC_SRC_DIR
meson install -C $MLIBC_BUILD_DIR --destdir=${SYSROOT_BIND}
}

function _binutils {
_prepare_binutils

Expand Down

0 comments on commit 50116cf

Please sign in to comment.