Commit f80cef5a authored by Iñigo Martínez's avatar Iñigo Martínez Committed by Ondrej Holy

build: Use break in foreach loop

Since meson 0.49.0, `break` keyword can be used inside loops.

This feature has been used to stop when checking functions in
headers that makes avoiding loop iterations.

[0] http://mesonbuild.com/Release-notes-for-0-49-0.html#foreach-break-and-continue
parent 70128710
Pipeline #82185 passed with stage
in 2 minutes and 3 seconds
......@@ -170,7 +170,10 @@ foreach name: ['mkdev', 'sysmacros']
have_major = true
header = 'sys/@0@.h'.format(name)
foreach func: ['major', 'minor', 'makedev']
have_major = have_major and cc.has_header_symbol(header, func)
if not cc.has_header_symbol(header, func)
have_major = false
break
endif
endforeach
config_h.set10('MAJOR_IN_' + name.to_upper(), have_major)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment