diff --git a/setup.py b/setup.py index 58675c875aa..cf6249800bd 100644 --- a/setup.py +++ b/setup.py @@ -166,6 +166,7 @@ def detect_openssl(prefixes): include_dirs = [] library_dirs = [] define_macros = [] +define_macros.append(('XXH_PRIVATE_API', 'YES')) # for zstd lib (includes xxh64) and xxh64 possible_openssl_prefixes = ['/usr', '/usr/local', '/usr/local/opt/openssl', '/usr/local/ssl', '/usr/local/openssl', '/usr/local/borg', '/opt/local', '/opt/pkg', '/opt/homebrew/opt/openssl@1.1', ] diff --git a/setup_xxhash.py b/setup_xxhash.py index 244e2323b1b..74e5f38e36c 100644 --- a/setup_xxhash.py +++ b/setup_xxhash.py @@ -67,7 +67,10 @@ def multi_join(paths, *path_segments): if not use_system: extra_compile_args += [] # not used yet + define_macros = kwargs.get('define_macros', []) + #define_macros.append(('XXH_PRIVATE_API', 'YES')) + ret = dict(**kwargs) - ret.update(dict(sources=sources, extra_compile_args=extra_compile_args, + ret.update(dict(sources=sources, extra_compile_args=extra_compile_args, define_macros=define_macros, include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries)) return ret