Skip to content

Commit 3670fb8

Browse files
committed
Prefer using the files_in_path helper
1 parent ed52985 commit 3670fb8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tools/system_libs.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,9 @@ class libsockets(MuslInternalLibrary, MTLibrary):
860860
cflags = ['-Os', '-fno-builtin', '-Wno-shift-op-parentheses']
861861

862862
def get_files(self):
863-
network_dir = shared.path_from_root('system', 'lib', 'libc', 'musl', 'src', 'network')
864-
return [os.path.join(network_dir, x) for x in LIBC_SOCKETS]
863+
return files_in_path(
864+
path_components=['system', 'lib', 'libc', 'musl', 'src', 'network'],
865+
filenames=LIBC_SOCKETS)
865866

866867

867868
class libsockets_proxy(MuslInternalLibrary, MTLibrary):
@@ -870,9 +871,11 @@ class libsockets_proxy(MuslInternalLibrary, MTLibrary):
870871
cflags = ['-Os']
871872

872873
def get_files(self):
873-
network_dir = shared.path_from_root('system', 'lib', 'libc', 'musl', 'src', 'network')
874-
return [os.path.join(network_dir, x) for x in LIBC_SOCKETS_PROXY] + \
875-
[shared.path_from_root('system', 'lib', 'websocket', 'websocket_to_posix_socket.c')]
874+
return files_in_path(
875+
path_components=['system', 'lib', 'libc', 'musl', 'src', 'network'],
876+
filenames=LIBC_SOCKETS_PROXY) + files_in_path(
877+
path_components=['system', 'lib', 'websocket'],
878+
filenames=['websocket_to_posix_socket.c'])
876879

877880

878881
class crt1(MuslInternalLibrary):

0 commit comments

Comments
 (0)