2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-12-23 17:25:24 +01:00

3rdparty: opusfile: wscript: hack building on Android with API level lower than 24

In API level 21 **and** _FILE_OFFSET_BITS == 64 we don't get fseeko/ftello functions.
To avoid increasing API level, just set _FILE_OFFSET_BITS to some bogus value.
Undefining it doesn't work as opusfile sets it to 64 automatically.
This commit is contained in:
Alibek Omarov 2024-12-02 21:28:32 +03:00
parent fd5e3fbbb9
commit 6b6d3b3770

View File

@ -14,6 +14,12 @@ def configure(conf):
conf.define('_CRT_SECURE_NO_DEPRECATE', 1) conf.define('_CRT_SECURE_NO_DEPRECATE', 1)
conf.define('_CRT_NONSTDC_NO_DEPRECATE', 1) conf.define('_CRT_NONSTDC_NO_DEPRECATE', 1)
if conf.env.DEST_OS == 'android':
# HACKHACK: set it to 32 here because opusfile can't be built on Android SDK < 24
# with _FILE_OFFSET_BITS 64 (which it sets automatically in src/internal.h)
# we are not (????) relying on this part of the API, so it should be harmless
conf.define('_FILE_OFFSET_BITS', 32)
def build(bld): def build(bld):
sources = [ sources = [
'opusfile/src/info.c', 'opusfile/src/info.c',