Skip to content
Snippets Groups Projects
Commit b6220478 authored by Zewei Yang's avatar Zewei Yang Committed by Celeste
Browse files

testing/simh: fix build on loongarch64


musl-1.2.4 removed lfs64

Signed-off-by: default avataryzewei <yangzewei@loongson.cn>
parent 4d325960
No related branches found
No related tags found
1 merge request!68926testing/simh: fix build on loongarch64
Pipeline #246629 skipped
diff --git a/sim_fio.c b/sim_fio.c
index c86d67b..e30a533 100644
--- a/sim_fio.c
+++ b/sim_fio.c
@@ -183,7 +183,7 @@ FILE *sim_fopen (const char *file, const char *mode)
return fopen (file, mode, "ALQ=32", "DEQ=4096",
"MBF=6", "MBC=127", "FOP=cbt,tef", "ROP=rah,wbh", "CTX=stm");
#elif (defined (__linux) || defined (__linux__) || defined (__hpux) || defined (_AIX)) && !defined (DONT_DO_LARGEFILE)
-return fopen64 (file, mode);
+return fopen (file, mode);
#else
return fopen (file, mode);
#endif
@@ -268,12 +268,12 @@ return (t_offset) _ftelli64 (st);
int sim_fseeko (FILE *st, t_offset xpos, int origin)
{
-return fseeko64 (st, (off64_t)xpos, origin);
+return fseeko (st, (off_t)xpos, origin);
}
t_offset sim_ftell (FILE *st)
{
-return (t_offset)(ftello64 (st));
+return (t_offset)(ftello (st));
}
#endif /* end Linux with LFS */
...@@ -11,7 +11,8 @@ license="BSD-3-Clause" ...@@ -11,7 +11,8 @@ license="BSD-3-Clause"
options="!check" options="!check"
makedepends="libpcap-dev" makedepends="libpcap-dev"
source="simh-$pkgver.tar.gz::https://github.com/simh/simh/archive/v$_pkgver.tar.gz source="simh-$pkgver.tar.gz::https://github.com/simh/simh/archive/v$_pkgver.tar.gz
gcc-10.patch" gcc-10.patch
0001-fix-build.patch"
builddir="$srcdir"/simh-$_pkgver builddir="$srcdir"/simh-$_pkgver
export CFLAGS="$CFLAGS -fcommon" export CFLAGS="$CFLAGS -fcommon"
...@@ -36,4 +37,5 @@ package() { ...@@ -36,4 +37,5 @@ package() {
sha512sums=" sha512sums="
7c2f81a64d3016b9a44409fc336c804c0da836317745d47594cc48c64cb57dc8f22084d9086e3f86868ec485ee56ac63301f350cee6d275e705b7c5fc82875db simh-3.11.1.tar.gz 7c2f81a64d3016b9a44409fc336c804c0da836317745d47594cc48c64cb57dc8f22084d9086e3f86868ec485ee56ac63301f350cee6d275e705b7c5fc82875db simh-3.11.1.tar.gz
9b6ac5106528e9cd403cfc0a9b0d22192bed5ed1172bb34447274c69b3c2408e47f08125fc845b82091f55e21adf67c72db531d9032f413aaad06b3f55655ca4 gcc-10.patch 9b6ac5106528e9cd403cfc0a9b0d22192bed5ed1172bb34447274c69b3c2408e47f08125fc845b82091f55e21adf67c72db531d9032f413aaad06b3f55655ca4 gcc-10.patch
7b4321a31c5ef842586394ff0eca8431bb0a06640c27230530139c89d62c86d79d4796f2b5dc72bcbaab772db9b742d98e2621104d7e898b9b83accb773c3216 0001-fix-build.patch
" "
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment