expat: fix WASM build

it fails with
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/UnpackedTarball/expat/lib/random_getrandom.c:78:14: error: call to undeclared function 'syscall'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
   78 |         (int)syscall(SYS_getrandom, currentTarget, bytesToWrite,
      |              ^
/home/tdf/lode/jenkins/workspace/lo_gerrit/tb/build_master/workdir/UnpackedTarball/expat/lib/random_getrandom.c:78:22: error: use of undeclared identifier 'SYS_getrandom'
   78 |         (int)syscall(SYS_getrandom, currentTarget, bytesToWrite,
      |                      ^~~~~~~~~~~~~
2 errors generated.

Change-Id: I994f10533315c055e1da07fad982a6100e1856ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204732
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Xisco Fauli
2026-05-04 20:34:06 +02:00
parent 5535a6fab3
commit 41d54fa557
2 changed files with 2 additions and 6 deletions
+1
View File
@@ -18,6 +18,7 @@ $(call gb_ExternalProject_get_state_target,expat,configure) :
$(call gb_ExternalProject_run,configure,\
$(gb_RUN_CONFIGURE) ./configure --without-docbook --without-getentropy \
--without-arc4random --without-arc4random-buf \
--without-getrandom --without-sys-getrandom \
$(gb_CONFIGURE_PLATFORMS) \
$(if $(CROSS_COMPILING),$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \
,,expat_configure.log)
+1 -6
View File
@@ -42,18 +42,13 @@ $(eval $(call gb_StaticLibrary_add_defs,expat,\
))
endif
ifeq ($(OS),MACOSX)
$(eval $(call gb_StaticLibrary_add_generated_cobjects,expat,\
UnpackedTarball/expat/lib/random_dev_urandom \
))
else ifeq ($(OS),WNT)
ifeq ($(OS),WNT)
$(eval $(call gb_StaticLibrary_add_generated_cobjects,expat,\
UnpackedTarball/expat/lib/random_rand_s \
))
else
$(eval $(call gb_StaticLibrary_add_generated_cobjects,expat,\
UnpackedTarball/expat/lib/random_dev_urandom \
UnpackedTarball/expat/lib/random_getrandom \
))
endif