Skip to content

Commit

Permalink
Merge pull request #962 from no92/x86-fixes
Browse files Browse the repository at this point in the history
x86 fix + GHA CI
  • Loading branch information
Geertiebear authored Jan 3, 2024
2 parents ac3ca27 + 52590bd commit b562768
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build-mlibc:
strategy:
matrix:
arch: [x86_64, riscv64, aarch64]
arch: [x86_64, riscv64, aarch64, x86]
builds: [mlibc, mlibc-static, mlibc-shared, mlibc-ansi-only, mlibc-headers-only]
name: Build mlibc
runs-on: ubuntu-22.04
Expand Down
10 changes: 10 additions & 0 deletions ci/linux-x86.cross-file
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[binaries]
c = 'i686-linux-mlibc-gcc'
cpp = 'i686-linux-mlibc-g++'
exe_wrapper = 'qemu-i386'

[host_machine]
system = 'linux'
cpu_family = 'x86'
cpu = 'i386'
endian = 'little'
6 changes: 5 additions & 1 deletion options/posix/include/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,11 @@ extern int optopt;
#endif /* !__MLIBC_ABI_ONLY */

// Non-POSIX functions supported by Linux.
typedef unsigned useconds_t;
#if UINTPTR_MAX == UINT64_MAX
typedef __mlibc_uint64 useconds_t;
#else
typedef __mlibc_uint32 useconds_t;
#endif

#ifndef __MLIBC_ABI_ONLY

Expand Down

0 comments on commit b562768

Please sign in to comment.