nseg: add return 0; to void functions (#18481)

This commit is contained in:
ketsubouchi 2020-09-15 17:24:51 +09:00 committed by GitHub
parent 5e6875008c
commit 33e8dcad99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,6 +74,16 @@ def prepare_source(self):
res_path = join_path(res.fetcher.stage.source_path, res.name) res_path = join_path(res.fetcher.stage.source_path, res.name)
copy(res_path, join_path(self.build_directory, res_name)) copy(res_path, join_path(self.build_directory, res_name))
if self.spec.satisfies('%fj'):
sfiles = ['genwin.c', 'nseg.c']
for s_name in sfiles:
filter_file(
'return;',
'return 0;',
join_path(self.build_directory, s_name),
string=True
)
def install(self, spec, prefix): def install(self, spec, prefix):
with working_dir(self.build_directory): with working_dir(self.build_directory):
mkdirp(prefix.bin) mkdirp(prefix.bin)