@@ -186,6 +186,17 @@ def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version, lib_s
186186 dict (extra_compile_args = cflags ),
187187 )
188188
189+ if sys .platform == "linux" :
190+ linux_ext_kwargs = members_appended (
191+ dict (sources = [platform_linux_source ]),
192+ lib_ext_kwargs (pc , "BORG_LIBACL_PREFIX" , "acl" , "libacl" , ">=2.3.1" ),
193+ dict (extra_compile_args = cflags ),
194+ )
195+ else :
196+ linux_ext_kwargs = members_appended (
197+ dict (sources = [platform_linux_source ], libraries = ["acl" ], extra_compile_args = cflags ),
198+ )
199+
189200 # note: _chunker.c and _hashindex.c are relatively complex/large pieces of handwritten C code,
190201 # thus we undef NDEBUG for them, so the compiled code will contain and execute assert().
191202 ext_modules += [
@@ -198,7 +209,8 @@ def lib_ext_kwargs(pc, prefix_env_var, lib_name, lib_pkg_name, pc_version, lib_s
198209 ]
199210
200211 posix_ext = Extension ("borg.platform.posix" , [platform_posix_source ], extra_compile_args = cflags )
201- linux_ext = Extension ("borg.platform.linux" , [platform_linux_source ], libraries = ["acl" ], extra_compile_args = cflags )
212+ linux_ext = Extension ("borg.platform.linux" , ** linux_ext_kwargs )
213+
202214 syncfilerange_ext = Extension (
203215 "borg.platform.syncfilerange" , [platform_syncfilerange_source ], extra_compile_args = cflags
204216 )
0 commit comments