mirror of
https://github.com/ptitSeb/box86.git
synced 2024-11-23 06:39:55 +00:00
Another attempt to fix the __st_ino build issue (for #983)
Some checks failed
Build and Release Box86 / build (ubuntu-20.04, TEGRAX1, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-20.04, TEGRAX1, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-20.04, TEGRAX1ARM32, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-20.04, TEGRAX1ARM32, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, A64, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, A64, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ADLINK, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ADLINK, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ANDROID, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ANDROID, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, GAMESHELL, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, GAMESHELL, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, I386, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, I386, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ODROIDXU4, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ODROIDXU4, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, OTHER_ARM, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, OTHER_ARM, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PANDORA, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PANDORA, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PHYTIUM, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PHYTIUM, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PYRA, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PYRA, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RK3288, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RK3288, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RK3399, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RK3399, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RPI4, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RPI4, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RPI4ARM64, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RPI4ARM64, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, SD845, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, SD845, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, SD888, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, SD888, Trace) (push) Failing after 0s
Some checks failed
Build and Release Box86 / build (ubuntu-20.04, TEGRAX1, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-20.04, TEGRAX1, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-20.04, TEGRAX1ARM32, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-20.04, TEGRAX1ARM32, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, A64, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, A64, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ADLINK, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ADLINK, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ANDROID, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ANDROID, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, GAMESHELL, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, GAMESHELL, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, I386, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, I386, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ODROIDXU4, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, ODROIDXU4, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, OTHER_ARM, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, OTHER_ARM, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PANDORA, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PANDORA, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PHYTIUM, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PHYTIUM, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PYRA, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, PYRA, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RK3288, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RK3288, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RK3399, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RK3399, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RPI4, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RPI4, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RPI4ARM64, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, RPI4ARM64, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, SD845, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, SD845, Trace) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, SD888, Release) (push) Failing after 0s
Build and Release Box86 / build (ubuntu-latest, SD888, Trace) (push) Failing after 0s
This commit is contained in:
parent
55e08ab0be
commit
54c806c576
@ -243,6 +243,12 @@ else()
|
||||
set(BOX86 box86)
|
||||
endif()
|
||||
|
||||
try_compile(HAVE_ST_INO ${CMAKE_BINARY_DIR}/compile_tests ${CMAKE_SOURCE_DIR}/tests/test_st_ino.c)
|
||||
|
||||
if(HAVE_ST_INO)
|
||||
message("stat64 has __st_info field")
|
||||
add_definitions(-DHAVE_ST_INO)
|
||||
endif()
|
||||
|
||||
set(BOX86_ELF_ADDRESS "0x62800000")
|
||||
|
||||
|
@ -23,11 +23,8 @@ void UnalignStat64(const void* source, void* dest)
|
||||
i386st->__pad0 = 0;
|
||||
i386st->__pad3 = 0;
|
||||
i386st->st_dev = st->st_dev;
|
||||
#ifdef __USE_TIME64_REDIRECTS
|
||||
#if defined(__USE_TIME64_REDIRECTS) || defined(POWERPCLE) || !defined(HAVE_ST_INO)
|
||||
i386st->__st_ino = st->st_ino;
|
||||
#elif defined(POWERPCLE)
|
||||
i386st->__st_ino = st->st_ino; // Separate __st_ino doesn't
|
||||
// exist on powerpc
|
||||
#else
|
||||
i386st->__st_ino = st->__st_ino;
|
||||
#endif
|
||||
@ -39,7 +36,7 @@ void UnalignStat64(const void* source, void* dest)
|
||||
i386st->st_size = st->st_size;
|
||||
i386st->st_blksize = st->st_blksize;
|
||||
i386st->st_blocks = st->st_blocks;
|
||||
#if defined(__USE_XOPEN2K8) || defined(ANDROID) || defined(PANDORA) || defined(BAD_SIGNAL)
|
||||
#if defined(__USE_XOPEN2K8) || defined(ANDROID) || defined(PANDORA)
|
||||
i386st->st_atime = st->st_atim.tv_sec;
|
||||
i386st->st_atime_nsec = st->st_atim.tv_nsec;
|
||||
i386st->st_mtime = st->st_mtim.tv_sec;
|
||||
@ -63,7 +60,7 @@ void AlignStat64(const void* source, void* dest)
|
||||
struct i386_stat64 *i386st = (struct i386_stat64*)source;
|
||||
|
||||
st->st_dev = i386st->st_dev;
|
||||
#if defined(__USE_TIME64_REDIRECTS) || defined(POWERPCLE)
|
||||
#if defined(__USE_TIME64_REDIRECTS) || defined(POWERPCLE)|| !defined(HAVE_ST_INO)
|
||||
// Separate __st_ino doesn't exist
|
||||
#else
|
||||
st->__st_ino = i386st->__st_ino;
|
||||
@ -76,7 +73,7 @@ void AlignStat64(const void* source, void* dest)
|
||||
st->st_size = i386st->st_size;
|
||||
st->st_blksize = i386st->st_blksize;
|
||||
st->st_blocks = i386st->st_blocks;
|
||||
#if defined(__USE_XOPEN2K8) || defined(ANDROID) || defined(PANDORA) || defined(BAD_SIGNAL)
|
||||
#if defined(__USE_XOPEN2K8) || defined(ANDROID) || defined(PANDORA)
|
||||
st->st_atim.tv_sec = i386st->st_atime;
|
||||
st->st_atim.tv_nsec = i386st->st_atime_nsec;
|
||||
st->st_mtim.tv_sec = i386st->st_mtime;
|
||||
|
16
tests/test_st_ino.c
Normal file
16
tests/test_st_ino.c
Normal file
@ -0,0 +1,16 @@
|
||||
#define _LARGEFILE_SOURCE 1
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/vfs.h>
|
||||
#include <stddef.h>
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
struct stat64 st;
|
||||
st.__st_ino = 0;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user