commit 4da21e9

hovercats  ·  2023-12-29 11:00:04 +0000 UTC
parent 5e05d5a
import files and packages we want from oasis
471 files changed,  +35257, -0
+6, -0
1@@ -0,0 +1,6 @@
2+/config.ninja
3+/config.lua
4+/out
5+fetch
6+local.ninja
7+.*.swp
+114, -0
  1@@ -0,0 +1,114 @@
  2+[submodule "pkg/awk/src"]
  3+	path = pkg/awk/src
  4+	url = https://github.com/onetrueawk/awk
  5+[submodule "pkg/b3sum/src"]
  6+	path = pkg/b3sum/src
  7+	url = https://git.sr.ht/~mcf/b3sum
  8+[submodule "pkg/bearssl/src"]
  9+	path = pkg/bearssl/src
 10+	url = https://www.bearssl.org/git/BearSSL
 11+	ignore = all
 12+[submodule "pkg/bzip2/src"]
 13+	path = pkg/bzip2/src
 14+	url = git://sourceware.org/git/bzip2.git
 15+[submodule "pkg/catgirl/src"]
 16+	path = pkg/catgirl/src
 17+	url = https://git.causal.agency/catgirl
 18+	ignore = all
 19+[submodule "pkg/dosfstools/src"]
 20+	path = pkg/dosfstools/src
 21+	url = https://github.com/dosfstools/dosfstools
 22+	ignore = all
 23+[submodule "pkg/e2fsprogs/src"]
 24+	path = pkg/e2fsprogs/src
 25+	url = https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
 26+	ignore = all
 27+[submodule "pkg/elftoolchain/elftoolchain"]
 28+	path = pkg/elftoolchain/src
 29+	url = https://github.com/elftoolchain/elftoolchain.git
 30+	ignore = all
 31+[submodule "pkg/file/src"]
 32+	path = pkg/file/src
 33+	url = https://github.com/file/file
 34+[submodule "pkg/fspec-sync/src"]
 35+	path = pkg/fspec-sync/src
 36+	url = https://github.com/oasislinux/fspec-sync.git
 37+[submodule "pkg/git/src"]
 38+	path = pkg/git/src
 39+	url = https://github.com/git/git
 40+	ignore = all
 41+[submodule "pkg/iproute2/src"]
 42+	path = pkg/iproute2/src
 43+	url = https://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
 44+	ignore = all
 45+[submodule "pkg/libcbor/src"]
 46+	path = pkg/libcbor/src
 47+	url = https://github.com/PJK/libcbor.git
 48+[submodule "pkg/libevent/src"]
 49+	path = pkg/libevent/src
 50+	url = https://github.com/libevent/libevent
 51+[submodule "pkg/libfido2/src"]
 52+	path = pkg/libfido2/src
 53+	url = https://github.com/oasislinux/libfido2.git
 54+[submodule "pkg/libnl/src"]
 55+	path = pkg/libnl/src
 56+	url = https://github.com/thom311/libnl
 57+	ignore = all
 58+[submodule "pkg/libtls-bearssl/src"]
 59+	path = pkg/libtls-bearssl/src
 60+	url = https://git.sr.ht/~mcf/libtls-bearssl
 61+	ignore = all
 62+[submodule "pkg/libutp/src"]
 63+	path = pkg/libutp/src
 64+	url = https://github.com/oasislinux/libutp.git
 65+[submodule "pkg/musl/src"]
 66+	path = pkg/musl/src
 67+	url = git://git.musl-libc.org/musl
 68+	ignore = all
 69+[submodule "pkg/netbsd-curses/src"]
 70+	path = pkg/netbsd-curses/src
 71+	url = https://github.com/oasislinux/netbsd-curses.git
 72+	ignore = all
 73+[submodule "pkg/oksh/src"]
 74+	path = pkg/oksh/src
 75+	url = https://github.com/ibara/oksh.git
 76+[submodule "pkg/openssh/src"]
 77+	path = pkg/openssh/src
 78+	url = https://github.com/oasislinux/openssh.git
 79+[submodule "pkg/pigz/src"]
 80+	path = pkg/pigz/src
 81+	url = https://github.com/madler/pigz
 82+[submodule "pkg/rc/src"]
 83+	path = pkg/rc/src
 84+	url = https://github.com/benavento/rc.git
 85+	ignore = all
 86+[submodule "pkg/samurai/src"]
 87+	path = pkg/samurai/src
 88+	url = https://github.com/michaelforney/samurai
 89+[submodule "pkg/sbase/src"]
 90+	path = pkg/sbase/src
 91+	url = https://github.com/michaelforney/sbase
 92+[submodule "pkg/sdhcp/src"]
 93+	path = pkg/sdhcp/src
 94+	url = https://github.com/michaelforney/sdhcp
 95+[submodule "pkg/tz/src"]
 96+	path = pkg/tz/src
 97+	url = https://github.com/eggert/tz
 98+[submodule "pkg/ubase/src"]
 99+	path = pkg/ubase/src
100+	url = https://github.com/michaelforney/ubase
101+[submodule "pkg/util-linux/src"]
102+	path = pkg/util-linux/src
103+	url = https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git
104+	ignore = all
105+[submodule "pkg/vis/src"]
106+	path = pkg/vis/src
107+	url = https://github.com/martanne/vis
108+	ignore = all
109+[submodule "pkg/xz/src"]
110+	path = pkg/xz/src
111+	url = https://git.tukaani.org/xz.git
112+	ignore = all
113+[submodule "pkg/zlib/src"]
114+	path = pkg/zlib/src
115+	url = https://github.com/madler/zlib
+31, -0
 1@@ -0,0 +1,31 @@
 2+Copyright © 2016-2023 Michael Forney
 3+Copyright © 2023 Hovercats
 4+
 5+
 6+Permission to use, copy, modify, and/or distribute this software for any purpose
 7+with or without fee is hereby granted, provided that the above copyright notice
 8+and this permission notice appear in all copies.
 9+
10+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
11+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
12+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
13+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
14+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
16+THIS SOFTWARE.
17+--------------------------------------------------------------------------------
18+Several packages include one or more patch files in a patch/ directory that are
19+applied before building the software. All of these patches can be used under the
20+same terms as the files they change or are derived from in the respective
21+projects. Unless specified below, these patches are original work, taken
22+directly from upstream, or generated directly from scripts within the package's
23+source tree.
24+
25+pkg/unzip/patch/*
26+	Taken from Debian's unzip package,
27+	http://http.debian.net/debian/pool/main/u/unzip/unzip_6.0-16+deb8u2.debian.tar.xz
28+--------------------------------------------------------------------------------
29+Many packages contain header files, usually named config.h or something along
30+those lines, are derived from files generated by the respective project's
31+configure scripts and/or Makefiles. They can be used under the terms of the
32+project to which they correspond.
+1, -0
1@@ -0,0 +1 @@
2+local.ninja
+46, -0
 1@@ -0,0 +1,46 @@
 2+local sets = dofile(basedir..'/sets.lua')
 3+
 4+return {
 5+	-- build output directory
 6+	builddir='out',
 7+
 8+	-- install prefix
 9+	prefix='',
10+
11+	-- package/file selection
12+	fs={
13+                -- Each entry contains a list of packages, a list of patterns to
14+                -- include, and a list of patterns to exclude. If no patterns
15+                -- are specified, all files from the package are included.
16+		{sets.core, exclude={'^include/', '^lib/.*%.a$'}},
17+
18+		-- You may also specify a list of patterns to include or exclude
19+		-- for any packages not matching any entries. If no patterns are
20+		-- specified, all files from the package are excluded.
21+		-- include={...}, exclude={...},
22+	},
23+
24+	-- target toolchain and flags
25+	target={
26+		platform='x86_64-linux-musl',
27+		cflags='-Os -fPIE -pipe',
28+		ldflags='-s -static-pie',
29+	},
30+
31+	-- host toolchain and flags
32+	host={
33+		cflags='-O2 -pipe',
34+		ldflags='',
35+	},
36+
37+	-- output git repository
38+	repo={
39+		path='$builddir/root.git',
40+		flags='--bare',
41+		tag='tree',
42+		branch='master',
43+	},
44+
45+	-- GPU driver (possible_values: amdgpu intel nouveau)
46+	-- video_drivers={intel=true}
47+}
+41, -0
 1@@ -0,0 +1,41 @@
 2+set('ninja_required_version', '1.8')
 3+
 4+set('basedir', basedir)
 5+set('builddir', config.builddir)
 6+set('dir', '$basedir')
 7+set('outdir', '$builddir')
 8+
 9+set('repo', config.repo.path)
10+set('repo_flags', config.repo.flags)
11+set('repo_tag', config.repo.tag)
12+set('repo_branch', config.repo.branch)
13+
14+include '$basedir/rules.ninja'
15+
16+toolchain(config.target)
17+
18+subgen 'probe'
19+subgen 'pkg'
20+
21+build('awk', '$outdir/root.perms', {'$outdir/tree.fspec', '|', '$basedir/scripts/perms.awk'}, {
22+	expr='-f $basedir/scripts/perms.awk',
23+})
24+gitfile('.perms', '644', '$outdir/root.perms')
25+
26+build('git-init', '$outdir/root.stamp')
27+build('git-tree', '$outdir/root.tree', {'$outdir/root.index', '|', '$basedir/scripts/tree.sh', '||', '$outdir/root.stamp'})
28+build('git-commit', '$outdir/root.commit', {'|', '$outdir/root.tree'})
29+build('phony', 'commit', '$builddir/root.commit')
30+
31+build('fspec-sort', '$outdir/root.fspec', {'$outdir/tree.fspec', '|', '$builddir/pkg/fspec-sync/host/fspec-sort'})
32+build('fspec-tar', '$outdir/root.tar.zst', {'$outdir/root.fspec', '|', '$builddir/pkg/fspec-sync/host/fspec-tar'})
33+
34+--build('awk', '$outdir/root.sqfslist', {'$outdir/root.fspec', '|', '$basedir/scripts/squashfs.awk'}, {
35+--	expr='-f $basedir/scripts/squashfs.awk',
36+--})
37+--rule('gensquashfs', 'gensquashfs -F $in -D . -f -c gzip $out')
38+--build('gensquashfs', '$outdir/root.squashfs', {'$outdir/root.sqfslist'})
39+
40+build('phony', 'build.ninja', 'ninja', {generator='1'})
41+
42+io.write('default $builddir/root.tree\n')
+508, -0
  1@@ -0,0 +1,508 @@
  2+--
  3+-- utility functions
  4+--
  5+
  6+function string.hasprefix(s, prefix)
  7+	return s:sub(1, #prefix) == prefix
  8+end
  9+
 10+function string.hassuffix(s, suffix)
 11+	return s:sub(-#suffix) == suffix
 12+end
 13+
 14+-- collects the results of an iterator into a table
 15+local function collect(f, s, i)
 16+	local t = {}
 17+	for v in f, s, i do
 18+		t[#t + 1] = v
 19+	end
 20+	return t
 21+end
 22+
 23+-- collects the keys of a table into a sorted table
 24+function table.keys(t, f)
 25+	local keys = collect(next, t)
 26+	table.sort(keys, f)
 27+	return keys
 28+end
 29+
 30+-- iterates over the sorted keys and values of a table
 31+function sortedpairs(t, f)
 32+	return function(s, i)
 33+		local k = s[i]
 34+		return k and i + 1, k, t[k]
 35+	end, table.keys(t, f), 1
 36+end
 37+
 38+-- yields string values of table or nested tables
 39+local function stringsgen(t)
 40+	for _, val in ipairs(t) do
 41+		if type(val) == 'string' then
 42+			coroutine.yield(val)
 43+		else
 44+			stringsgen(val)
 45+		end
 46+	end
 47+end
 48+
 49+function iterstrings(x)
 50+	return coroutine.wrap(stringsgen), x
 51+end
 52+
 53+function strings(s)
 54+	return collect(iterstrings(s))
 55+end
 56+
 57+-- yields strings generated by concateting all strings in a table, for every
 58+-- combination of strings in subtables
 59+local function expandgen(t, i)
 60+	while true do
 61+		local val
 62+		i, val = next(t, i)
 63+		if not i then
 64+			coroutine.yield(table.concat(t))
 65+			break
 66+		elseif type(val) == 'table' then
 67+			for opt in iterstrings(val) do
 68+				t[i] = opt
 69+				expandgen(t, i)
 70+			end
 71+			t[i] = val
 72+			break
 73+		end
 74+	end
 75+end
 76+
 77+function expand(t)
 78+	return collect(coroutine.wrap(expandgen), t)
 79+end
 80+
 81+-- yields expanded paths from the given path specification string
 82+local function pathsgen(s, i)
 83+	local results = {}
 84+	local first = not i
 85+	while true do
 86+		i = s:find('[^%s]', i)
 87+		local _, j, arch = s:find('^@([^%s()]*)%s*[^%s]?', i)
 88+		if arch then i = j end
 89+		if not i or s:sub(i, i) == ')' then
 90+			break
 91+		end
 92+		local parts, nparts = {}, 0
 93+		local c
 94+		while true do
 95+			local j = s:find('[%s()]', i)
 96+			if not j or j > i then
 97+				nparts = nparts + 1
 98+				parts[nparts] = s:sub(i, j and j - 1)
 99+			end
100+			i = j
101+			c = i and s:sub(i, i)
102+			if c == '(' then
103+				local opts, nopts = {}, 0
104+				local fn = coroutine.wrap(pathsgen)
105+				local opt
106+				opt, i = fn(s, i + 1)
107+				while opt do
108+					nopts = nopts + 1
109+					opts[nopts] = opt
110+					opt, i = fn(s)
111+				end
112+				nparts = nparts + 1
113+				parts[nparts] = opts
114+				if not i or s:sub(i, i) ~= ')' then
115+					error('unmatched (')
116+				end
117+				i = i + 1
118+				c = s:sub(i, i)
119+			else
120+				break
121+			end
122+		end
123+		if not arch or arch == config.target.platform:match('[^-]*') then
124+			expandgen(parts)
125+		end
126+		if not c or c == ')' then
127+			break
128+		end
129+	end
130+	if first and i then
131+		error('unmatched )')
132+	end
133+	return nil, i
134+end
135+
136+function iterpaths(s)
137+	return coroutine.wrap(pathsgen), s
138+end
139+
140+function paths(s)
141+	return collect(iterpaths(s))
142+end
143+
144+-- yields non-empty non-comment lines in a file
145+local function linesgen(file)
146+	for line in io.lines(file) do
147+		if #line > 0 and not line:hasprefix('#') then
148+			coroutine.yield(line)
149+		end
150+	end
151+end
152+
153+function iterlines(file, raw)
154+	table.insert(pkg.inputs.gen, '$dir/'..file)
155+	file = string.format('%s/%s/%s', basedir, pkg.gendir, file)
156+	if raw then
157+		return io.lines(file)
158+	end
159+	return coroutine.wrap(linesgen), file
160+end
161+
162+function lines(file, raw)
163+	return collect(iterlines(file, raw))
164+end
165+
166+function load(file)
167+	table.insert(pkg.inputs.gen, '$dir/'..file)
168+	return dofile(string.format('%s/%s/%s', basedir, pkg.gendir, file))
169+end
170+
171+--
172+-- base constructs
173+--
174+
175+function set(var, val, indent)
176+	if type(val) == 'table' then
177+		val = table.concat(val, ' ')
178+	end
179+	io.write(string.format('%s%s = %s\n', indent or '', var, val))
180+end
181+
182+function subninja(file)
183+	if not file:match('^[$/]') then
184+		file = '$gendir/'..file
185+	end
186+	io.write(string.format('subninja %s\n', file))
187+end
188+
189+function include(file)
190+	io.write(string.format('include %s\n', file))
191+end
192+
193+local function let(bindings)
194+	for var, val in pairs(bindings) do
195+		set(var, val, '  ')
196+	end
197+end
198+
199+function rule(name, cmd, bindings)
200+	io.write(string.format('rule %s\n  command = %s\n', name, cmd))
201+	if bindings then
202+		let(bindings)
203+	end
204+end
205+
206+function build(rule, outputs, inputs, bindings)
207+	if type(outputs) == 'table' then
208+		outputs = table.concat(strings(outputs), ' ')
209+	end
210+	if not inputs then
211+		inputs = ''
212+	elseif type(inputs) == 'table' then
213+		local srcs, nsrcs = {}, 0
214+		for src in iterstrings(inputs) do
215+			nsrcs = nsrcs + 1
216+			srcs[nsrcs] = src
217+			if src:hasprefix('$srcdir/') then
218+				pkg.inputs.fetch[src] = true
219+			end
220+		end
221+		inputs = table.concat(srcs, ' ')
222+	elseif inputs:hasprefix('$srcdir/') then
223+		pkg.inputs.fetch[inputs] = true
224+	end
225+	io.write(string.format('build %s: %s %s\n', outputs, rule, inputs))
226+	if bindings then
227+		let(bindings)
228+	end
229+end
230+
231+--
232+-- higher-level rules
233+--
234+
235+function sub(name, fn)
236+	local old = io.output()
237+	io.output(pkg.gendir..'/'..name)
238+	fn()
239+	io.output(old)
240+	subninja(name)
241+end
242+
243+function toolchain(tc)
244+	set('ar', tc.ar or (tc.platform and tc.platform..'-ar') or 'ar')
245+	set('as', tc.as or (tc.platform and tc.platform..'-as') or 'as')
246+	set('cc', tc.cc or (tc.platform and tc.platform..'-cc') or 'cc')
247+	set('ld', tc.ld or (tc.platform and tc.platform..'-ld') or 'ld')
248+	set('objcopy', tc.objcopy or (tc.platform and tc.platform..'-objcopy') or 'objcopy')
249+	set('mc', tc.mc or 'false')
250+
251+	set('cflags', tc.cflags)
252+	set('ldflags', tc.ldflags)
253+end
254+
255+function phony(name, inputs)
256+	build('phony', '$gendir/'..name, inputs)
257+end
258+
259+function cflags(flags)
260+	set('cflags', '$cflags '..table.concat(flags, ' '))
261+end
262+
263+function nasmflags(flags)
264+	set('nasmflags', '$nasmflags '..table.concat(flags, ' '))
265+end
266+
267+function compile(rule, src, deps, args)
268+	local obj = src..'.o'
269+	if not src:match('^[$/]') then
270+		src = '$srcdir/'..src
271+		obj = '$outdir/'..obj
272+	end
273+	if not deps and pkg.deps then
274+		deps = '$gendir/deps'
275+	end
276+	if deps then
277+		src = {src, '||', deps}
278+	end
279+	build(rule, obj, src, args)
280+	return obj
281+end
282+
283+function cc(src, deps, args)
284+	return compile('cc', src, deps, args)
285+end
286+
287+function objects(srcs, deps, args)
288+	local objs, nobjs = {}, 0
289+	local rules = {
290+		c='cc',
291+		s='cc',
292+		S='cc',
293+		cc='cc',
294+		cpp='cc',
295+		asm='nasm',
296+	}
297+	local fn
298+	if type(srcs) == 'string' then
299+		fn = coroutine.wrap(pathsgen)
300+	else
301+		fn = coroutine.wrap(stringsgen)
302+	end
303+	for src in fn, srcs do
304+		local rule = rules[src:match('[^.]*$')]
305+		if rule then
306+			src = compile(rule, src, deps, args)
307+		end
308+		nobjs = nobjs + 1
309+		objs[nobjs] = src
310+	end
311+	return objs
312+end
313+
314+function link(out, files, args)
315+	local objs = {}
316+	local deps = {}
317+	for _, file in ipairs(files) do
318+		if not file:match('^[$/]') then
319+			file = '$outdir/'..file
320+		end
321+		if file:hassuffix('.d') then
322+			deps[#deps + 1] = file
323+		else
324+			objs[#objs + 1] = file
325+		end
326+	end
327+	out = '$outdir/'..out
328+	if not args then
329+		args = {}
330+	end
331+	if next(deps) then
332+		local rsp = out..'.rsp'
333+		build('awk', rsp, {deps, '|', '$basedir/scripts/rsp.awk'}, {expr='-f $basedir/scripts/rsp.awk'})
334+		objs[#objs + 1] = '|'
335+		objs[#objs + 1] = rsp
336+		args.ldlibs = '@'..rsp
337+	end
338+	build('link', out, objs, args)
339+	return out
340+end
341+
342+function ar(out, files)
343+	out = '$outdir/'..out
344+	local objs, nobjs = {}, 0
345+	local deps, ndeps = {out}, 1
346+	for _, file in ipairs(files) do
347+		if not file:match('^[$/]') then
348+			file = '$outdir/'..file
349+		end
350+		if file:find('%.[ad]$') then
351+			ndeps = ndeps + 1
352+			deps[ndeps] = file
353+		else
354+			nobjs = nobjs + 1
355+			objs[nobjs] = file
356+		end
357+	end
358+	build('ar', out, objs)
359+	build('rsp', out..'.d', deps)
360+end
361+
362+function lib(out, srcs, deps)
363+	return ar(out, objects(srcs, deps))
364+end
365+
366+function exe(out, srcs, deps, args)
367+	return link(out, objects(srcs, deps), args)
368+end
369+
370+function yacc(name, gram)
371+	if not gram:match('^[$/]') then
372+		gram = '$srcdir/'..gram
373+	end
374+	build('yacc', expand{'$outdir/', name, {'.tab.c', '.tab.h'}}, gram, {
375+		yaccflags='-d -b $outdir/'..name,
376+	})
377+end
378+
379+function waylandproto(proto, outs, args)
380+	proto = '$srcdir/'..proto
381+	if outs.client then
382+		build('wayland-proto', '$outdir/'..outs.client, proto, {type='client-header'})
383+	end
384+	if outs.server then
385+		build('wayland-proto', '$outdir/'..outs.server, proto, {type='server-header'})
386+	end
387+	if outs.code then
388+		local code = '$outdir/'..outs.code
389+		build('wayland-proto', code, proto, {type='public-code'})
390+		cc(code, {'pkg/wayland/headers'}, args)
391+	end
392+end
393+
394+function fetch(method)
395+	local script
396+	if method == 'local' then
397+		script = '$dir/fetch.sh'
398+	else
399+		script = '$basedir/scripts/fetch-'..method..'.sh'
400+	end
401+	build('fetch', '$dir/fetch', {'|', '$dir/ver', script}, {script=script})
402+	if basedir ~= '.' then
403+		build('phony', '$gendir/fetch', '$dir/fetch')
404+	end
405+	if next(pkg.inputs.fetch) then
406+		build('phony', table.keys(pkg.inputs.fetch), '$dir/fetch')
407+	end
408+end
409+
410+local function findany(path, pats)
411+	for _, pat in pairs(pats) do
412+		if path:find(pat) then
413+			return true
414+		end
415+	end
416+	return false
417+end
418+
419+local function specmatch(spec, path)
420+	if spec.include and not findany(path, spec.include) then
421+		return false
422+	end
423+	if spec.exclude and findany(path, spec.exclude) then
424+		return false
425+	end
426+	return true
427+end
428+
429+local function fs(name, path)
430+	for _, spec in ipairs(config.fs) do
431+		for specname in iterstrings(spec) do
432+			if name == specname then
433+				return specmatch(spec, path)
434+			end
435+		end
436+	end
437+	return (config.fs.include or config.fs.exclude) and specmatch(config.fs, path)
438+end
439+
440+function gitfile(path, mode, src)
441+	local out = '$builddir/root.hash/'..path
442+	local perm = ('10%04o %s'):format(tonumber(mode, 8), path)
443+	build('git-hash', out, {src, '|', '$basedir/scripts/hash.sh', '||', '$builddir/root.stamp'}, {
444+		args=perm,
445+	})
446+	table.insert(pkg.inputs.index, out)
447+end
448+
449+function file(path, mode, src)
450+	if pkg.gendir:hasprefix('pkg/') and not fs(pkg.name, path) then
451+		return
452+	end
453+	mode = ('%04o'):format(tonumber(mode, 8))
454+	pkg.fspec[path] = {
455+		type='reg',
456+		mode=mode,
457+		source=src:gsub('^%$(%w+)', pkg, 1),
458+	}
459+	gitfile(path, mode, src)
460+end
461+
462+function dir(path, mode)
463+	if pkg.gendir:hasprefix('pkg/') and not fs(pkg.name, path) then
464+		return
465+	end
466+	pkg.fspec[path] = {
467+		type='dir',
468+		mode=('%04o'):format(tonumber(mode, 8)),
469+	}
470+end
471+
472+function sym(path, target)
473+	if pkg.gendir:hasprefix('pkg/') and not fs(pkg.name, path) then
474+		return
475+	end
476+	pkg.fspec[path] = {
477+		type='sym',
478+		mode='0777',
479+		target=target,
480+	}
481+	local out = '$builddir/root.hash/'..path
482+	build('git-hash', out, {'|', '$basedir/scripts/hash.sh', '||', '$builddir/root.stamp'}, {
483+		args=string.format('120000 %s %s', path, target),
484+	})
485+	table.insert(pkg.inputs.index, out)
486+end
487+
488+function man(srcs, section)
489+	for _, src in ipairs(srcs) do
490+		if not src:match('^[$/]') then
491+			src = '$srcdir/'..src
492+		end
493+		local i = src:find('/', 1, true)
494+		local gz = '$outdir'..src:sub(i)..'.gz'
495+		build('gzip', gz, src)
496+		local srcsection = section or src:match('[^.]*$')
497+		file('share/man/man'..srcsection..'/'..gz:match('[^/]*$'), '644', gz)
498+	end
499+end
500+
501+function copy(outdir, srcdir, files)
502+	local outs = {}
503+	for i, file in ipairs(files) do
504+		local out = outdir..'/'..file
505+		outs[i] = out
506+		build('copy', out, srcdir..'/'..file)
507+	end
508+	return outs
509+end
+1, -0
1@@ -0,0 +1 @@
2+/tools.ninja
+28, -0
 1@@ -0,0 +1,28 @@
 2+cflags{
 3+	'-std=c99',
 4+	'-D _XOPEN_SOURCE=700',
 5+	'-I $outdir',
 6+	'-I $srcdir',
 7+}
 8+
 9+yacc('awkgram', 'awkgram.y')
10+
11+pkg.deps = {'$outdir/awkgram.tab.h'}
12+
13+sub('tools.ninja', function()
14+	toolchain(config.host)
15+	cflags{'-I $outdir'}
16+	exe('maketab', {'maketab.c'})
17+end)
18+
19+rule('maketab', '$outdir/maketab $in >$out')
20+build('maketab', '$outdir/proctab.c', {'$outdir/awkgram.tab.h', '|', '$outdir/maketab'})
21+
22+exe('awk', [[
23+	b.c main.c parse.c tran.c lib.c run.c lex.c
24+	$outdir/(awkgram.tab.c proctab.c)
25+]])
26+file('bin/awk', '755', '$outdir/awk')
27+man{'awk.1'}
28+
29+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 30791e0f686010b39c1ab2121df85da180960d53
+1, -0
1@@ -0,0 +1 @@
2+20220830 r0
+1, -0
1@@ -0,0 +1 @@
2+/host.ninja
+36, -0
 1@@ -0,0 +1,36 @@
 2+cflags{
 3+	'-std=c99', '-Wall', '-Wpedantic',
 4+	'-D WITH_ASM',
 5+}
 6+
 7+pkg.hdrs = {
 8+	copy('$outdir/include', '$srcdir', {'blake3.h'}),
 9+	install=true,
10+}
11+
12+sub('host.ninja', function()
13+	set('outdir', '$outdir/host')
14+	toolchain(config.host)
15+
16+	lib('libblake3.a', {'blake3.c', 'blake3_dispatch.c', 'blake3_portable.c'})
17+end)
18+
19+lib('libblake3.a', [[
20+	blake3.c
21+	blake3_dispatch.c
22+	blake3_portable.c
23+	@x86_64 (
24+		blake3_cpuid.S
25+		blake3_avx2_x86-64_unix.S
26+		blake3_avx512_x86-64_unix.S
27+		blake3_sse2_x86-64_unix.S
28+		blake3_sse41_x86-64_unix.S
29+	)
30+]])
31+file('lib/libblake3.a', '644', '$outdir/libblake3.a')
32+
33+exe('b3sum', {'b3sum.c', 'libblake3.a'})
34+file('bin/b3sum', '755', '$outdir/b3sum')
35+man{'b3sum.1'}
36+
37+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit cb4111ccc8061039b014fbb657c72f78984f1069
+1, -0
1@@ -0,0 +1 @@
2+1.3.1 r0
+2, -0
1@@ -0,0 +1,2 @@
2+/bc-1.07.1.tar.gz
3+/src
+56, -0
 1@@ -0,0 +1,56 @@
 2+#define BC_COPYRIGHT "Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc."
 3+#define DC_COPYRIGHT "Copyright 1994, 1997, 1998, 2000, 2001, 2003-2006, 2008, 2010, 2012-2017 Free Software Foundation, Inc."
 4+#define DC_VERSION "1.4.1"
 5+/* #undef HAVE_DOPRNT */
 6+#define HAVE_ERRNO_H 1
 7+#define HAVE_FSTAT 1
 8+#define HAVE_INTTYPES_H 1
 9+#define HAVE_ISGRAPH 1
10+/* #undef HAVE_LIB_H */
11+#define HAVE_LIMITS_H 1
12+#define HAVE_MEMORY_H 1
13+#define HAVE_SETVBUF 1
14+#define HAVE_STDARG_H 1
15+#define HAVE_STDDEF_H 1
16+#define HAVE_STDINT_H 1
17+#define HAVE_STDLIB_H 1
18+#define HAVE_STRINGS_H 1
19+#define HAVE_STRING_H 1
20+#define HAVE_STRTOL 1
21+#define HAVE_SYS_STAT_H 1
22+#define HAVE_SYS_TYPES_H 1
23+#define HAVE_UNISTD_H 1
24+#define HAVE_VPRINTF 1
25+/* #undef LIBEDIT */
26+#define PACKAGE "bc"
27+#define PACKAGE_BUGREPORT ""
28+#define PACKAGE_NAME "bc"
29+#define PACKAGE_STRING "bc 1.07.1"
30+#define PACKAGE_TARNAME "bc"
31+#define PACKAGE_URL ""
32+#define PACKAGE_VERSION "1.07.1"
33+/* #undef READLINE */
34+#define STDC_HEADERS 1
35+#ifndef _ALL_SOURCE
36+# define _ALL_SOURCE 1
37+#endif
38+#ifndef _GNU_SOURCE
39+# define _GNU_SOURCE 1
40+#endif
41+#ifndef _POSIX_PTHREAD_SEMANTICS
42+# define _POSIX_PTHREAD_SEMANTICS 1
43+#endif
44+#ifndef _TANDEM_SOURCE
45+# define _TANDEM_SOURCE 1
46+#endif
47+#ifndef __EXTENSIONS__
48+# define __EXTENSIONS__ 1
49+#endif
50+#define VERSION "1.07.1"
51+/* #undef YYTEXT_POINTER */
52+/* #undef _MINIX */
53+/* #undef _POSIX_1_SOURCE */
54+/* #undef _POSIX_SOURCE */
55+/* #undef const */
56+/* #undef ptrdiff_t */
57+/* #undef size_t */
+18, -0
 1@@ -0,0 +1,18 @@
 2+cflags{
 3+	'-std=c99', '-Wall', '-Wpedantic',
 4+	'-D _POSIX_C_SOURCE=200809L',
 5+	'-I $dir',
 6+	'-I $srcdir/h',
 7+}
 8+
 9+exe('bin/bc', [[
10+	bc/(
11+		main.c bc.c scan.c execute.c load.c storage.c util.c global.c
12+		warranty.c
13+	)
14+	lib/number.c
15+]])
16+file('bin/bc', '755', '$outdir/bin/bc')
17+man{'doc/bc.1'}
18+
19+fetch 'curl'
+46, -0
 1@@ -0,0 +1,46 @@
 2+{"@iK20:s2:p@r",
 3+"@iF1,5.6,7,8,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C1,0:",
 4+"s14:pl7:s0:pl14:RN1:l5:0<Z2:1s12:pl5:ns5:pN2:l2:s15:pK6:l15:+",
 5+"K.44:l5:*+s13:pl5:cS1+s2:pN3:l5:1>Z4:l10:1+s10:pl5:K2:/s5:pl2:",
 6+"1+s2:pJ3:N4:l13:s2:p1l5:+s14:pl5:s6:p1s8:pK2:s11:pN6:1B7:J5:N8:",
 7+"l11:i11:pJ6:N7:l6:l5:*s6:l8:l11:*s8:/s9:pl9:0=Z9:l10:0>Z10:N11:",
 8+"l10:d10:Z12:l14:l14:*s14:pJ11:N12:N10:l15:s2:pl12:Z13:1l14:/R",
 9+"N13:l14:1/RN9:l14:l9:+s14:pJ8:N5:0R]@r",
10+"@iF2,5.7,9,10,11,12,13,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C2,0:",
11+"s14:pl7:s0:pl14:RN1:l5:0{Z2:1K10:l2:^-1/RN2:l2:s15:pK6:l2:+s2:",
12+"pK2:s10:p0s11:pN3:l5:K2:}Z4:l10:K2:*s10:pl5:cRs5:pJ3:N4:N5:l5:",
13+"K.5:{Z6:l10:K2:*s10:pl5:cRs5:pJ5:N6:l5:1-l5:1+/s13:s14:pl13:l13:",
14+"*s12:pK3:s11:pN8:1B9:J7:N10:l11:K2:+s11:pJ8:N9:l13:l12:*s13:l11:",
15+"/s9:pl9:0=Z11:l10:l14:*s14:pl15:s2:pl14:1/RN11:l14:l9:+s14:pJ10:N7:",
16+"0R]@r",
17+"@iF3,5.7,9,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C3,0:",
18+"s14:pl7:s0:pl14:RN1:l2:s15:pK1.1:l15:*K2:+s2:p1C4,0:s14:pl5:0",
19+"<Z2:1s12:pl5:ns5:pN2:0s2:pl5:l14:/K2:+K4:/s13:pl5:K4:l13:*l14:",
20+"*-s5:pl13:K2:%Z3:l5:ns5:pN3:l15:K2:+s2:pl5:s9:s14:pl5:nl5:*s16:",
21+"pK3:s11:pN5:1B6:J4:N7:l11:K2:+s11:pJ5:N6:l9:l16:l11:l11:1-*/*",
22+"s9:pl9:0=Z8:l15:s2:pl12:Z9:l14:n1/RN9:l14:1/RN8:l14:l9:+s14:p",
23+"J7:N4:0R]@r",
24+"@iF5,5.7,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:C5,0:s14:pl7:s0:pl14:",
25+"RN1:l2:s15:pl2:K1.2:*s2:pl5:1C4,0:K2:*+C3,0:s14:pl15:s2:pl14:",
26+"1/R0R]@r",
27+"@iF4,5.6,7,9,10,11,12,13,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl5:",
28+"C4,0:s14:pl7:s0:pl14:RN1:1s12:pl5:0<Z2:1ns12:pl5:ns5:pN2:l5:1",
29+"=Z3:l2:K25:{Z4:K.7853981633974483096156608:l12:/RN4:l2:K40:{Z5:",
30+"K.7853981633974483096156608458198757210492:l12:/RN5:l2:K60:{Z6:",
31+"K.785398163397448309615660845819875721049292349843776455243736",
32+":l12:/RN6:N3:l5:K.2:=Z7:l2:K25:{Z8:K.1973955598498807583700497",
33+":l12:/RN8:l2:K40:{Z9:K.1973955598498807583700497651947902934475",
34+":l12:/RN9:l2:K60:{Z10:K.197395559849880758370049765194790293447585103787852101517688",
35+":l12:/RN10:N7:l2:s15:pl5:K.2:>Z11:l15:K5:+s2:pK.2:C4,0:s6:pN11:",
36+"l15:K3:+s2:pN12:l5:K.2:>Z13:l10:1+s10:pl5:K.2:-1l5:K.2:*+/s5:",
37+"pJ12:N13:l5:s13:s14:pl5:nl5:*s16:pK3:s11:pN15:1B16:J14:N17:l11:",
38+"K2:+s11:pJ15:N16:l13:l16:*s13:l11:/s9:pl9:0=Z18:l15:s2:pl10:l6:",
39+"*l14:+l12:/RN18:l14:l9:+s14:pJ17:N14:0R]@r",
40+"@iF6,13,5.6,7,8,9,10,11,12,16,14,15[l0:KA:#Z1:l0:s7:pKA:s0:pl13:",
41+"l5:C6,00:s14:pl7:s0:pl14:RN1:l2:s15:p0s2:pl13:1/s13:pl13:0<Z2:",
42+"l13:ns13:pl13:K2:%1=Z3:1s12:pN3:N2:1s10:pK2:s11:pN5:l11:l13:{",
43+"B6:J4:N7:l11:i11:pJ5:N6:l10:l11:*s10:pJ7:N4:K1.5:l15:*s2:pl5:",
44+"l13:^K2:l13:^/l10:/s10:p1s9:s14:pl5:nl5:*K4:/s16:pK1.5:l15:*l10:",
45+"cL+l10:cS-s2:p1s11:pN9:1B10:J8:N11:l11:i11:pJ9:N10:l9:l16:*l11:",
46+"/l13:l11:+/s9:pl9:0=Z12:l15:s2:pl12:Z13:l10:nl14:*1/RN13:l10:",
47+"l14:*1/RN12:l14:l9:+s14:pJ11:N8:0R]@r",0}
+1, -0
1@@ -0,0 +1 @@
2+62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a  bc-1.07.1.tar.gz
+1, -0
1@@ -0,0 +1 @@
2+url = "https://ftp.gnu.org/gnu/bc/bc-1.07.1.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+1.07.1 r0
+348, -0
  1@@ -0,0 +1,348 @@
  2+cflags{
  3+	'-Wall',
  4+	'-I $srcdir/src',
  5+	'-I $srcdir/inc',
  6+	'-D BR_RDRAND=0',
  7+	'-D BR_USE_GETENTROPY',
  8+}
  9+
 10+pkg.hdrs = copy('$outdir/include', '$srcdir/inc', {
 11+	'bearssl.h',
 12+	'bearssl_aead.h',
 13+	'bearssl_block.h',
 14+	'bearssl_ec.h',
 15+	'bearssl_hash.h',
 16+	'bearssl_hmac.h',
 17+	'bearssl_kdf.h',
 18+	'bearssl_pem.h',
 19+	'bearssl_prf.h',
 20+	'bearssl_rand.h',
 21+	'bearssl_rsa.h',
 22+	'bearssl_ssl.h',
 23+	'bearssl_x509.h',
 24+})
 25+pkg.hdrs.install = true
 26+
 27+lib('libbearssl.a', [[src/(
 28+	settings.c
 29+	aead/ccm.c
 30+	aead/eax.c
 31+	aead/gcm.c
 32+	codec/ccopy.c
 33+	codec/dec16be.c
 34+	codec/dec16le.c
 35+	codec/dec32be.c
 36+	codec/dec32le.c
 37+	codec/dec64be.c
 38+	codec/dec64le.c
 39+	codec/enc16be.c
 40+	codec/enc16le.c
 41+	codec/enc32be.c
 42+	codec/enc32le.c
 43+	codec/enc64be.c
 44+	codec/enc64le.c
 45+	codec/pemdec.c
 46+	codec/pemenc.c
 47+	ec/ec_all_m15.c
 48+	ec/ec_all_m31.c
 49+	ec/ec_c25519_i15.c
 50+	ec/ec_c25519_i31.c
 51+	ec/ec_c25519_m15.c
 52+	ec/ec_c25519_m31.c
 53+	ec/ec_c25519_m62.c
 54+	ec/ec_c25519_m64.c
 55+	ec/ec_curve25519.c
 56+	ec/ec_default.c
 57+	ec/ec_keygen.c
 58+	ec/ec_p256_m15.c
 59+	ec/ec_p256_m31.c
 60+	ec/ec_p256_m62.c
 61+	ec/ec_p256_m64.c
 62+	ec/ec_prime_i15.c
 63+	ec/ec_prime_i31.c
 64+	ec/ec_pubkey.c
 65+	ec/ec_secp256r1.c
 66+	ec/ec_secp384r1.c
 67+	ec/ec_secp521r1.c
 68+	ec/ecdsa_atr.c
 69+	ec/ecdsa_default_sign_asn1.c
 70+	ec/ecdsa_default_sign_raw.c
 71+	ec/ecdsa_default_vrfy_asn1.c
 72+	ec/ecdsa_default_vrfy_raw.c
 73+	ec/ecdsa_i15_bits.c
 74+	ec/ecdsa_i15_sign_asn1.c
 75+	ec/ecdsa_i15_sign_raw.c
 76+	ec/ecdsa_i15_vrfy_asn1.c
 77+	ec/ecdsa_i15_vrfy_raw.c
 78+	ec/ecdsa_i31_bits.c
 79+	ec/ecdsa_i31_sign_asn1.c
 80+	ec/ecdsa_i31_sign_raw.c
 81+	ec/ecdsa_i31_vrfy_asn1.c
 82+	ec/ecdsa_i31_vrfy_raw.c
 83+	ec/ecdsa_rta.c
 84+	hash/dig_oid.c
 85+	hash/dig_size.c
 86+	hash/ghash_ctmul.c
 87+	hash/ghash_ctmul32.c
 88+	hash/ghash_ctmul64.c
 89+	hash/ghash_pclmul.c
 90+	hash/ghash_pwr8.c
 91+	hash/md5.c
 92+	hash/md5sha1.c
 93+	hash/mgf1.c
 94+	hash/multihash.c
 95+	hash/sha1.c
 96+	hash/sha2big.c
 97+	hash/sha2small.c
 98+	int/i15_add.c
 99+	int/i15_bitlen.c
100+	int/i15_decmod.c
101+	int/i15_decode.c
102+	int/i15_decred.c
103+	int/i15_encode.c
104+	int/i15_fmont.c
105+	int/i15_iszero.c
106+	int/i15_moddiv.c
107+	int/i15_modpow.c
108+	int/i15_modpow2.c
109+	int/i15_montmul.c
110+	int/i15_mulacc.c
111+	int/i15_muladd.c
112+	int/i15_ninv15.c
113+	int/i15_reduce.c
114+	int/i15_rshift.c
115+	int/i15_sub.c
116+	int/i15_tmont.c
117+	int/i31_add.c
118+	int/i31_bitlen.c
119+	int/i31_decmod.c
120+	int/i31_decode.c
121+	int/i31_decred.c
122+	int/i31_encode.c
123+	int/i31_fmont.c
124+	int/i31_iszero.c
125+	int/i31_moddiv.c
126+	int/i31_modpow.c
127+	int/i31_modpow2.c
128+	int/i31_montmul.c
129+	int/i31_mulacc.c
130+	int/i31_muladd.c
131+	int/i31_ninv31.c
132+	int/i31_reduce.c
133+	int/i31_rshift.c
134+	int/i31_sub.c
135+	int/i31_tmont.c
136+	int/i32_add.c
137+	int/i32_bitlen.c
138+	int/i32_decmod.c
139+	int/i32_decode.c
140+	int/i32_decred.c
141+	int/i32_div32.c
142+	int/i32_encode.c
143+	int/i32_fmont.c
144+	int/i32_iszero.c
145+	int/i32_modpow.c
146+	int/i32_montmul.c
147+	int/i32_mulacc.c
148+	int/i32_muladd.c
149+	int/i32_ninv32.c
150+	int/i32_reduce.c
151+	int/i32_sub.c
152+	int/i32_tmont.c
153+	int/i62_modpow2.c
154+	kdf/hkdf.c
155+	kdf/shake.c
156+	mac/hmac.c
157+	mac/hmac_ct.c
158+	rand/aesctr_drbg.c
159+	rand/hmac_drbg.c
160+	rand/sysrng.c
161+	rsa/rsa_default_keygen.c
162+	rsa/rsa_default_modulus.c
163+	rsa/rsa_default_oaep_decrypt.c
164+	rsa/rsa_default_oaep_encrypt.c
165+	rsa/rsa_default_pkcs1_sign.c
166+	rsa/rsa_default_pkcs1_vrfy.c
167+	rsa/rsa_default_priv.c
168+	rsa/rsa_default_privexp.c
169+	rsa/rsa_default_pss_sign.c
170+	rsa/rsa_default_pss_vrfy.c
171+	rsa/rsa_default_pub.c
172+	rsa/rsa_default_pubexp.c
173+	rsa/rsa_i15_keygen.c
174+	rsa/rsa_i15_modulus.c
175+	rsa/rsa_i15_oaep_decrypt.c
176+	rsa/rsa_i15_oaep_encrypt.c
177+	rsa/rsa_i15_pkcs1_sign.c
178+	rsa/rsa_i15_pkcs1_vrfy.c
179+	rsa/rsa_i15_priv.c
180+	rsa/rsa_i15_privexp.c
181+	rsa/rsa_i15_pss_sign.c
182+	rsa/rsa_i15_pss_vrfy.c
183+	rsa/rsa_i15_pub.c
184+	rsa/rsa_i15_pubexp.c
185+	rsa/rsa_i31_keygen.c
186+	rsa/rsa_i31_keygen_inner.c
187+	rsa/rsa_i31_modulus.c
188+	rsa/rsa_i31_oaep_decrypt.c
189+	rsa/rsa_i31_oaep_encrypt.c
190+	rsa/rsa_i31_pkcs1_sign.c
191+	rsa/rsa_i31_pkcs1_vrfy.c
192+	rsa/rsa_i31_priv.c
193+	rsa/rsa_i31_privexp.c
194+	rsa/rsa_i31_pss_sign.c
195+	rsa/rsa_i31_pss_vrfy.c
196+	rsa/rsa_i31_pub.c
197+	rsa/rsa_i31_pubexp.c
198+	rsa/rsa_i32_oaep_decrypt.c
199+	rsa/rsa_i32_oaep_encrypt.c
200+	rsa/rsa_i32_pkcs1_sign.c
201+	rsa/rsa_i32_pkcs1_vrfy.c
202+	rsa/rsa_i32_priv.c
203+	rsa/rsa_i32_pss_sign.c
204+	rsa/rsa_i32_pss_vrfy.c
205+	rsa/rsa_i32_pub.c
206+	rsa/rsa_i62_keygen.c
207+	rsa/rsa_i62_oaep_decrypt.c
208+	rsa/rsa_i62_oaep_encrypt.c
209+	rsa/rsa_i62_pkcs1_sign.c
210+	rsa/rsa_i62_pkcs1_vrfy.c
211+	rsa/rsa_i62_priv.c
212+	rsa/rsa_i62_pss_sign.c
213+	rsa/rsa_i62_pss_vrfy.c
214+	rsa/rsa_i62_pub.c
215+	rsa/rsa_oaep_pad.c
216+	rsa/rsa_oaep_unpad.c
217+	rsa/rsa_pkcs1_sig_pad.c
218+	rsa/rsa_pkcs1_sig_unpad.c
219+	rsa/rsa_pss_sig_pad.c
220+	rsa/rsa_pss_sig_unpad.c
221+	rsa/rsa_ssl_decrypt.c
222+	ssl/prf.c
223+	ssl/prf_md5sha1.c
224+	ssl/prf_sha256.c
225+	ssl/prf_sha384.c
226+	ssl/ssl_ccert_single_ec.c
227+	ssl/ssl_ccert_single_rsa.c
228+	ssl/ssl_client.c
229+	ssl/ssl_client_default_rsapub.c
230+	ssl/ssl_client_full.c
231+	ssl/ssl_engine.c
232+	ssl/ssl_engine_default_aescbc.c
233+	ssl/ssl_engine_default_aesccm.c
234+	ssl/ssl_engine_default_aesgcm.c
235+	ssl/ssl_engine_default_chapol.c
236+	ssl/ssl_engine_default_descbc.c
237+	ssl/ssl_engine_default_ec.c
238+	ssl/ssl_engine_default_ecdsa.c
239+	ssl/ssl_engine_default_rsavrfy.c
240+	ssl/ssl_hashes.c
241+	ssl/ssl_hs_client.c
242+	ssl/ssl_hs_server.c
243+	ssl/ssl_io.c
244+	ssl/ssl_keyexport.c
245+	ssl/ssl_lru.c
246+	ssl/ssl_rec_cbc.c
247+	ssl/ssl_rec_ccm.c
248+	ssl/ssl_rec_chapol.c
249+	ssl/ssl_rec_gcm.c
250+	ssl/ssl_scert_single_ec.c
251+	ssl/ssl_scert_single_rsa.c
252+	ssl/ssl_server.c
253+	ssl/ssl_server_full_ec.c
254+	ssl/ssl_server_full_rsa.c
255+	ssl/ssl_server_mine2c.c
256+	ssl/ssl_server_mine2g.c
257+	ssl/ssl_server_minf2c.c
258+	ssl/ssl_server_minf2g.c
259+	ssl/ssl_server_minr2g.c
260+	ssl/ssl_server_minu2g.c
261+	ssl/ssl_server_minv2g.c
262+	symcipher/aes_big_cbcdec.c
263+	symcipher/aes_big_cbcenc.c
264+	symcipher/aes_big_ctr.c
265+	symcipher/aes_big_ctrcbc.c
266+	symcipher/aes_big_dec.c
267+	symcipher/aes_big_enc.c
268+	symcipher/aes_common.c
269+	symcipher/aes_ct.c
270+	symcipher/aes_ct64.c
271+	symcipher/aes_ct64_cbcdec.c
272+	symcipher/aes_ct64_cbcenc.c
273+	symcipher/aes_ct64_ctr.c
274+	symcipher/aes_ct64_ctrcbc.c
275+	symcipher/aes_ct64_dec.c
276+	symcipher/aes_ct64_enc.c
277+	symcipher/aes_ct_cbcdec.c
278+	symcipher/aes_ct_cbcenc.c
279+	symcipher/aes_ct_ctr.c
280+	symcipher/aes_ct_ctrcbc.c
281+	symcipher/aes_ct_dec.c
282+	symcipher/aes_ct_enc.c
283+	symcipher/aes_pwr8.c
284+	symcipher/aes_pwr8_cbcdec.c
285+	symcipher/aes_pwr8_cbcenc.c
286+	symcipher/aes_pwr8_ctr.c
287+	symcipher/aes_pwr8_ctrcbc.c
288+	symcipher/aes_small_cbcdec.c
289+	symcipher/aes_small_cbcenc.c
290+	symcipher/aes_small_ctr.c
291+	symcipher/aes_small_ctrcbc.c
292+	symcipher/aes_small_dec.c
293+	symcipher/aes_small_enc.c
294+	symcipher/aes_x86ni.c
295+	symcipher/aes_x86ni_cbcdec.c
296+	symcipher/aes_x86ni_cbcenc.c
297+	symcipher/aes_x86ni_ctr.c
298+	symcipher/aes_x86ni_ctrcbc.c
299+	symcipher/chacha20_ct.c
300+	symcipher/chacha20_sse2.c
301+	symcipher/des_ct.c
302+	symcipher/des_ct_cbcdec.c
303+	symcipher/des_ct_cbcenc.c
304+	symcipher/des_support.c
305+	symcipher/des_tab.c
306+	symcipher/des_tab_cbcdec.c
307+	symcipher/des_tab_cbcenc.c
308+	symcipher/poly1305_ctmul.c
309+	symcipher/poly1305_ctmul32.c
310+	symcipher/poly1305_ctmulq.c
311+	symcipher/poly1305_i15.c
312+	x509/asn1enc.c
313+	x509/encode_ec_pk8der.c
314+	x509/encode_ec_rawder.c
315+	x509/encode_rsa_pk8der.c
316+	x509/encode_rsa_rawder.c
317+	x509/skey_decoder.c
318+	x509/x509_decoder.c
319+	x509/x509_knownkey.c
320+	x509/x509_minimal.c
321+	x509/x509_minimal_full.c
322+)]])
323+file('lib/libbearssl.a', '644', '$outdir/libbearssl.a')
324+
325+exe('brssl', [[
326+	tools/(
327+		brssl.c
328+		certs.c
329+		chain.c
330+		client.c
331+		errors.c
332+		files.c
333+		impl.c
334+		keys.c
335+		names.c
336+		server.c
337+		skey.c
338+		sslio.c
339+		ta.c
340+		twrch.c
341+		vector.c
342+		verify.c
343+		xmem.c
344+	)
345+	libbearssl.a
346+]])
347+file('bin/brssl', '755', '$outdir/brssl')
348+
349+fetch 'git'
+25, -0
 1@@ -0,0 +1,25 @@
 2+From a5c3ea02385205858128e414873a0150cd8bceda Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 31 Jan 2020 15:11:32 -0800
 5+Subject: [PATCH] Add missing return in client single EC choose function
 6+
 7+Otherwise, static ECDH is never selected.
 8+---
 9+ src/ssl/ssl_ccert_single_ec.c | 1 +
10+ 1 file changed, 1 insertion(+)
11+
12+diff --git a/src/ssl/ssl_ccert_single_ec.c b/src/ssl/ssl_ccert_single_ec.c
13+index 93ebcde..2e1e54f 100644
14+--- a/src/ssl/ssl_ccert_single_ec.c
15++++ b/src/ssl/ssl_ccert_single_ec.c
16+@@ -69,6 +69,7 @@ cc_choose(const br_ssl_client_certificate_class **pctx,
17+ 			choices->hash_id = -1;
18+ 			choices->chain = zc->chain;
19+ 			choices->chain_len = zc->chain_len;
20++			return;
21+ 		}
22+ 	}
23+ 
24+-- 
25+2.25.0
26+
+60, -0
 1@@ -0,0 +1,60 @@
 2+From 89dfcdd084486a728c347e14ec619cd46c430ffd Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 26 Mar 2020 14:17:19 -0700
 5+Subject: [PATCH] Add functions to retrieve certificate validity period from
 6+ br_x509_decoder.
 7+
 8+---
 9+ inc/bearssl_x509.h | 36 ++++++++++++++++++++++++++++++++++++
10+ 1 file changed, 36 insertions(+)
11+
12+diff --git a/inc/bearssl_x509.h b/inc/bearssl_x509.h
13+index 7668e1d..a50b8fe 100644
14+--- a/inc/bearssl_x509.h
15++++ b/inc/bearssl_x509.h
16+@@ -1122,6 +1122,42 @@ br_x509_decoder_last_error(br_x509_decoder_context *ctx)
17+ 	return 0;
18+ }
19+ 
20++/**
21++ * \brief Get the time when the certificate becomes valid.
22++ *
23++ * The time is represented the same as in `br_x509_minimal_set_time()`.
24++ * These values should not be read before decoding completed successfully.
25++ *
26++ * \param ctx      X.509 decoder context.
27++ * \param days     receives the days since January 1st, 0 AD.
28++ * \param seconds  receives the seconds since midnight (0 to 86400).
29++ */
30++static inline void
31++br_x509_decoder_get_notbefore(br_x509_decoder_context *ctx,
32++	uint32_t *days, uint32_t *seconds)
33++{
34++	*days = ctx->notbefore_days;
35++	*seconds = ctx->notbefore_seconds;
36++}
37++
38++/**
39++ * \brief Get the time when the certificate is no longer valid.
40++ *
41++ * The time is represented the same as in `br_x509_minimal_set_time()`.
42++ * These values should not be read before decoding completed successfully.
43++ *
44++ * \param ctx      X.509 decoder context.
45++ * \param days     receives the days since January 1st, 0 AD.
46++ * \param seconds  receives the seconds since midnight (0 to 86400).
47++ */
48++static inline void
49++br_x509_decoder_get_notafter(br_x509_decoder_context *ctx,
50++	uint32_t *days, uint32_t *seconds)
51++{
52++	*days = ctx->notafter_days;
53++	*seconds = ctx->notafter_seconds;
54++}
55++
56+ /**
57+  * \brief Get the "isCA" flag from an X.509 decoder context.
58+  *
59+-- 
60+2.35.1
61+
+684, -0
  1@@ -0,0 +1,684 @@
  2+From d38bae03bd7fac28fb4daa1df922d18d7a5a107a Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Thu, 13 May 2021 22:14:48 -0700
  5+Subject: [PATCH] Add flag to send CertificateRequest
  6+
  7+---
  8+ inc/bearssl_ssl.h        |  10 +
  9+ src/ssl/ssl_hs_server.c  | 606 +++++++++++++++++++--------------------
 10+ src/ssl/ssl_hs_server.t0 |   4 +-
 11+ 3 files changed, 315 insertions(+), 305 deletions(-)
 12+
 13+diff --git a/inc/bearssl_ssl.h b/inc/bearssl_ssl.h
 14+index e91df47..245c08a 100644
 15+--- a/inc/bearssl_ssl.h
 16++++ b/inc/bearssl_ssl.h
 17+@@ -1235,6 +1235,16 @@ br_ssl_engine_remove_flags(br_ssl_engine_context *cc, uint32_t flags)
 18+  */
 19+ #define BR_OPT_FAIL_ON_ALPN_MISMATCH           ((uint32_t)1 << 3)
 20+ 
 21++/**
 22++ * \brief Behavioural flag: always request client certificate.
 23++ *
 24++ * If this flag is set on a server, then a client certificate is requested,
 25++ * even if no trust anchors names were configured with
 26++ * `br_ssl_server_set_trust_anchor_names()` or
 27++ * `br_ssl_server_set_trust_anchor_names_alt()`.
 28++ */
 29++#define BR_OPT_REQUEST_CLIENT_CERT             ((uint32_t)1 << 4)
 30++
 31+ /**
 32+  * \brief Set the minimum and maximum supported protocol versions.
 33+  *
 34+diff --git a/src/ssl/ssl_hs_server.c b/src/ssl/ssl_hs_server.c
 35+index 5f8cae7..9547899 100644
 36+--- a/src/ssl/ssl_hs_server.c
 37++++ b/src/ssl/ssl_hs_server.c
 38+@@ -547,247 +547,247 @@ static const unsigned char t0_codeblock[] = {
 39+ 	0x13, 0x06, 0x02, 0x71, 0x2B, 0xD0, 0x04, 0x76, 0x00, 0x01, 0x00, 0x77,
 40+ 	0x42, 0x01, 0x16, 0x89, 0x42, 0x01, 0x00, 0x8C, 0x40, 0x36, 0xB1, 0x35,
 41+ 	0x06, 0x02, 0x73, 0x2B, 0x06, 0x0A, 0xD7, 0x01, 0x00, 0xD3, 0x01, 0x00,
 42+-	0xAD, 0x04, 0x80, 0x46, 0xD7, 0xD4, 0x29, 0xD9, 0x50, 0x06, 0x01, 0xD5,
 43+-	0xD8, 0x2C, 0x50, 0x06, 0x31, 0x01, 0x00, 0xAE, 0x2A, 0x5D, 0x06, 0x0F,
 44+-	0x01, 0x02, 0xA4, 0x05, 0x02, 0x37, 0x2B, 0x29, 0xB2, 0xB0, 0x2A, 0xC9,
 45+-	0x29, 0x04, 0x19, 0x2A, 0x5F, 0x06, 0x0B, 0x29, 0x01, 0x02, 0xA4, 0x05,
 46+-	0x02, 0x70, 0x2B, 0xB2, 0x04, 0x0A, 0xB4, 0x2A, 0x05, 0x04, 0x29, 0xAB,
 47+-	0x04, 0x02, 0xB3, 0xAF, 0x04, 0x01, 0xB2, 0x01, 0x00, 0xAD, 0x01, 0x00,
 48+-	0xD3, 0x3E, 0x01, 0x01, 0x77, 0x42, 0x01, 0x17, 0x89, 0x42, 0x00, 0x00,
 49+-	0x3A, 0x3A, 0x00, 0x01, 0x03, 0x00, 0x2C, 0x19, 0x38, 0x06, 0x04, 0xCF,
 50+-	0x29, 0x04, 0x78, 0x01, 0x02, 0x02, 0x00, 0xC6, 0x19, 0x38, 0x06, 0x04,
 51+-	0xCF, 0x29, 0x04, 0x78, 0x02, 0x00, 0x01, 0x84, 0x00, 0x08, 0x2B, 0x00,
 52+-	0x00, 0x81, 0x2F, 0x47, 0x12, 0x01, 0x01, 0x13, 0x37, 0x00, 0x00, 0x2A,
 53+-	0x05, 0x04, 0x29, 0x01, 0x7F, 0x00, 0x01, 0x00, 0xA2, 0x12, 0x01, 0x01,
 54+-	0x13, 0x5F, 0x06, 0x03, 0x61, 0x04, 0x75, 0x47, 0x29, 0x00, 0x00, 0x01,
 55+-	0x7F, 0xA1, 0xCF, 0x2A, 0x01, 0x07, 0x13, 0x01, 0x00, 0x3A, 0x0F, 0x06,
 56+-	0x0D, 0x29, 0x01, 0x10, 0x13, 0x06, 0x05, 0x01, 0x00, 0x77, 0x42, 0xC5,
 57+-	0x04, 0x33, 0x01, 0x01, 0x3A, 0x0F, 0x06, 0x2A, 0x29, 0x29, 0x8A, 0x30,
 58+-	0x01, 0x01, 0x0F, 0x01, 0x01, 0xA4, 0x39, 0x06, 0x18, 0xC8, 0x2C, 0x19,
 59+-	0x38, 0x06, 0x04, 0xCF, 0x29, 0x04, 0x78, 0x01, 0x80, 0x64, 0xC7, 0x01,
 60+-	0x01, 0x77, 0x42, 0x01, 0x17, 0x89, 0x42, 0x04, 0x03, 0x01, 0x00, 0xA1,
 61+-	0x04, 0x03, 0x73, 0x2B, 0x29, 0x04, 0xFF, 0x32, 0x01, 0x2A, 0x03, 0x00,
 62+-	0x09, 0x2A, 0x5D, 0x06, 0x02, 0x6A, 0x2B, 0x02, 0x00, 0x00, 0x00, 0x9C,
 63+-	0x01, 0x0F, 0x13, 0x00, 0x00, 0x76, 0x30, 0x01, 0x00, 0x3A, 0x0F, 0x06,
 64+-	0x10, 0x29, 0x2A, 0x01, 0x01, 0x0E, 0x06, 0x03, 0x29, 0x01, 0x02, 0x76,
 65+-	0x42, 0x01, 0x00, 0x04, 0x21, 0x01, 0x01, 0x3A, 0x0F, 0x06, 0x14, 0x29,
 66+-	0x01, 0x00, 0x76, 0x42, 0x2A, 0x01, 0x80, 0x64, 0x0F, 0x06, 0x05, 0x01,
 67+-	0x82, 0x00, 0x08, 0x2B, 0x5F, 0x04, 0x07, 0x29, 0x01, 0x82, 0x00, 0x08,
 68+-	0x2B, 0x29, 0x00, 0x00, 0x01, 0x00, 0x31, 0x06, 0x05, 0x3D, 0xA9, 0x39,
 69+-	0x04, 0x78, 0x2A, 0x06, 0x04, 0x01, 0x01, 0x91, 0x42, 0x00, 0x00, 0x01,
 70+-	0x1F, 0x13, 0x01, 0x12, 0x0F, 0x05, 0x02, 0x74, 0x2B, 0x78, 0x2E, 0x2A,
 71+-	0xCB, 0x05, 0x02, 0x73, 0x2B, 0xA8, 0x28, 0x00, 0x02, 0x87, 0x2E, 0x05,
 72+-	0x02, 0xBC, 0x00, 0xC0, 0xA7, 0xC0, 0xA7, 0x01, 0x7E, 0x03, 0x00, 0x2A,
 73+-	0x06, 0x17, 0xC2, 0x2A, 0x03, 0x01, 0x85, 0x47, 0xB6, 0x02, 0x01, 0x51,
 74+-	0x2A, 0x02, 0x00, 0x53, 0x06, 0x04, 0x03, 0x00, 0x04, 0x01, 0x29, 0x04,
 75+-	0x66, 0x9D, 0x9D, 0x02, 0x00, 0x61, 0x8C, 0x40, 0x00, 0x00, 0x31, 0x06,
 76+-	0x0B, 0x88, 0x30, 0x01, 0x14, 0x0E, 0x06, 0x02, 0x73, 0x2B, 0x04, 0x11,
 77+-	0xCF, 0x01, 0x07, 0x13, 0x2A, 0x01, 0x02, 0x0E, 0x06, 0x06, 0x06, 0x02,
 78+-	0x73, 0x2B, 0x04, 0x70, 0x29, 0xC3, 0x01, 0x01, 0x0E, 0x35, 0x39, 0x06,
 79+-	0x02, 0x66, 0x2B, 0x2A, 0x01, 0x01, 0xCA, 0x38, 0xB5, 0x00, 0x01, 0xBA,
 80+-	0x01, 0x0B, 0x0F, 0x05, 0x02, 0x73, 0x2B, 0x2A, 0x01, 0x03, 0x0F, 0x06,
 81+-	0x08, 0xC1, 0x06, 0x02, 0x6A, 0x2B, 0x47, 0x29, 0x00, 0x47, 0x5C, 0xC1,
 82+-	0xA7, 0x2A, 0x06, 0x23, 0xC1, 0xA7, 0x2A, 0x5B, 0x2A, 0x06, 0x18, 0x2A,
 83+-	0x01, 0x82, 0x00, 0x10, 0x06, 0x05, 0x01, 0x82, 0x00, 0x04, 0x01, 0x2A,
 84+-	0x03, 0x00, 0x85, 0x02, 0x00, 0xB6, 0x02, 0x00, 0x58, 0x04, 0x65, 0x9D,
 85+-	0x59, 0x04, 0x5A, 0x9D, 0x9D, 0x5A, 0x2A, 0x06, 0x02, 0x37, 0x00, 0x29,
 86+-	0x2D, 0x00, 0x02, 0x2A, 0x01, 0x20, 0x13, 0x05, 0x02, 0x74, 0x2B, 0x01,
 87+-	0x0F, 0x13, 0x03, 0x00, 0xB0, 0x95, 0x2E, 0x01, 0x86, 0x03, 0x11, 0x06,
 88+-	0x23, 0xC0, 0x2A, 0x01, 0x81, 0x7F, 0x13, 0x61, 0x01, 0x01, 0x12, 0x02,
 89+-	0x00, 0x0F, 0x05, 0x02, 0x6C, 0x2B, 0x01, 0x08, 0x12, 0x2A, 0x01, 0x02,
 90+-	0x0B, 0x3A, 0x01, 0x06, 0x10, 0x39, 0x06, 0x02, 0x6E, 0x2B, 0x04, 0x0D,
 91+-	0x02, 0x00, 0x01, 0x01, 0x0F, 0x06, 0x04, 0x01, 0x00, 0x04, 0x02, 0x01,
 92+-	0x02, 0x20, 0x05, 0x02, 0x6E, 0x2B, 0xC0, 0x2A, 0x03, 0x01, 0x2A, 0x01,
 93+-	0x84, 0x00, 0x10, 0x06, 0x02, 0x6F, 0x2B, 0x85, 0x47, 0xB6, 0x02, 0x01,
 94+-	0x55, 0x2A, 0x06, 0x01, 0x2B, 0x29, 0x9D, 0x00, 0x00, 0x1D, 0xBA, 0x01,
 95+-	0x0F, 0x0F, 0x05, 0x02, 0x73, 0x2B, 0x00, 0x0A, 0xBA, 0x01, 0x01, 0x0F,
 96+-	0x05, 0x02, 0x73, 0x2B, 0xC0, 0x2A, 0x03, 0x00, 0x79, 0x40, 0x7A, 0x01,
 97+-	0x20, 0xB6, 0xC2, 0x2A, 0x01, 0x20, 0x10, 0x06, 0x02, 0x72, 0x2B, 0x2A,
 98+-	0x90, 0x42, 0x8F, 0x47, 0xB6, 0x1A, 0x03, 0x01, 0xC0, 0xA7, 0x01, 0x00,
 99+-	0x03, 0x02, 0x01, 0x00, 0x03, 0x03, 0x83, 0xA2, 0x17, 0x3A, 0x08, 0x03,
100+-	0x04, 0x03, 0x05, 0x2A, 0x06, 0x80, 0x6D, 0xC0, 0x2A, 0x03, 0x06, 0x02,
101+-	0x01, 0x06, 0x0A, 0x2A, 0x78, 0x2E, 0x0F, 0x06, 0x04, 0x01, 0x7F, 0x03,
102+-	0x03, 0x2A, 0x01, 0x81, 0x7F, 0x0F, 0x06, 0x0A, 0x8A, 0x30, 0x06, 0x02,
103+-	0x6B, 0x2B, 0x01, 0x7F, 0x03, 0x02, 0x2A, 0x01, 0x81, 0xAC, 0x00, 0x0F,
104+-	0x06, 0x11, 0x02, 0x00, 0x98, 0x2E, 0x11, 0x02, 0x00, 0x97, 0x2E, 0x0B,
105+-	0x13, 0x06, 0x04, 0x01, 0x7F, 0x03, 0x00, 0xC4, 0x2A, 0x5D, 0x06, 0x03,
106+-	0x29, 0x04, 0x26, 0x01, 0x00, 0xA4, 0x06, 0x0B, 0x01, 0x02, 0x0C, 0x7B,
107+-	0x08, 0x02, 0x06, 0x47, 0x40, 0x04, 0x16, 0x29, 0x02, 0x05, 0x02, 0x04,
108+-	0x11, 0x06, 0x02, 0x69, 0x2B, 0x02, 0x06, 0x02, 0x05, 0x40, 0x02, 0x05,
109+-	0x01, 0x04, 0x08, 0x03, 0x05, 0x04, 0xFF, 0x0F, 0x29, 0x01, 0x00, 0x03,
110+-	0x07, 0xC2, 0xA7, 0x2A, 0x06, 0x09, 0xC2, 0x05, 0x04, 0x01, 0x7F, 0x03,
111+-	0x07, 0x04, 0x74, 0x9D, 0x01, 0x00, 0x8D, 0x42, 0x01, 0x88, 0x04, 0x82,
112+-	0x41, 0x01, 0x84, 0x80, 0x80, 0x00, 0x7E, 0x41, 0x2A, 0x06, 0x80, 0x4E,
113+-	0xC0, 0xA7, 0x2A, 0x06, 0x80, 0x47, 0xC0, 0x01, 0x00, 0x3A, 0x0F, 0x06,
114+-	0x04, 0x29, 0xB9, 0x04, 0x39, 0x01, 0x01, 0x3A, 0x0F, 0x06, 0x04, 0x29,
115+-	0xB7, 0x04, 0x2F, 0x01, 0x83, 0xFE, 0x01, 0x3A, 0x0F, 0x06, 0x04, 0x29,
116+-	0xB8, 0x04, 0x23, 0x01, 0x0D, 0x3A, 0x0F, 0x06, 0x04, 0x29, 0xBE, 0x04,
117+-	0x19, 0x01, 0x0A, 0x3A, 0x0F, 0x06, 0x04, 0x29, 0xBF, 0x04, 0x0F, 0x01,
118+-	0x10, 0x3A, 0x0F, 0x06, 0x04, 0x29, 0xAC, 0x04, 0x05, 0x29, 0xBC, 0x01,
119+-	0x00, 0x29, 0x04, 0xFF, 0x35, 0x9D, 0x9D, 0x02, 0x01, 0x02, 0x03, 0x13,
120+-	0x03, 0x01, 0x02, 0x00, 0x5D, 0x06, 0x08, 0x79, 0x2E, 0x99, 0x40, 0x01,
121+-	0x80, 0x56, 0xA3, 0x97, 0x2E, 0x2A, 0x02, 0x00, 0x10, 0x06, 0x03, 0x29,
122+-	0x02, 0x00, 0x2A, 0x01, 0x86, 0x00, 0x0B, 0x06, 0x02, 0x6D, 0x2B, 0x02,
123+-	0x00, 0x98, 0x2E, 0x0B, 0x06, 0x04, 0x01, 0x80, 0x46, 0xA3, 0x02, 0x01,
124+-	0x06, 0x10, 0x95, 0x2E, 0x02, 0x00, 0x0D, 0x06, 0x05, 0x29, 0x95, 0x2E,
125+-	0x04, 0x04, 0x01, 0x00, 0x03, 0x01, 0x2A, 0x95, 0x40, 0x2A, 0x96, 0x40,
126+-	0x2A, 0x99, 0x40, 0x01, 0x86, 0x03, 0x11, 0x03, 0x08, 0x02, 0x02, 0x06,
127+-	0x04, 0x01, 0x02, 0x8A, 0x42, 0x8A, 0x30, 0x05, 0x04, 0x01, 0x01, 0x8A,
128+-	0x42, 0x02, 0x07, 0x05, 0x03, 0x01, 0x28, 0xA3, 0x44, 0x29, 0x01, 0x82,
129+-	0x01, 0x07, 0x01, 0xFC, 0x80, 0x00, 0x39, 0x82, 0x2F, 0x13, 0x2A, 0x82,
130+-	0x41, 0x2A, 0x01, 0x81, 0x7F, 0x13, 0x5E, 0x37, 0x47, 0x01, 0x08, 0x12,
131+-	0x5E, 0x01, 0x02, 0x13, 0x39, 0x01, 0x0C, 0x0C, 0x03, 0x09, 0x7E, 0x2F,
132+-	0x43, 0x13, 0x2A, 0x7E, 0x41, 0x05, 0x04, 0x01, 0x00, 0x03, 0x09, 0x02,
133+-	0x01, 0x06, 0x03, 0x01, 0x7F, 0x00, 0x8F, 0x01, 0x20, 0x34, 0x01, 0x20,
134+-	0x90, 0x42, 0x7B, 0x2A, 0x03, 0x05, 0x2A, 0x02, 0x04, 0x0B, 0x06, 0x80,
135+-	0x49, 0x2A, 0x2E, 0x2A, 0x9C, 0x2A, 0x01, 0x0C, 0x12, 0x2A, 0x01, 0x01,
136+-	0x0F, 0x47, 0x01, 0x02, 0x0F, 0x39, 0x06, 0x0A, 0x2A, 0x02, 0x09, 0x13,
137+-	0x05, 0x04, 0x65, 0x01, 0x00, 0x2A, 0x02, 0x08, 0x05, 0x0E, 0x2A, 0x01,
138+-	0x81, 0x70, 0x13, 0x01, 0x20, 0x0E, 0x06, 0x04, 0x65, 0x01, 0x00, 0x2A,
139+-	0x2A, 0x06, 0x10, 0x02, 0x05, 0x63, 0x40, 0x02, 0x05, 0x40, 0x02, 0x05,
140+-	0x01, 0x04, 0x08, 0x03, 0x05, 0x04, 0x01, 0x65, 0x01, 0x04, 0x08, 0x04,
141+-	0xFF, 0x30, 0x29, 0x02, 0x05, 0x7B, 0x09, 0x01, 0x02, 0x12, 0x2A, 0x05,
142+-	0x03, 0x01, 0x28, 0xA3, 0x7C, 0x42, 0x8C, 0x2E, 0x01, 0x83, 0xFF, 0x7F,
143+-	0x0F, 0x06, 0x0D, 0x01, 0x03, 0xA4, 0x06, 0x04, 0x01, 0x80, 0x78, 0xA3,
144+-	0x01, 0x00, 0x8C, 0x40, 0x18, 0x05, 0x03, 0x01, 0x28, 0xA3, 0x01, 0x00,
145+-	0x00, 0x00, 0xB4, 0xB3, 0x00, 0x04, 0x78, 0x2E, 0xCE, 0x06, 0x16, 0xC0,
146+-	0x2A, 0x01, 0x84, 0x00, 0x10, 0x06, 0x02, 0x6F, 0x2B, 0x2A, 0x03, 0x00,
147+-	0x85, 0x47, 0xB6, 0x02, 0x00, 0x78, 0x2E, 0xA8, 0x27, 0x78, 0x2E, 0x2A,
148+-	0xCC, 0x47, 0xCB, 0x03, 0x01, 0x03, 0x02, 0x02, 0x01, 0x02, 0x02, 0x39,
149+-	0x06, 0x14, 0xC2, 0x2A, 0x03, 0x03, 0x85, 0x47, 0xB6, 0x02, 0x03, 0x78,
150+-	0x2E, 0xA8, 0x02, 0x02, 0x06, 0x03, 0x26, 0x04, 0x01, 0x24, 0x9D, 0x00,
151+-	0x00, 0xBA, 0x01, 0x10, 0x0F, 0x05, 0x02, 0x73, 0x2B, 0x00, 0x00, 0x9E,
152+-	0xBA, 0x01, 0x14, 0x0E, 0x06, 0x02, 0x73, 0x2B, 0x85, 0x01, 0x0C, 0x08,
153+-	0x01, 0x0C, 0xB6, 0x9D, 0x85, 0x2A, 0x01, 0x0C, 0x08, 0x01, 0x0C, 0x32,
154+-	0x05, 0x02, 0x67, 0x2B, 0x00, 0x02, 0x03, 0x00, 0x03, 0x01, 0x02, 0x00,
155+-	0x9A, 0x02, 0x01, 0x02, 0x00, 0x3C, 0x2A, 0x01, 0x00, 0x0F, 0x06, 0x02,
156+-	0x65, 0x00, 0xD1, 0x04, 0x74, 0x00, 0xC0, 0x01, 0x01, 0x0E, 0x06, 0x02,
157+-	0x68, 0x2B, 0xC2, 0x2A, 0x2A, 0x5F, 0x47, 0x01, 0x05, 0x11, 0x39, 0x06,
158+-	0x02, 0x68, 0x2B, 0x01, 0x08, 0x08, 0x2A, 0x84, 0x30, 0x0B, 0x06, 0x0D,
159+-	0x2A, 0x01, 0x01, 0x47, 0x0C, 0x3F, 0x2A, 0x84, 0x42, 0x86, 0x42, 0x04,
160+-	0x01, 0x29, 0x00, 0x00, 0xC0, 0x8A, 0x30, 0x01, 0x00, 0x3A, 0x0F, 0x06,
161+-	0x13, 0x29, 0x01, 0x01, 0x0F, 0x05, 0x02, 0x6B, 0x2B, 0xC2, 0x06, 0x02,
162+-	0x6B, 0x2B, 0x01, 0x02, 0x8A, 0x42, 0x04, 0x28, 0x01, 0x02, 0x3A, 0x0F,
163+-	0x06, 0x1F, 0x29, 0x01, 0x0D, 0x0F, 0x05, 0x02, 0x6B, 0x2B, 0xC2, 0x01,
164+-	0x0C, 0x0F, 0x05, 0x02, 0x6B, 0x2B, 0x85, 0x01, 0x0C, 0xB6, 0x8B, 0x85,
165+-	0x01, 0x0C, 0x32, 0x05, 0x02, 0x6B, 0x2B, 0x04, 0x03, 0x6B, 0x2B, 0x29,
166+-	0x00, 0x00, 0xC0, 0xA7, 0xC0, 0xA7, 0x2A, 0x06, 0x1D, 0xC2, 0x06, 0x03,
167+-	0xBC, 0x04, 0x15, 0xC0, 0x2A, 0x01, 0x81, 0x7F, 0x0D, 0x06, 0x0C, 0x2A,
168+-	0x8D, 0x08, 0x01, 0x00, 0x47, 0x42, 0x8D, 0x47, 0xB6, 0x04, 0x01, 0xC9,
169+-	0x04, 0x60, 0x9D, 0x9D, 0x00, 0x00, 0xBB, 0x2A, 0x5F, 0x06, 0x07, 0x29,
170+-	0x06, 0x02, 0x69, 0x2B, 0x04, 0x74, 0x00, 0x00, 0xC3, 0x01, 0x03, 0xC1,
171+-	0x47, 0x29, 0x47, 0x00, 0x00, 0xC0, 0xC9, 0x00, 0x03, 0x01, 0x00, 0x03,
172+-	0x00, 0xC0, 0xA7, 0x2A, 0x06, 0x80, 0x50, 0xC2, 0x03, 0x01, 0xC2, 0x03,
173+-	0x02, 0x02, 0x01, 0x01, 0x08, 0x0F, 0x06, 0x16, 0x02, 0x02, 0x01, 0x0F,
174+-	0x0D, 0x06, 0x0D, 0x01, 0x01, 0x02, 0x02, 0x01, 0x10, 0x08, 0x0C, 0x02,
175+-	0x00, 0x39, 0x03, 0x00, 0x04, 0x2A, 0x02, 0x01, 0x01, 0x02, 0x11, 0x02,
176+-	0x01, 0x01, 0x06, 0x0D, 0x13, 0x02, 0x02, 0x01, 0x01, 0x0F, 0x02, 0x02,
177+-	0x01, 0x03, 0x0F, 0x39, 0x13, 0x06, 0x11, 0x02, 0x00, 0x01, 0x01, 0x02,
178+-	0x02, 0x62, 0x01, 0x02, 0x0C, 0x02, 0x01, 0x08, 0x0C, 0x39, 0x03, 0x00,
179+-	0x04, 0xFF, 0x2C, 0x9D, 0x02, 0x00, 0x00, 0x00, 0xC0, 0xA7, 0xBD, 0x82,
180+-	0x41, 0x9D, 0x00, 0x00, 0xC0, 0xA7, 0xC0, 0xA7, 0x01, 0x00, 0x7E, 0x41,
181+-	0x2A, 0x06, 0x15, 0xC0, 0x2A, 0x01, 0x20, 0x0B, 0x06, 0x0B, 0x01, 0x01,
182+-	0x47, 0x0C, 0x7E, 0x2F, 0x39, 0x7E, 0x41, 0x04, 0x01, 0x29, 0x04, 0x68,
183+-	0x9D, 0x9D, 0x00, 0x00, 0x01, 0x02, 0x9A, 0xC3, 0x01, 0x08, 0x0C, 0xC3,
184+-	0x08, 0x00, 0x00, 0x01, 0x03, 0x9A, 0xC3, 0x01, 0x08, 0x0C, 0xC3, 0x08,
185+-	0x01, 0x08, 0x0C, 0xC3, 0x08, 0x00, 0x00, 0x01, 0x01, 0x9A, 0xC3, 0x00,
186+-	0x00, 0x3D, 0x2A, 0x5D, 0x05, 0x01, 0x00, 0x29, 0xD1, 0x04, 0x76, 0x02,
187+-	0x03, 0x00, 0x94, 0x30, 0x03, 0x01, 0x01, 0x00, 0x2A, 0x02, 0x01, 0x0B,
188+-	0x06, 0x10, 0x2A, 0x01, 0x01, 0x0C, 0x93, 0x08, 0x2E, 0x02, 0x00, 0x0F,
189+-	0x06, 0x01, 0x00, 0x61, 0x04, 0x6A, 0x29, 0x01, 0x7F, 0x00, 0x00, 0x2C,
190+-	0x19, 0x38, 0x06, 0x04, 0xCF, 0x29, 0x04, 0x78, 0x01, 0x16, 0x89, 0x42,
191+-	0x01, 0x00, 0xE2, 0x01, 0x00, 0xE1, 0x2C, 0x01, 0x17, 0x89, 0x42, 0x00,
192+-	0x00, 0x01, 0x15, 0x89, 0x42, 0x47, 0x57, 0x29, 0x57, 0x29, 0x2C, 0x00,
193+-	0x00, 0x01, 0x01, 0x47, 0xC6, 0x00, 0x00, 0xBB, 0x01, 0x01, 0x0F, 0x05,
194+-	0x02, 0x73, 0x2B, 0x2A, 0xC9, 0x29, 0x00, 0x00, 0x47, 0x3A, 0x9A, 0x47,
195+-	0x2A, 0x06, 0x05, 0xC3, 0x29, 0x62, 0x04, 0x78, 0x29, 0x00, 0x02, 0x03,
196+-	0x00, 0x78, 0x2E, 0x9C, 0x03, 0x01, 0x02, 0x01, 0x01, 0x0F, 0x13, 0x02,
197+-	0x01, 0x01, 0x04, 0x12, 0x01, 0x0F, 0x13, 0x02, 0x01, 0x01, 0x08, 0x12,
198+-	0x01, 0x0F, 0x13, 0x01, 0x00, 0x3A, 0x0F, 0x06, 0x10, 0x29, 0x01, 0x00,
199+-	0x01, 0x18, 0x02, 0x00, 0x06, 0x03, 0x4C, 0x04, 0x01, 0x4D, 0x04, 0x81,
200+-	0x0D, 0x01, 0x01, 0x3A, 0x0F, 0x06, 0x10, 0x29, 0x01, 0x01, 0x01, 0x10,
201+-	0x02, 0x00, 0x06, 0x03, 0x4C, 0x04, 0x01, 0x4D, 0x04, 0x80, 0x77, 0x01,
202+-	0x02, 0x3A, 0x0F, 0x06, 0x10, 0x29, 0x01, 0x01, 0x01, 0x20, 0x02, 0x00,
203+-	0x06, 0x03, 0x4C, 0x04, 0x01, 0x4D, 0x04, 0x80, 0x61, 0x01, 0x03, 0x3A,
204+-	0x0F, 0x06, 0x0F, 0x29, 0x29, 0x01, 0x10, 0x02, 0x00, 0x06, 0x03, 0x4A,
205+-	0x04, 0x01, 0x4B, 0x04, 0x80, 0x4C, 0x01, 0x04, 0x3A, 0x0F, 0x06, 0x0E,
206+-	0x29, 0x29, 0x01, 0x20, 0x02, 0x00, 0x06, 0x03, 0x4A, 0x04, 0x01, 0x4B,
207+-	0x04, 0x38, 0x01, 0x05, 0x3A, 0x0F, 0x06, 0x0C, 0x29, 0x29, 0x02, 0x00,
208+-	0x06, 0x03, 0x4E, 0x04, 0x01, 0x4F, 0x04, 0x26, 0x2A, 0x01, 0x09, 0x10,
209+-	0x06, 0x02, 0x6A, 0x2B, 0x47, 0x29, 0x2A, 0x01, 0x01, 0x13, 0x01, 0x04,
210+-	0x0C, 0x01, 0x10, 0x08, 0x47, 0x01, 0x08, 0x13, 0x01, 0x10, 0x47, 0x09,
211+-	0x02, 0x00, 0x06, 0x03, 0x48, 0x04, 0x01, 0x49, 0x00, 0x29, 0x00, 0x00,
212+-	0x9C, 0x01, 0x0C, 0x12, 0x01, 0x02, 0x10, 0x00, 0x00, 0x9C, 0x01, 0x0C,
213+-	0x12, 0x2A, 0x60, 0x47, 0x01, 0x03, 0x0B, 0x13, 0x00, 0x00, 0x9C, 0x01,
214+-	0x0C, 0x12, 0x01, 0x01, 0x0F, 0x00, 0x00, 0x9C, 0x01, 0x0C, 0x12, 0x5F,
215+-	0x00, 0x00, 0x1B, 0x01, 0x00, 0x75, 0x30, 0x2A, 0x06, 0x22, 0x01, 0x01,
216+-	0x3A, 0x0F, 0x06, 0x06, 0x29, 0x01, 0x00, 0xA0, 0x04, 0x14, 0x01, 0x02,
217+-	0x3A, 0x0F, 0x06, 0x0D, 0x29, 0x77, 0x30, 0x01, 0x01, 0x0F, 0x06, 0x03,
218+-	0x01, 0x10, 0x39, 0x04, 0x01, 0x29, 0x04, 0x01, 0x29, 0x7D, 0x30, 0x05,
219+-	0x33, 0x31, 0x06, 0x30, 0x88, 0x30, 0x01, 0x14, 0x3A, 0x0F, 0x06, 0x06,
220+-	0x29, 0x01, 0x02, 0x39, 0x04, 0x22, 0x01, 0x15, 0x3A, 0x0F, 0x06, 0x09,
221+-	0x29, 0xAA, 0x06, 0x03, 0x01, 0x7F, 0xA0, 0x04, 0x13, 0x01, 0x16, 0x3A,
222+-	0x0F, 0x06, 0x06, 0x29, 0x01, 0x01, 0x39, 0x04, 0x07, 0x29, 0x01, 0x04,
223+-	0x39, 0x01, 0x00, 0x29, 0x19, 0x06, 0x03, 0x01, 0x08, 0x39, 0x00, 0x00,
224+-	0x1B, 0x2A, 0x05, 0x13, 0x31, 0x06, 0x10, 0x88, 0x30, 0x01, 0x15, 0x0F,
225+-	0x06, 0x08, 0x29, 0xAA, 0x01, 0x00, 0x77, 0x42, 0x04, 0x01, 0x23, 0x00,
226+-	0x00, 0xCF, 0x01, 0x07, 0x13, 0x01, 0x01, 0x10, 0x06, 0x02, 0x73, 0x2B,
227+-	0x00, 0x01, 0x03, 0x00, 0x2C, 0x19, 0x06, 0x05, 0x02, 0x00, 0x89, 0x42,
228+-	0x00, 0xCF, 0x29, 0x04, 0x74, 0x00, 0x01, 0x14, 0xD2, 0x01, 0x01, 0xE2,
229+-	0x2C, 0x2A, 0x01, 0x00, 0xCA, 0x01, 0x16, 0xD2, 0xD6, 0x2C, 0x00, 0x00,
230+-	0x01, 0x0B, 0xE2, 0x52, 0x2A, 0x2A, 0x01, 0x03, 0x08, 0xE1, 0xE1, 0x14,
231+-	0x2A, 0x5D, 0x06, 0x02, 0x29, 0x00, 0xE1, 0x1E, 0x2A, 0x06, 0x05, 0x85,
232+-	0x47, 0xDA, 0x04, 0x77, 0x29, 0x04, 0x6C, 0x00, 0x01, 0x00, 0xDC, 0x95,
233+-	0x2E, 0x01, 0x86, 0x03, 0x11, 0x06, 0x05, 0x63, 0x01, 0x00, 0xDD, 0x08,
234+-	0x50, 0x08, 0x01, 0x03, 0x08, 0x01, 0x0D, 0xE2, 0xE1, 0x01, 0x00, 0xDC,
235+-	0xE2, 0x01, 0x01, 0xDC, 0x29, 0x95, 0x2E, 0x01, 0x86, 0x03, 0x11, 0x06,
236+-	0x08, 0x01, 0x00, 0xDD, 0xE0, 0x01, 0x01, 0xDD, 0x29, 0x50, 0xE0, 0x16,
237+-	0x15, 0x2A, 0x5D, 0x06, 0x02, 0x29, 0x00, 0xE0, 0x1F, 0x2A, 0x06, 0x05,
238+-	0x85, 0x47, 0xDA, 0x04, 0x77, 0x29, 0x04, 0x6C, 0x00, 0x9E, 0x01, 0x14,
239+-	0xE2, 0x01, 0x0C, 0xE1, 0x85, 0x01, 0x0C, 0xDA, 0x00, 0x04, 0x03, 0x00,
240+-	0x01, 0x02, 0xE2, 0x01, 0x80, 0x46, 0x8A, 0x30, 0x01, 0x02, 0x0F, 0x06,
241+-	0x0C, 0x02, 0x00, 0x06, 0x04, 0x01, 0x05, 0x04, 0x02, 0x01, 0x1D, 0x04,
242+-	0x02, 0x01, 0x00, 0x03, 0x01, 0x86, 0x30, 0x06, 0x04, 0x01, 0x05, 0x04,
243+-	0x02, 0x01, 0x00, 0x03, 0x02, 0x8C, 0x2E, 0x2A, 0x06, 0x05, 0x62, 0x21,
244+-	0x01, 0x07, 0x08, 0x03, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x02, 0x03,
245+-	0x08, 0x2A, 0x06, 0x03, 0x01, 0x02, 0x08, 0x08, 0xE1, 0x95, 0x2E, 0xE0,
246+-	0x8E, 0x01, 0x04, 0x17, 0x8E, 0x01, 0x04, 0x08, 0x01, 0x1C, 0x34, 0x8E,
247+-	0x01, 0x20, 0xDA, 0x01, 0x20, 0xE2, 0x8F, 0x01, 0x20, 0xDA, 0x78, 0x2E,
248+-	0xE0, 0x01, 0x00, 0xE2, 0x02, 0x01, 0x02, 0x02, 0x08, 0x02, 0x03, 0x08,
249+-	0x2A, 0x06, 0x80, 0x40, 0xE0, 0x02, 0x01, 0x2A, 0x06, 0x10, 0x01, 0x83,
250+-	0xFE, 0x01, 0xE0, 0x01, 0x04, 0x09, 0x2A, 0xE0, 0x62, 0x8B, 0x47, 0xDB,
251+-	0x04, 0x01, 0x29, 0x02, 0x02, 0x06, 0x0C, 0x01, 0x01, 0xE0, 0x01, 0x01,
252+-	0xE0, 0x86, 0x30, 0x01, 0x08, 0x09, 0xE2, 0x02, 0x03, 0x2A, 0x06, 0x11,
253+-	0x01, 0x10, 0xE0, 0x01, 0x04, 0x09, 0x2A, 0xE0, 0x64, 0x2A, 0xE0, 0x62,
254+-	0x85, 0x47, 0xDB, 0x04, 0x01, 0x29, 0x04, 0x01, 0x29, 0x00, 0x00, 0x01,
255+-	0x0E, 0xE2, 0x01, 0x00, 0xE1, 0x00, 0x03, 0x78, 0x2E, 0xCC, 0x05, 0x01,
256+-	0x00, 0x7E, 0x2F, 0x2A, 0x01, 0x82, 0x80, 0x80, 0x80, 0x00, 0x13, 0x06,
257+-	0x05, 0x29, 0x01, 0x1D, 0x04, 0x0E, 0x2A, 0x01, 0x83, 0xC0, 0x80, 0x80,
258+-	0x00, 0x13, 0x2A, 0x06, 0x01, 0x47, 0x29, 0xA5, 0x03, 0x00, 0x02, 0x00,
259+-	0x25, 0x2A, 0x5D, 0x06, 0x02, 0x37, 0x2B, 0x03, 0x01, 0x95, 0x2E, 0x01,
260+-	0x86, 0x03, 0x11, 0x03, 0x02, 0x01, 0x0C, 0xE2, 0x02, 0x01, 0x80, 0x30,
261+-	0x08, 0x02, 0x02, 0x01, 0x02, 0x13, 0x08, 0x01, 0x06, 0x08, 0xE1, 0x01,
262+-	0x03, 0xE2, 0x02, 0x00, 0xE0, 0x7F, 0x80, 0x30, 0xDB, 0x02, 0x02, 0x06,
263+-	0x1C, 0x92, 0x2E, 0x2A, 0x01, 0x83, 0xFE, 0x00, 0x0B, 0x06, 0x03, 0xE0,
264+-	0x04, 0x0F, 0x01, 0x81, 0x7F, 0x13, 0xE2, 0x78, 0x2E, 0xCD, 0x01, 0x01,
265+-	0x0C, 0x01, 0x03, 0x08, 0xE2, 0x02, 0x01, 0xE0, 0x85, 0x02, 0x01, 0xDA,
266+-	0x00, 0x00, 0x56, 0x2A, 0x01, 0x00, 0x0F, 0x06, 0x02, 0x65, 0x00, 0xCF,
267+-	0x29, 0x04, 0x73, 0x00, 0x2A, 0xE2, 0xDA, 0x00, 0x00, 0x01, 0x00, 0x78,
268+-	0x2E, 0xCB, 0x06, 0x0C, 0x63, 0x3A, 0x06, 0x08, 0x01, 0x80, 0x41, 0xE2,
269+-	0x01, 0x80, 0x42, 0xE2, 0x46, 0x06, 0x07, 0x61, 0x3A, 0x06, 0x03, 0x01,
270+-	0x01, 0xE2, 0x45, 0x06, 0x08, 0x61, 0x3A, 0x06, 0x04, 0x01, 0x80, 0x40,
271+-	0xE2, 0x47, 0x29, 0x00, 0x01, 0x01, 0x00, 0x03, 0x00, 0x46, 0x45, 0x39,
272+-	0x05, 0x14, 0x01, 0x01, 0x01, 0x80, 0x7C, 0xDE, 0x03, 0x00, 0x01, 0x03,
273+-	0x01, 0x80, 0x7C, 0xDE, 0x02, 0x00, 0x08, 0x47, 0x29, 0x00, 0x46, 0x06,
274+-	0x07, 0x01, 0x01, 0x44, 0x29, 0xDE, 0x03, 0x00, 0x45, 0x06, 0x0A, 0x01,
275+-	0x03, 0x44, 0x29, 0xDE, 0x02, 0x00, 0x08, 0x03, 0x00, 0x29, 0x02, 0x00,
276+-	0x00, 0x00, 0x01, 0x00, 0x01, 0x04, 0xDF, 0x01, 0x05, 0xDF, 0x01, 0x06,
277+-	0xDF, 0x01, 0x03, 0xDF, 0x01, 0x02, 0xDF, 0x0A, 0x65, 0x00, 0x01, 0x03,
278+-	0x00, 0x3A, 0x01, 0x01, 0x02, 0x00, 0x0C, 0x13, 0x05, 0x01, 0x00, 0x63,
279+-	0x01, 0x03, 0x3B, 0x06, 0x07, 0x02, 0x00, 0xE2, 0x01, 0x02, 0x3B, 0xE2,
280+-	0x00, 0x00, 0x2A, 0x01, 0x08, 0x54, 0xE2, 0xE2, 0x00, 0x00, 0x2A, 0x01,
281+-	0x10, 0x54, 0xE2, 0xE0, 0x00, 0x00, 0x2A, 0x57, 0x06, 0x02, 0x29, 0x00,
282+-	0xCF, 0x29, 0x04, 0x76
283++	0xAD, 0x04, 0x80, 0x4E, 0xD7, 0xD4, 0x29, 0xD9, 0x50, 0x01, 0x04, 0xA4,
284++	0x39, 0x06, 0x01, 0xD5, 0xD8, 0x2C, 0x50, 0x01, 0x04, 0xA4, 0x39, 0x06,
285++	0x31, 0x01, 0x00, 0xAE, 0x2A, 0x5D, 0x06, 0x0F, 0x01, 0x02, 0xA4, 0x05,
286++	0x02, 0x37, 0x2B, 0x29, 0xB2, 0xB0, 0x2A, 0xC9, 0x29, 0x04, 0x19, 0x2A,
287++	0x5F, 0x06, 0x0B, 0x29, 0x01, 0x02, 0xA4, 0x05, 0x02, 0x70, 0x2B, 0xB2,
288++	0x04, 0x0A, 0xB4, 0x2A, 0x05, 0x04, 0x29, 0xAB, 0x04, 0x02, 0xB3, 0xAF,
289++	0x04, 0x01, 0xB2, 0x01, 0x00, 0xAD, 0x01, 0x00, 0xD3, 0x3E, 0x01, 0x01,
290++	0x77, 0x42, 0x01, 0x17, 0x89, 0x42, 0x00, 0x00, 0x3A, 0x3A, 0x00, 0x01,
291++	0x03, 0x00, 0x2C, 0x19, 0x38, 0x06, 0x04, 0xCF, 0x29, 0x04, 0x78, 0x01,
292++	0x02, 0x02, 0x00, 0xC6, 0x19, 0x38, 0x06, 0x04, 0xCF, 0x29, 0x04, 0x78,
293++	0x02, 0x00, 0x01, 0x84, 0x00, 0x08, 0x2B, 0x00, 0x00, 0x81, 0x2F, 0x47,
294++	0x12, 0x01, 0x01, 0x13, 0x37, 0x00, 0x00, 0x2A, 0x05, 0x04, 0x29, 0x01,
295++	0x7F, 0x00, 0x01, 0x00, 0xA2, 0x12, 0x01, 0x01, 0x13, 0x5F, 0x06, 0x03,
296++	0x61, 0x04, 0x75, 0x47, 0x29, 0x00, 0x00, 0x01, 0x7F, 0xA1, 0xCF, 0x2A,
297++	0x01, 0x07, 0x13, 0x01, 0x00, 0x3A, 0x0F, 0x06, 0x0D, 0x29, 0x01, 0x10,
298++	0x13, 0x06, 0x05, 0x01, 0x00, 0x77, 0x42, 0xC5, 0x04, 0x33, 0x01, 0x01,
299++	0x3A, 0x0F, 0x06, 0x2A, 0x29, 0x29, 0x8A, 0x30, 0x01, 0x01, 0x0F, 0x01,
300++	0x01, 0xA4, 0x39, 0x06, 0x18, 0xC8, 0x2C, 0x19, 0x38, 0x06, 0x04, 0xCF,
301++	0x29, 0x04, 0x78, 0x01, 0x80, 0x64, 0xC7, 0x01, 0x01, 0x77, 0x42, 0x01,
302++	0x17, 0x89, 0x42, 0x04, 0x03, 0x01, 0x00, 0xA1, 0x04, 0x03, 0x73, 0x2B,
303++	0x29, 0x04, 0xFF, 0x32, 0x01, 0x2A, 0x03, 0x00, 0x09, 0x2A, 0x5D, 0x06,
304++	0x02, 0x6A, 0x2B, 0x02, 0x00, 0x00, 0x00, 0x9C, 0x01, 0x0F, 0x13, 0x00,
305++	0x00, 0x76, 0x30, 0x01, 0x00, 0x3A, 0x0F, 0x06, 0x10, 0x29, 0x2A, 0x01,
306++	0x01, 0x0E, 0x06, 0x03, 0x29, 0x01, 0x02, 0x76, 0x42, 0x01, 0x00, 0x04,
307++	0x21, 0x01, 0x01, 0x3A, 0x0F, 0x06, 0x14, 0x29, 0x01, 0x00, 0x76, 0x42,
308++	0x2A, 0x01, 0x80, 0x64, 0x0F, 0x06, 0x05, 0x01, 0x82, 0x00, 0x08, 0x2B,
309++	0x5F, 0x04, 0x07, 0x29, 0x01, 0x82, 0x00, 0x08, 0x2B, 0x29, 0x00, 0x00,
310++	0x01, 0x00, 0x31, 0x06, 0x05, 0x3D, 0xA9, 0x39, 0x04, 0x78, 0x2A, 0x06,
311++	0x04, 0x01, 0x01, 0x91, 0x42, 0x00, 0x00, 0x01, 0x1F, 0x13, 0x01, 0x12,
312++	0x0F, 0x05, 0x02, 0x74, 0x2B, 0x78, 0x2E, 0x2A, 0xCB, 0x05, 0x02, 0x73,
313++	0x2B, 0xA8, 0x28, 0x00, 0x02, 0x87, 0x2E, 0x05, 0x02, 0xBC, 0x00, 0xC0,
314++	0xA7, 0xC0, 0xA7, 0x01, 0x7E, 0x03, 0x00, 0x2A, 0x06, 0x17, 0xC2, 0x2A,
315++	0x03, 0x01, 0x85, 0x47, 0xB6, 0x02, 0x01, 0x51, 0x2A, 0x02, 0x00, 0x53,
316++	0x06, 0x04, 0x03, 0x00, 0x04, 0x01, 0x29, 0x04, 0x66, 0x9D, 0x9D, 0x02,
317++	0x00, 0x61, 0x8C, 0x40, 0x00, 0x00, 0x31, 0x06, 0x0B, 0x88, 0x30, 0x01,
318++	0x14, 0x0E, 0x06, 0x02, 0x73, 0x2B, 0x04, 0x11, 0xCF, 0x01, 0x07, 0x13,
319++	0x2A, 0x01, 0x02, 0x0E, 0x06, 0x06, 0x06, 0x02, 0x73, 0x2B, 0x04, 0x70,
320++	0x29, 0xC3, 0x01, 0x01, 0x0E, 0x35, 0x39, 0x06, 0x02, 0x66, 0x2B, 0x2A,
321++	0x01, 0x01, 0xCA, 0x38, 0xB5, 0x00, 0x01, 0xBA, 0x01, 0x0B, 0x0F, 0x05,
322++	0x02, 0x73, 0x2B, 0x2A, 0x01, 0x03, 0x0F, 0x06, 0x08, 0xC1, 0x06, 0x02,
323++	0x6A, 0x2B, 0x47, 0x29, 0x00, 0x47, 0x5C, 0xC1, 0xA7, 0x2A, 0x06, 0x23,
324++	0xC1, 0xA7, 0x2A, 0x5B, 0x2A, 0x06, 0x18, 0x2A, 0x01, 0x82, 0x00, 0x10,
325++	0x06, 0x05, 0x01, 0x82, 0x00, 0x04, 0x01, 0x2A, 0x03, 0x00, 0x85, 0x02,
326++	0x00, 0xB6, 0x02, 0x00, 0x58, 0x04, 0x65, 0x9D, 0x59, 0x04, 0x5A, 0x9D,
327++	0x9D, 0x5A, 0x2A, 0x06, 0x02, 0x37, 0x00, 0x29, 0x2D, 0x00, 0x02, 0x2A,
328++	0x01, 0x20, 0x13, 0x05, 0x02, 0x74, 0x2B, 0x01, 0x0F, 0x13, 0x03, 0x00,
329++	0xB0, 0x95, 0x2E, 0x01, 0x86, 0x03, 0x11, 0x06, 0x23, 0xC0, 0x2A, 0x01,
330++	0x81, 0x7F, 0x13, 0x61, 0x01, 0x01, 0x12, 0x02, 0x00, 0x0F, 0x05, 0x02,
331++	0x6C, 0x2B, 0x01, 0x08, 0x12, 0x2A, 0x01, 0x02, 0x0B, 0x3A, 0x01, 0x06,
332++	0x10, 0x39, 0x06, 0x02, 0x6E, 0x2B, 0x04, 0x0D, 0x02, 0x00, 0x01, 0x01,
333++	0x0F, 0x06, 0x04, 0x01, 0x00, 0x04, 0x02, 0x01, 0x02, 0x20, 0x05, 0x02,
334++	0x6E, 0x2B, 0xC0, 0x2A, 0x03, 0x01, 0x2A, 0x01, 0x84, 0x00, 0x10, 0x06,
335++	0x02, 0x6F, 0x2B, 0x85, 0x47, 0xB6, 0x02, 0x01, 0x55, 0x2A, 0x06, 0x01,
336++	0x2B, 0x29, 0x9D, 0x00, 0x00, 0x1D, 0xBA, 0x01, 0x0F, 0x0F, 0x05, 0x02,
337++	0x73, 0x2B, 0x00, 0x0A, 0xBA, 0x01, 0x01, 0x0F, 0x05, 0x02, 0x73, 0x2B,
338++	0xC0, 0x2A, 0x03, 0x00, 0x79, 0x40, 0x7A, 0x01, 0x20, 0xB6, 0xC2, 0x2A,
339++	0x01, 0x20, 0x10, 0x06, 0x02, 0x72, 0x2B, 0x2A, 0x90, 0x42, 0x8F, 0x47,
340++	0xB6, 0x1A, 0x03, 0x01, 0xC0, 0xA7, 0x01, 0x00, 0x03, 0x02, 0x01, 0x00,
341++	0x03, 0x03, 0x83, 0xA2, 0x17, 0x3A, 0x08, 0x03, 0x04, 0x03, 0x05, 0x2A,
342++	0x06, 0x80, 0x6D, 0xC0, 0x2A, 0x03, 0x06, 0x02, 0x01, 0x06, 0x0A, 0x2A,
343++	0x78, 0x2E, 0x0F, 0x06, 0x04, 0x01, 0x7F, 0x03, 0x03, 0x2A, 0x01, 0x81,
344++	0x7F, 0x0F, 0x06, 0x0A, 0x8A, 0x30, 0x06, 0x02, 0x6B, 0x2B, 0x01, 0x7F,
345++	0x03, 0x02, 0x2A, 0x01, 0x81, 0xAC, 0x00, 0x0F, 0x06, 0x11, 0x02, 0x00,
346++	0x98, 0x2E, 0x11, 0x02, 0x00, 0x97, 0x2E, 0x0B, 0x13, 0x06, 0x04, 0x01,
347++	0x7F, 0x03, 0x00, 0xC4, 0x2A, 0x5D, 0x06, 0x03, 0x29, 0x04, 0x26, 0x01,
348++	0x00, 0xA4, 0x06, 0x0B, 0x01, 0x02, 0x0C, 0x7B, 0x08, 0x02, 0x06, 0x47,
349++	0x40, 0x04, 0x16, 0x29, 0x02, 0x05, 0x02, 0x04, 0x11, 0x06, 0x02, 0x69,
350++	0x2B, 0x02, 0x06, 0x02, 0x05, 0x40, 0x02, 0x05, 0x01, 0x04, 0x08, 0x03,
351++	0x05, 0x04, 0xFF, 0x0F, 0x29, 0x01, 0x00, 0x03, 0x07, 0xC2, 0xA7, 0x2A,
352++	0x06, 0x09, 0xC2, 0x05, 0x04, 0x01, 0x7F, 0x03, 0x07, 0x04, 0x74, 0x9D,
353++	0x01, 0x00, 0x8D, 0x42, 0x01, 0x88, 0x04, 0x82, 0x41, 0x01, 0x84, 0x80,
354++	0x80, 0x00, 0x7E, 0x41, 0x2A, 0x06, 0x80, 0x4E, 0xC0, 0xA7, 0x2A, 0x06,
355++	0x80, 0x47, 0xC0, 0x01, 0x00, 0x3A, 0x0F, 0x06, 0x04, 0x29, 0xB9, 0x04,
356++	0x39, 0x01, 0x01, 0x3A, 0x0F, 0x06, 0x04, 0x29, 0xB7, 0x04, 0x2F, 0x01,
357++	0x83, 0xFE, 0x01, 0x3A, 0x0F, 0x06, 0x04, 0x29, 0xB8, 0x04, 0x23, 0x01,
358++	0x0D, 0x3A, 0x0F, 0x06, 0x04, 0x29, 0xBE, 0x04, 0x19, 0x01, 0x0A, 0x3A,
359++	0x0F, 0x06, 0x04, 0x29, 0xBF, 0x04, 0x0F, 0x01, 0x10, 0x3A, 0x0F, 0x06,
360++	0x04, 0x29, 0xAC, 0x04, 0x05, 0x29, 0xBC, 0x01, 0x00, 0x29, 0x04, 0xFF,
361++	0x35, 0x9D, 0x9D, 0x02, 0x01, 0x02, 0x03, 0x13, 0x03, 0x01, 0x02, 0x00,
362++	0x5D, 0x06, 0x08, 0x79, 0x2E, 0x99, 0x40, 0x01, 0x80, 0x56, 0xA3, 0x97,
363++	0x2E, 0x2A, 0x02, 0x00, 0x10, 0x06, 0x03, 0x29, 0x02, 0x00, 0x2A, 0x01,
364++	0x86, 0x00, 0x0B, 0x06, 0x02, 0x6D, 0x2B, 0x02, 0x00, 0x98, 0x2E, 0x0B,
365++	0x06, 0x04, 0x01, 0x80, 0x46, 0xA3, 0x02, 0x01, 0x06, 0x10, 0x95, 0x2E,
366++	0x02, 0x00, 0x0D, 0x06, 0x05, 0x29, 0x95, 0x2E, 0x04, 0x04, 0x01, 0x00,
367++	0x03, 0x01, 0x2A, 0x95, 0x40, 0x2A, 0x96, 0x40, 0x2A, 0x99, 0x40, 0x01,
368++	0x86, 0x03, 0x11, 0x03, 0x08, 0x02, 0x02, 0x06, 0x04, 0x01, 0x02, 0x8A,
369++	0x42, 0x8A, 0x30, 0x05, 0x04, 0x01, 0x01, 0x8A, 0x42, 0x02, 0x07, 0x05,
370++	0x03, 0x01, 0x28, 0xA3, 0x44, 0x29, 0x01, 0x82, 0x01, 0x07, 0x01, 0xFC,
371++	0x80, 0x00, 0x39, 0x82, 0x2F, 0x13, 0x2A, 0x82, 0x41, 0x2A, 0x01, 0x81,
372++	0x7F, 0x13, 0x5E, 0x37, 0x47, 0x01, 0x08, 0x12, 0x5E, 0x01, 0x02, 0x13,
373++	0x39, 0x01, 0x0C, 0x0C, 0x03, 0x09, 0x7E, 0x2F, 0x43, 0x13, 0x2A, 0x7E,
374++	0x41, 0x05, 0x04, 0x01, 0x00, 0x03, 0x09, 0x02, 0x01, 0x06, 0x03, 0x01,
375++	0x7F, 0x00, 0x8F, 0x01, 0x20, 0x34, 0x01, 0x20, 0x90, 0x42, 0x7B, 0x2A,
376++	0x03, 0x05, 0x2A, 0x02, 0x04, 0x0B, 0x06, 0x80, 0x49, 0x2A, 0x2E, 0x2A,
377++	0x9C, 0x2A, 0x01, 0x0C, 0x12, 0x2A, 0x01, 0x01, 0x0F, 0x47, 0x01, 0x02,
378++	0x0F, 0x39, 0x06, 0x0A, 0x2A, 0x02, 0x09, 0x13, 0x05, 0x04, 0x65, 0x01,
379++	0x00, 0x2A, 0x02, 0x08, 0x05, 0x0E, 0x2A, 0x01, 0x81, 0x70, 0x13, 0x01,
380++	0x20, 0x0E, 0x06, 0x04, 0x65, 0x01, 0x00, 0x2A, 0x2A, 0x06, 0x10, 0x02,
381++	0x05, 0x63, 0x40, 0x02, 0x05, 0x40, 0x02, 0x05, 0x01, 0x04, 0x08, 0x03,
382++	0x05, 0x04, 0x01, 0x65, 0x01, 0x04, 0x08, 0x04, 0xFF, 0x30, 0x29, 0x02,
383++	0x05, 0x7B, 0x09, 0x01, 0x02, 0x12, 0x2A, 0x05, 0x03, 0x01, 0x28, 0xA3,
384++	0x7C, 0x42, 0x8C, 0x2E, 0x01, 0x83, 0xFF, 0x7F, 0x0F, 0x06, 0x0D, 0x01,
385++	0x03, 0xA4, 0x06, 0x04, 0x01, 0x80, 0x78, 0xA3, 0x01, 0x00, 0x8C, 0x40,
386++	0x18, 0x05, 0x03, 0x01, 0x28, 0xA3, 0x01, 0x00, 0x00, 0x00, 0xB4, 0xB3,
387++	0x00, 0x04, 0x78, 0x2E, 0xCE, 0x06, 0x16, 0xC0, 0x2A, 0x01, 0x84, 0x00,
388++	0x10, 0x06, 0x02, 0x6F, 0x2B, 0x2A, 0x03, 0x00, 0x85, 0x47, 0xB6, 0x02,
389++	0x00, 0x78, 0x2E, 0xA8, 0x27, 0x78, 0x2E, 0x2A, 0xCC, 0x47, 0xCB, 0x03,
390++	0x01, 0x03, 0x02, 0x02, 0x01, 0x02, 0x02, 0x39, 0x06, 0x14, 0xC2, 0x2A,
391++	0x03, 0x03, 0x85, 0x47, 0xB6, 0x02, 0x03, 0x78, 0x2E, 0xA8, 0x02, 0x02,
392++	0x06, 0x03, 0x26, 0x04, 0x01, 0x24, 0x9D, 0x00, 0x00, 0xBA, 0x01, 0x10,
393++	0x0F, 0x05, 0x02, 0x73, 0x2B, 0x00, 0x00, 0x9E, 0xBA, 0x01, 0x14, 0x0E,
394++	0x06, 0x02, 0x73, 0x2B, 0x85, 0x01, 0x0C, 0x08, 0x01, 0x0C, 0xB6, 0x9D,
395++	0x85, 0x2A, 0x01, 0x0C, 0x08, 0x01, 0x0C, 0x32, 0x05, 0x02, 0x67, 0x2B,
396++	0x00, 0x02, 0x03, 0x00, 0x03, 0x01, 0x02, 0x00, 0x9A, 0x02, 0x01, 0x02,
397++	0x00, 0x3C, 0x2A, 0x01, 0x00, 0x0F, 0x06, 0x02, 0x65, 0x00, 0xD1, 0x04,
398++	0x74, 0x00, 0xC0, 0x01, 0x01, 0x0E, 0x06, 0x02, 0x68, 0x2B, 0xC2, 0x2A,
399++	0x2A, 0x5F, 0x47, 0x01, 0x05, 0x11, 0x39, 0x06, 0x02, 0x68, 0x2B, 0x01,
400++	0x08, 0x08, 0x2A, 0x84, 0x30, 0x0B, 0x06, 0x0D, 0x2A, 0x01, 0x01, 0x47,
401++	0x0C, 0x3F, 0x2A, 0x84, 0x42, 0x86, 0x42, 0x04, 0x01, 0x29, 0x00, 0x00,
402++	0xC0, 0x8A, 0x30, 0x01, 0x00, 0x3A, 0x0F, 0x06, 0x13, 0x29, 0x01, 0x01,
403++	0x0F, 0x05, 0x02, 0x6B, 0x2B, 0xC2, 0x06, 0x02, 0x6B, 0x2B, 0x01, 0x02,
404++	0x8A, 0x42, 0x04, 0x28, 0x01, 0x02, 0x3A, 0x0F, 0x06, 0x1F, 0x29, 0x01,
405++	0x0D, 0x0F, 0x05, 0x02, 0x6B, 0x2B, 0xC2, 0x01, 0x0C, 0x0F, 0x05, 0x02,
406++	0x6B, 0x2B, 0x85, 0x01, 0x0C, 0xB6, 0x8B, 0x85, 0x01, 0x0C, 0x32, 0x05,
407++	0x02, 0x6B, 0x2B, 0x04, 0x03, 0x6B, 0x2B, 0x29, 0x00, 0x00, 0xC0, 0xA7,
408++	0xC0, 0xA7, 0x2A, 0x06, 0x1D, 0xC2, 0x06, 0x03, 0xBC, 0x04, 0x15, 0xC0,
409++	0x2A, 0x01, 0x81, 0x7F, 0x0D, 0x06, 0x0C, 0x2A, 0x8D, 0x08, 0x01, 0x00,
410++	0x47, 0x42, 0x8D, 0x47, 0xB6, 0x04, 0x01, 0xC9, 0x04, 0x60, 0x9D, 0x9D,
411++	0x00, 0x00, 0xBB, 0x2A, 0x5F, 0x06, 0x07, 0x29, 0x06, 0x02, 0x69, 0x2B,
412++	0x04, 0x74, 0x00, 0x00, 0xC3, 0x01, 0x03, 0xC1, 0x47, 0x29, 0x47, 0x00,
413++	0x00, 0xC0, 0xC9, 0x00, 0x03, 0x01, 0x00, 0x03, 0x00, 0xC0, 0xA7, 0x2A,
414++	0x06, 0x80, 0x50, 0xC2, 0x03, 0x01, 0xC2, 0x03, 0x02, 0x02, 0x01, 0x01,
415++	0x08, 0x0F, 0x06, 0x16, 0x02, 0x02, 0x01, 0x0F, 0x0D, 0x06, 0x0D, 0x01,
416++	0x01, 0x02, 0x02, 0x01, 0x10, 0x08, 0x0C, 0x02, 0x00, 0x39, 0x03, 0x00,
417++	0x04, 0x2A, 0x02, 0x01, 0x01, 0x02, 0x11, 0x02, 0x01, 0x01, 0x06, 0x0D,
418++	0x13, 0x02, 0x02, 0x01, 0x01, 0x0F, 0x02, 0x02, 0x01, 0x03, 0x0F, 0x39,
419++	0x13, 0x06, 0x11, 0x02, 0x00, 0x01, 0x01, 0x02, 0x02, 0x62, 0x01, 0x02,
420++	0x0C, 0x02, 0x01, 0x08, 0x0C, 0x39, 0x03, 0x00, 0x04, 0xFF, 0x2C, 0x9D,
421++	0x02, 0x00, 0x00, 0x00, 0xC0, 0xA7, 0xBD, 0x82, 0x41, 0x9D, 0x00, 0x00,
422++	0xC0, 0xA7, 0xC0, 0xA7, 0x01, 0x00, 0x7E, 0x41, 0x2A, 0x06, 0x15, 0xC0,
423++	0x2A, 0x01, 0x20, 0x0B, 0x06, 0x0B, 0x01, 0x01, 0x47, 0x0C, 0x7E, 0x2F,
424++	0x39, 0x7E, 0x41, 0x04, 0x01, 0x29, 0x04, 0x68, 0x9D, 0x9D, 0x00, 0x00,
425++	0x01, 0x02, 0x9A, 0xC3, 0x01, 0x08, 0x0C, 0xC3, 0x08, 0x00, 0x00, 0x01,
426++	0x03, 0x9A, 0xC3, 0x01, 0x08, 0x0C, 0xC3, 0x08, 0x01, 0x08, 0x0C, 0xC3,
427++	0x08, 0x00, 0x00, 0x01, 0x01, 0x9A, 0xC3, 0x00, 0x00, 0x3D, 0x2A, 0x5D,
428++	0x05, 0x01, 0x00, 0x29, 0xD1, 0x04, 0x76, 0x02, 0x03, 0x00, 0x94, 0x30,
429++	0x03, 0x01, 0x01, 0x00, 0x2A, 0x02, 0x01, 0x0B, 0x06, 0x10, 0x2A, 0x01,
430++	0x01, 0x0C, 0x93, 0x08, 0x2E, 0x02, 0x00, 0x0F, 0x06, 0x01, 0x00, 0x61,
431++	0x04, 0x6A, 0x29, 0x01, 0x7F, 0x00, 0x00, 0x2C, 0x19, 0x38, 0x06, 0x04,
432++	0xCF, 0x29, 0x04, 0x78, 0x01, 0x16, 0x89, 0x42, 0x01, 0x00, 0xE2, 0x01,
433++	0x00, 0xE1, 0x2C, 0x01, 0x17, 0x89, 0x42, 0x00, 0x00, 0x01, 0x15, 0x89,
434++	0x42, 0x47, 0x57, 0x29, 0x57, 0x29, 0x2C, 0x00, 0x00, 0x01, 0x01, 0x47,
435++	0xC6, 0x00, 0x00, 0xBB, 0x01, 0x01, 0x0F, 0x05, 0x02, 0x73, 0x2B, 0x2A,
436++	0xC9, 0x29, 0x00, 0x00, 0x47, 0x3A, 0x9A, 0x47, 0x2A, 0x06, 0x05, 0xC3,
437++	0x29, 0x62, 0x04, 0x78, 0x29, 0x00, 0x02, 0x03, 0x00, 0x78, 0x2E, 0x9C,
438++	0x03, 0x01, 0x02, 0x01, 0x01, 0x0F, 0x13, 0x02, 0x01, 0x01, 0x04, 0x12,
439++	0x01, 0x0F, 0x13, 0x02, 0x01, 0x01, 0x08, 0x12, 0x01, 0x0F, 0x13, 0x01,
440++	0x00, 0x3A, 0x0F, 0x06, 0x10, 0x29, 0x01, 0x00, 0x01, 0x18, 0x02, 0x00,
441++	0x06, 0x03, 0x4C, 0x04, 0x01, 0x4D, 0x04, 0x81, 0x0D, 0x01, 0x01, 0x3A,
442++	0x0F, 0x06, 0x10, 0x29, 0x01, 0x01, 0x01, 0x10, 0x02, 0x00, 0x06, 0x03,
443++	0x4C, 0x04, 0x01, 0x4D, 0x04, 0x80, 0x77, 0x01, 0x02, 0x3A, 0x0F, 0x06,
444++	0x10, 0x29, 0x01, 0x01, 0x01, 0x20, 0x02, 0x00, 0x06, 0x03, 0x4C, 0x04,
445++	0x01, 0x4D, 0x04, 0x80, 0x61, 0x01, 0x03, 0x3A, 0x0F, 0x06, 0x0F, 0x29,
446++	0x29, 0x01, 0x10, 0x02, 0x00, 0x06, 0x03, 0x4A, 0x04, 0x01, 0x4B, 0x04,
447++	0x80, 0x4C, 0x01, 0x04, 0x3A, 0x0F, 0x06, 0x0E, 0x29, 0x29, 0x01, 0x20,
448++	0x02, 0x00, 0x06, 0x03, 0x4A, 0x04, 0x01, 0x4B, 0x04, 0x38, 0x01, 0x05,
449++	0x3A, 0x0F, 0x06, 0x0C, 0x29, 0x29, 0x02, 0x00, 0x06, 0x03, 0x4E, 0x04,
450++	0x01, 0x4F, 0x04, 0x26, 0x2A, 0x01, 0x09, 0x10, 0x06, 0x02, 0x6A, 0x2B,
451++	0x47, 0x29, 0x2A, 0x01, 0x01, 0x13, 0x01, 0x04, 0x0C, 0x01, 0x10, 0x08,
452++	0x47, 0x01, 0x08, 0x13, 0x01, 0x10, 0x47, 0x09, 0x02, 0x00, 0x06, 0x03,
453++	0x48, 0x04, 0x01, 0x49, 0x00, 0x29, 0x00, 0x00, 0x9C, 0x01, 0x0C, 0x12,
454++	0x01, 0x02, 0x10, 0x00, 0x00, 0x9C, 0x01, 0x0C, 0x12, 0x2A, 0x60, 0x47,
455++	0x01, 0x03, 0x0B, 0x13, 0x00, 0x00, 0x9C, 0x01, 0x0C, 0x12, 0x01, 0x01,
456++	0x0F, 0x00, 0x00, 0x9C, 0x01, 0x0C, 0x12, 0x5F, 0x00, 0x00, 0x1B, 0x01,
457++	0x00, 0x75, 0x30, 0x2A, 0x06, 0x22, 0x01, 0x01, 0x3A, 0x0F, 0x06, 0x06,
458++	0x29, 0x01, 0x00, 0xA0, 0x04, 0x14, 0x01, 0x02, 0x3A, 0x0F, 0x06, 0x0D,
459++	0x29, 0x77, 0x30, 0x01, 0x01, 0x0F, 0x06, 0x03, 0x01, 0x10, 0x39, 0x04,
460++	0x01, 0x29, 0x04, 0x01, 0x29, 0x7D, 0x30, 0x05, 0x33, 0x31, 0x06, 0x30,
461++	0x88, 0x30, 0x01, 0x14, 0x3A, 0x0F, 0x06, 0x06, 0x29, 0x01, 0x02, 0x39,
462++	0x04, 0x22, 0x01, 0x15, 0x3A, 0x0F, 0x06, 0x09, 0x29, 0xAA, 0x06, 0x03,
463++	0x01, 0x7F, 0xA0, 0x04, 0x13, 0x01, 0x16, 0x3A, 0x0F, 0x06, 0x06, 0x29,
464++	0x01, 0x01, 0x39, 0x04, 0x07, 0x29, 0x01, 0x04, 0x39, 0x01, 0x00, 0x29,
465++	0x19, 0x06, 0x03, 0x01, 0x08, 0x39, 0x00, 0x00, 0x1B, 0x2A, 0x05, 0x13,
466++	0x31, 0x06, 0x10, 0x88, 0x30, 0x01, 0x15, 0x0F, 0x06, 0x08, 0x29, 0xAA,
467++	0x01, 0x00, 0x77, 0x42, 0x04, 0x01, 0x23, 0x00, 0x00, 0xCF, 0x01, 0x07,
468++	0x13, 0x01, 0x01, 0x10, 0x06, 0x02, 0x73, 0x2B, 0x00, 0x01, 0x03, 0x00,
469++	0x2C, 0x19, 0x06, 0x05, 0x02, 0x00, 0x89, 0x42, 0x00, 0xCF, 0x29, 0x04,
470++	0x74, 0x00, 0x01, 0x14, 0xD2, 0x01, 0x01, 0xE2, 0x2C, 0x2A, 0x01, 0x00,
471++	0xCA, 0x01, 0x16, 0xD2, 0xD6, 0x2C, 0x00, 0x00, 0x01, 0x0B, 0xE2, 0x52,
472++	0x2A, 0x2A, 0x01, 0x03, 0x08, 0xE1, 0xE1, 0x14, 0x2A, 0x5D, 0x06, 0x02,
473++	0x29, 0x00, 0xE1, 0x1E, 0x2A, 0x06, 0x05, 0x85, 0x47, 0xDA, 0x04, 0x77,
474++	0x29, 0x04, 0x6C, 0x00, 0x01, 0x00, 0xDC, 0x95, 0x2E, 0x01, 0x86, 0x03,
475++	0x11, 0x06, 0x05, 0x63, 0x01, 0x00, 0xDD, 0x08, 0x50, 0x08, 0x01, 0x03,
476++	0x08, 0x01, 0x0D, 0xE2, 0xE1, 0x01, 0x00, 0xDC, 0xE2, 0x01, 0x01, 0xDC,
477++	0x29, 0x95, 0x2E, 0x01, 0x86, 0x03, 0x11, 0x06, 0x08, 0x01, 0x00, 0xDD,
478++	0xE0, 0x01, 0x01, 0xDD, 0x29, 0x50, 0xE0, 0x16, 0x15, 0x2A, 0x5D, 0x06,
479++	0x02, 0x29, 0x00, 0xE0, 0x1F, 0x2A, 0x06, 0x05, 0x85, 0x47, 0xDA, 0x04,
480++	0x77, 0x29, 0x04, 0x6C, 0x00, 0x9E, 0x01, 0x14, 0xE2, 0x01, 0x0C, 0xE1,
481++	0x85, 0x01, 0x0C, 0xDA, 0x00, 0x04, 0x03, 0x00, 0x01, 0x02, 0xE2, 0x01,
482++	0x80, 0x46, 0x8A, 0x30, 0x01, 0x02, 0x0F, 0x06, 0x0C, 0x02, 0x00, 0x06,
483++	0x04, 0x01, 0x05, 0x04, 0x02, 0x01, 0x1D, 0x04, 0x02, 0x01, 0x00, 0x03,
484++	0x01, 0x86, 0x30, 0x06, 0x04, 0x01, 0x05, 0x04, 0x02, 0x01, 0x00, 0x03,
485++	0x02, 0x8C, 0x2E, 0x2A, 0x06, 0x05, 0x62, 0x21, 0x01, 0x07, 0x08, 0x03,
486++	0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x02, 0x03, 0x08, 0x2A, 0x06, 0x03,
487++	0x01, 0x02, 0x08, 0x08, 0xE1, 0x95, 0x2E, 0xE0, 0x8E, 0x01, 0x04, 0x17,
488++	0x8E, 0x01, 0x04, 0x08, 0x01, 0x1C, 0x34, 0x8E, 0x01, 0x20, 0xDA, 0x01,
489++	0x20, 0xE2, 0x8F, 0x01, 0x20, 0xDA, 0x78, 0x2E, 0xE0, 0x01, 0x00, 0xE2,
490++	0x02, 0x01, 0x02, 0x02, 0x08, 0x02, 0x03, 0x08, 0x2A, 0x06, 0x80, 0x40,
491++	0xE0, 0x02, 0x01, 0x2A, 0x06, 0x10, 0x01, 0x83, 0xFE, 0x01, 0xE0, 0x01,
492++	0x04, 0x09, 0x2A, 0xE0, 0x62, 0x8B, 0x47, 0xDB, 0x04, 0x01, 0x29, 0x02,
493++	0x02, 0x06, 0x0C, 0x01, 0x01, 0xE0, 0x01, 0x01, 0xE0, 0x86, 0x30, 0x01,
494++	0x08, 0x09, 0xE2, 0x02, 0x03, 0x2A, 0x06, 0x11, 0x01, 0x10, 0xE0, 0x01,
495++	0x04, 0x09, 0x2A, 0xE0, 0x64, 0x2A, 0xE0, 0x62, 0x85, 0x47, 0xDB, 0x04,
496++	0x01, 0x29, 0x04, 0x01, 0x29, 0x00, 0x00, 0x01, 0x0E, 0xE2, 0x01, 0x00,
497++	0xE1, 0x00, 0x03, 0x78, 0x2E, 0xCC, 0x05, 0x01, 0x00, 0x7E, 0x2F, 0x2A,
498++	0x01, 0x82, 0x80, 0x80, 0x80, 0x00, 0x13, 0x06, 0x05, 0x29, 0x01, 0x1D,
499++	0x04, 0x0E, 0x2A, 0x01, 0x83, 0xC0, 0x80, 0x80, 0x00, 0x13, 0x2A, 0x06,
500++	0x01, 0x47, 0x29, 0xA5, 0x03, 0x00, 0x02, 0x00, 0x25, 0x2A, 0x5D, 0x06,
501++	0x02, 0x37, 0x2B, 0x03, 0x01, 0x95, 0x2E, 0x01, 0x86, 0x03, 0x11, 0x03,
502++	0x02, 0x01, 0x0C, 0xE2, 0x02, 0x01, 0x80, 0x30, 0x08, 0x02, 0x02, 0x01,
503++	0x02, 0x13, 0x08, 0x01, 0x06, 0x08, 0xE1, 0x01, 0x03, 0xE2, 0x02, 0x00,
504++	0xE0, 0x7F, 0x80, 0x30, 0xDB, 0x02, 0x02, 0x06, 0x1C, 0x92, 0x2E, 0x2A,
505++	0x01, 0x83, 0xFE, 0x00, 0x0B, 0x06, 0x03, 0xE0, 0x04, 0x0F, 0x01, 0x81,
506++	0x7F, 0x13, 0xE2, 0x78, 0x2E, 0xCD, 0x01, 0x01, 0x0C, 0x01, 0x03, 0x08,
507++	0xE2, 0x02, 0x01, 0xE0, 0x85, 0x02, 0x01, 0xDA, 0x00, 0x00, 0x56, 0x2A,
508++	0x01, 0x00, 0x0F, 0x06, 0x02, 0x65, 0x00, 0xCF, 0x29, 0x04, 0x73, 0x00,
509++	0x2A, 0xE2, 0xDA, 0x00, 0x00, 0x01, 0x00, 0x78, 0x2E, 0xCB, 0x06, 0x0C,
510++	0x63, 0x3A, 0x06, 0x08, 0x01, 0x80, 0x41, 0xE2, 0x01, 0x80, 0x42, 0xE2,
511++	0x46, 0x06, 0x07, 0x61, 0x3A, 0x06, 0x03, 0x01, 0x01, 0xE2, 0x45, 0x06,
512++	0x08, 0x61, 0x3A, 0x06, 0x04, 0x01, 0x80, 0x40, 0xE2, 0x47, 0x29, 0x00,
513++	0x01, 0x01, 0x00, 0x03, 0x00, 0x46, 0x45, 0x39, 0x05, 0x14, 0x01, 0x01,
514++	0x01, 0x80, 0x7C, 0xDE, 0x03, 0x00, 0x01, 0x03, 0x01, 0x80, 0x7C, 0xDE,
515++	0x02, 0x00, 0x08, 0x47, 0x29, 0x00, 0x46, 0x06, 0x07, 0x01, 0x01, 0x44,
516++	0x29, 0xDE, 0x03, 0x00, 0x45, 0x06, 0x0A, 0x01, 0x03, 0x44, 0x29, 0xDE,
517++	0x02, 0x00, 0x08, 0x03, 0x00, 0x29, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00,
518++	0x01, 0x04, 0xDF, 0x01, 0x05, 0xDF, 0x01, 0x06, 0xDF, 0x01, 0x03, 0xDF,
519++	0x01, 0x02, 0xDF, 0x0A, 0x65, 0x00, 0x01, 0x03, 0x00, 0x3A, 0x01, 0x01,
520++	0x02, 0x00, 0x0C, 0x13, 0x05, 0x01, 0x00, 0x63, 0x01, 0x03, 0x3B, 0x06,
521++	0x07, 0x02, 0x00, 0xE2, 0x01, 0x02, 0x3B, 0xE2, 0x00, 0x00, 0x2A, 0x01,
522++	0x08, 0x54, 0xE2, 0xE2, 0x00, 0x00, 0x2A, 0x01, 0x10, 0x54, 0xE2, 0xE0,
523++	0x00, 0x00, 0x2A, 0x57, 0x06, 0x02, 0x29, 0x00, 0xCF, 0x29, 0x04, 0x76
524+ };
525+ 
526+ static const uint16_t t0_caddr[] = {
527+@@ -860,71 +860,71 @@ static const uint16_t t0_caddr[] = {
528+ 	353,
529+ 	364,
530+ 	405,
531+-	516,
532+-	520,
533+-	553,
534+-	563,
535+-	587,
536+-	669,
537+-	683,
538+-	689,
539+-	748,
540+-	767,
541+-	789,
542+-	838,
543+-	887,
544+-	963,
545+-	1065,
546+-	1076,
547+-	1670,
548+-	1674,
549+-	1741,
550+-	1751,
551+-	1782,
552+-	1806,
553+-	1852,
554+-	1922,
555+-	1962,
556+-	1976,
557+-	1985,
558+-	1989,
559+-	2084,
560++	524,
561++	528,
562++	561,
563++	571,
564++	595,
565++	677,
566++	691,
567++	697,
568++	756,
569++	775,
570++	797,
571++	846,
572++	895,
573++	971,
574++	1073,
575++	1084,
576++	1678,
577++	1682,
578++	1749,
579++	1759,
580++	1790,
581++	1814,
582++	1860,
583++	1930,
584++	1970,
585++	1984,
586++	1993,
587++	1997,
588+ 	2092,
589+-	2128,
590+-	2139,
591+-	2155,
592+-	2161,
593+-	2172,
594+-	2207,
595+-	2233,
596+-	2245,
597+-	2251,
598+-	2264,
599+-	2279,
600+-	2472,
601+-	2481,
602+-	2494,
603+-	2503,
604+-	2510,
605+-	2616,
606+-	2641,
607+-	2654,
608+-	2670,
609+-	2688,
610+-	2720,
611+-	2793,
612+-	2806,
613+-	2987,
614++	2100,
615++	2136,
616++	2147,
617++	2163,
618++	2169,
619++	2180,
620++	2215,
621++	2241,
622++	2253,
623++	2259,
624++	2272,
625++	2287,
626++	2480,
627++	2489,
628++	2502,
629++	2511,
630++	2518,
631++	2624,
632++	2649,
633++	2662,
634++	2678,
635++	2696,
636++	2728,
637++	2801,
638++	2814,
639+ 	2995,
640+-	3122,
641+-	3136,
642+-	3141,
643+-	3185,
644+-	3242,
645+-	3263,
646+-	3290,
647++	3003,
648++	3130,
649++	3144,
650++	3149,
651++	3193,
652++	3250,
653++	3271,
654+ 	3298,
655+-	3306
656++	3306,
657++	3314
658+ };
659+ 
660+ #define T0_INTERPRETED   93
661+diff --git a/src/ssl/ssl_hs_server.t0 b/src/ssl/ssl_hs_server.t0
662+index 9f6e934..20db5c8 100644
663+--- a/src/ssl/ssl_hs_server.t0
664++++ b/src/ssl/ssl_hs_server.t0
665+@@ -1411,7 +1411,7 @@ cc: verify-CV-sig ( sig-len -- err ) {
666+ 		write-ServerHello
667+ 		write-Certificate drop
668+ 		write-ServerKeyExchange
669+-		ta-names-total-length if
670++		ta-names-total-length 4 flag? or if
671+ 			write-CertificateRequest
672+ 		then
673+ 		write-ServerHelloDone
674+@@ -1419,7 +1419,7 @@ cc: verify-CV-sig ( sig-len -- err ) {
675+ 
676+ 		\ If we sent a CertificateRequest then we expect a
677+ 		\ Certificate message.
678+-		ta-names-total-length if
679++		ta-names-total-length 4 flag? or if
680+ 			\ Read client certificate.
681+ 			0 read-Certificate
682+ 
683+-- 
684+2.31.1
685+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 46f7dddce75227f2e40ab94d66ceb9f19ee6b1b0
+1, -0
1@@ -0,0 +1 @@
2+0.6-33-g46f7ddd r0
+10, -0
 1@@ -0,0 +1,10 @@
 2+/bfd.ninja
 3+/binutils-2.39.tar.xz
 4+/binutils.ninja
 5+/gas.ninja
 6+/ld.ninja
 7+/ld/ldemul-list.h
 8+/libctf.ninja
 9+/libiberty.ninja
10+/opcodes.ninja
11+/src
+16, -0
 1@@ -0,0 +1,16 @@
 2+# binutils
 3+
 4+## */config.h
 5+Generated with
 6+
 7+	./configure \
 8+		--target=x86_64-linux-musl \
 9+		--disable-gold \
10+		--disable-libctf \
11+		--disable-nls \
12+		--disable-plugins \
13+		--enable-default-hash-style=gnu \
14+		--enable-deterministic-archives \
15+		--enable-new-dtags \
16+		--without-msgpack
17+	make configure-host
+89, -0
 1@@ -0,0 +1,89 @@
 2+-- src/opcodes/configure.ac:/for arch in/
 3+return {
 4+	aarch64={'aarch64-asm.c', 'aarch64-dis.c', 'aarch64-opc.c', 'aarch64-asm-2.c', 'aarch64-dis-2.c', 'aarch64-opc-2.c'},
 5+	alpha={'alpha-dis.c', 'alpha-opc.c'},
 6+	amdgcn={},
 7+	arc={'arc-dis.c', 'arc-opc.c', 'arc-ext.c'},
 8+	arm={'arm-dis.c'},
 9+	avr={'avr-dis.c'},
10+	bfin={'bfin-dis.c'},
11+	cr16={'cr16-dis.c', 'cr16-opc.c'},
12+	cris={'cris_desc.c', 'cris-dis.c', 'cris-opc.c', 'cgen-bitset.c'},
13+	crx={'crx-dis.c', 'crx-opc.c'},
14+	csky={'csky-dis.c'},
15+	d10v={'d10v-dis.c', 'd10v-opc.c'},
16+	d30v={'d30v-dis.c', 'd30v-opc.c'},
17+	dlx={'dlx-dis.c'},
18+	fr30={'fr30-asm.c', 'fr30-desc.c', 'fr30-dis.c', 'fr30-ibld.c', 'fr30-opc.c'},
19+	frv={'frv-asm.c', 'frv-desc.c', 'frv-dis.c', 'frv-ibld.c', 'frv-opc.c'},
20+	ft32={'ft32-opc.c', 'ft32-dis.c'},
21+	moxie={'moxie-dis.c', 'moxie-opc.c'},
22+	h8300={'h8300-dis.c'},
23+	hppa={'hppa-dis.c'},
24+	i386={'i386-dis.c', 'i386-opc.c'},
25+	iamcu={'i386-dis.c', 'i386-opc.c'},
26+	ia64={'ia64-dis.c', 'ia64-opc.c'},
27+	ip2k={'ip2k-asm.c', 'ip2k-desc.c', 'ip2k-dis.c', 'ip2k-ibld.c', 'ip2k-opc.c'},
28+	epiphany={'epiphany-asm.c', 'epiphany-desc.c', 'epiphany-dis.c', 'epiphany-ibld.c', 'epiphany-opc.c'},
29+	iq2000={'iq2000-asm.c', 'iq2000-desc.c', 'iq2000-dis.c', 'iq2000-ibld.c', 'iq2000-opc.c'},
30+	lm32={'lm32-asm.c', 'lm32-desc.c', 'lm32-dis.c', 'lm32-ibld.c', 'lm32-opc.c', 'lm32-opinst.c'},
31+	m32c={'m32c-asm.c', 'm32c-desc.c', 'm32c-dis.c', 'm32c-ibld.c', 'm32c-opc.c'},
32+	m32r={'m32r-asm.c', 'm32r-desc.c', 'm32r-dis.c', 'm32r-ibld.c', 'm32r-opc.c', 'm32r-opinst.c'},
33+	m68hc11={'m68hc11-dis.c', 'm68hc11-opc.c'},
34+	m68hc12={'m68hc11-dis.c', 'm68hc11-opc.c'},
35+	m9s12x={'m68hc11-dis.c', 'm68hc11-opc.c'},
36+	m9s12xg={'m68hc11-dis.c', 'm68hc11-opc.c'},
37+	s12z={'s12z-dis.c', 's12z-opc.c'},
38+	m68k={'m68k-dis.c', 'm68k-opc.c'},
39+	mcore={'mcore-dis.c'},
40+	mep={'mep-asm.c', 'mep-desc.c', 'mep-dis.c', 'mep-ibld.c', 'mep-opc.c'},
41+	metag={'metag-dis.c'},
42+	microblaze={'microblaze-dis.c'},
43+	mips={'mips-dis.c', 'mips-opc.c', 'mips16-opc.c', 'micromips-opc.c'},
44+	mmix={'mmix-dis.c', 'mmix-opc.c'},
45+	mn10200={'m10200-dis.c', 'm10200-opc.c'},
46+	mn10300={'m10300-dis.c', 'm10300-opc.c'},
47+	mt={'mt-asm.c', 'mt-desc.c', 'mt-dis.c', 'mt-ibld.c', 'mt-opc.c'},
48+	msp430={'msp430-dis.c', 'msp430-decode.c'},
49+	nds32={'nds32-asm.c', 'nds32-dis.c'},
50+	nfp={'nfp-dis.c'},
51+	nios2={'nios2-dis.c', 'nios2-opc.c'},
52+	ns32k={'ns32k-dis.c'},
53+	or1k={'or1k-asm.c', 'or1k-desc.c', 'or1k-dis.c', 'or1k-ibld.c', 'or1k-opc.c'},
54+	pdp11={'pdp11-dis.c', 'pdp11-opc.c'},
55+	pj={'pj-dis.c', 'pj-opc.c'},
56+	powerpc={'ppc-dis.c', 'ppc-opc.c'},
57+	powerpc_64={'ppc-dis.c', 'ppc-opc.c'},
58+	pru={'pru-dis.c', 'pru-opc.c'},
59+	pyramid={},
60+	romp={},
61+	riscv={'riscv-dis.c', 'riscv-opc.c'},
62+	rs6000={'ppc-dis.c', 'ppc-opc.c'},
63+	rl78={'rl78-dis.c', 'rl78-decode.c'},
64+	rx={'rx-dis.c', 'rx-decode.c'},
65+	s390={'s390-dis.c', 's390-opc.c'},
66+	score={'score-dis.c', 'score7-dis.c'},
67+	sh={'sh-dis.c', 'cgen-bitset.c'},
68+	sparc={'sparc-dis.c', 'sparc-opc.c'},
69+	spu={'spu-dis.c', 'spu-opc.c'},
70+	tic30={'tic30-dis.c'},
71+	tic4x={'tic4x-dis.c'},
72+	tic54x={'tic54x-dis.c', 'tic54x-opc.c'},
73+	tic6x={'tic6x-dis.c'},
74+	tilegx={'tilegx-dis.c', 'tilegx-opc.c'},
75+	tilepro={'tilepro-dis.c', 'tilepro-opc.c'},
76+	v850={'v850-opc.c', 'v850-dis.c'},
77+	v850e={'v850-opc.c', 'v850-dis.c'},
78+	v850ea={'v850-opc.c', 'v850-dis.c'},
79+	v850_rh850={'v850-opc.c', 'v850-dis.c'},
80+	vax={'vax-dis.c'},
81+	visium={'visium-dis.c', 'visium-opc.c'},
82+	wasm32={'wasm32-dis.c'},
83+	xgate={'xgate-dis.c', 'xgate-opc.c'},
84+	xstormy16={'xstormy16-asm.c', 'xstormy16-desc.c', 'xstormy16-dis.c', 'xstormy16-ibld.c', 'xstormy16-opc.c'},
85+	xtensa={'xtensa-dis.c'},
86+	z80={'z80-dis.c'},
87+	z8k={'z8k-dis.c'},
88+	bpf={'bpf-asm.c', 'bpf-desc.c', 'bpf-dis.c', 'bpf-ibld.c', 'bpf-opc.c'},
89+	loongarch={'loongarch-dis.c', 'loongarch-opc.c', 'loongarch-coder.c'},
90+}
+120, -0
  1@@ -0,0 +1,120 @@
  2+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
  3+#  error config.h must be #included before system headers
  4+#endif
  5+#define __CONFIG_H__ 1
  6+#define CORE_HEADER "hosts/x86-64linux.h"
  7+#define DEFAULT_LD_Z_SEPARATE_CODE 1
  8+/* #undef ENABLE_CHECKING */
  9+/* #undef ENABLE_NLS */
 10+#define HAVE_DECL_ASPRINTF 1
 11+#define HAVE_DECL_BASENAME 1
 12+#define HAVE_DECL_FFS 1
 13+#define HAVE_DECL_FOPEN64 0
 14+#define HAVE_DECL_FSEEKO 1
 15+#define HAVE_DECL_FSEEKO64 0
 16+#define HAVE_DECL_FTELLO 1
 17+#define HAVE_DECL_FTELLO64 0
 18+#define HAVE_DECL_STPCPY 1
 19+#define HAVE_DECL_STRNLEN 1
 20+#define HAVE_DECL_VASPRINTF 1
 21+#define HAVE_DLFCN_H 1
 22+#define HAVE_FCNTL 1
 23+#define HAVE_FCNTL_H 1
 24+#define HAVE_FDOPEN 1
 25+#define HAVE_FILENO 1
 26+/* #undef HAVE_FLS */
 27+/* #undef HAVE_FOPEN64 */
 28+#define HAVE_FSEEKO 1
 29+/* #undef HAVE_FSEEKO64 */
 30+#define HAVE_FTELLO 1
 31+/* #undef HAVE_FTELLO64 */
 32+#define HAVE_GETGID 1
 33+#define HAVE_GETPAGESIZE 1
 34+#define HAVE_GETRLIMIT 1
 35+#define HAVE_GETUID 1
 36+#define HAVE_HIDDEN 1
 37+#define HAVE_INTTYPES_H 1
 38+/* #undef HAVE_LWPSTATUS_T */
 39+/* #undef HAVE_LWPSTATUS_T_PR_CONTEXT */
 40+/* #undef HAVE_LWPSTATUS_T_PR_FPREG */
 41+/* #undef HAVE_LWPSTATUS_T_PR_REG */
 42+/* #undef HAVE_LWPXSTATUS_T */
 43+#define HAVE_MADVISE 1
 44+#define HAVE_MEMORY_H 1
 45+#define HAVE_MMAP 1
 46+#define HAVE_MPROTECT 1
 47+/* #undef HAVE_PRPSINFO32_T */
 48+/* #undef HAVE_PRPSINFO32_T_PR_PID */
 49+#define HAVE_PRPSINFO_T 1
 50+#define HAVE_PRPSINFO_T_PR_PID 1
 51+/* #undef HAVE_PRSTATUS32_T */
 52+/* #undef HAVE_PRSTATUS32_T_PR_WHO */
 53+#define HAVE_PRSTATUS_T 1
 54+/* #undef HAVE_PRSTATUS_T_PR_WHO */
 55+/* #undef HAVE_PSINFO32_T */
 56+/* #undef HAVE_PSINFO32_T_PR_PID */
 57+/* #undef HAVE_PSINFO_T */
 58+/* #undef HAVE_PSINFO_T_PR_PID */
 59+/* #undef HAVE_PSTATUS32_T */
 60+/* #undef HAVE_PSTATUS_T */
 61+/* #undef HAVE_PXSTATUS_T */
 62+#define HAVE_STDINT_H 1
 63+#define HAVE_STDLIB_H 1
 64+#define HAVE_STRINGS_H 1
 65+#define HAVE_STRING_H 1
 66+/* #undef HAVE_ST_C_IMPL */
 67+#define HAVE_SYSCONF 1
 68+#define HAVE_SYS_FILE_H 1
 69+#define HAVE_SYS_PARAM_H 1
 70+#define HAVE_SYS_PROCFS_H 1
 71+#define HAVE_SYS_RESOURCE_H 1
 72+#define HAVE_SYS_STAT_H 1
 73+#define HAVE_SYS_TYPES_H 1
 74+#define HAVE_UNISTD_H 1
 75+/* #undef HAVE_WIN32_PSTATUS_T */
 76+/* #undef HAVE_WINDOWS_H */
 77+#define LT_OBJDIR ".libs/"
 78+#define PACKAGE "bfd"
 79+#define PACKAGE_BUGREPORT ""
 80+#define PACKAGE_NAME "bfd"
 81+#define PACKAGE_STRING "bfd 2.39"
 82+#define PACKAGE_TARNAME "bfd"
 83+#define PACKAGE_URL ""
 84+#define PACKAGE_VERSION "2.39"
 85+#define SIZEOF_INT 4
 86+#define SIZEOF_LONG 8
 87+#define SIZEOF_LONG_LONG 8
 88+#define SIZEOF_OFF_T 8
 89+#define SIZEOF_VOID_P 8
 90+#define STDC_HEADERS 1
 91+/* #undef TRAD_HEADER */
 92+/* #undef USE_64_BIT_ARCHIVE */
 93+/* #undef USE_BINARY_FOPEN */
 94+/* #undef USE_MINGW64_LEADING_UNDERSCORES */
 95+/* #undef USE_MMAP */
 96+#define USE_SECUREPLT 1
 97+#ifndef _ALL_SOURCE
 98+# define _ALL_SOURCE 1
 99+#endif
100+#ifndef _GNU_SOURCE
101+# define _GNU_SOURCE 1
102+#endif
103+#ifndef _POSIX_PTHREAD_SEMANTICS
104+# define _POSIX_PTHREAD_SEMANTICS 1
105+#endif
106+#ifndef _TANDEM_SOURCE
107+# define _TANDEM_SOURCE 1
108+#endif
109+#ifndef __EXTENSIONS__
110+# define __EXTENSIONS__ 1
111+#endif
112+#define VERSION "2.39"
113+#ifndef _DARWIN_USE_64_BIT_INODE
114+# define _DARWIN_USE_64_BIT_INODE 1
115+#endif
116+/* #undef _FILE_OFFSET_BITS */
117+/* #undef _LARGE_FILES */
118+/* #undef _MINIX */
119+/* #undef _POSIX_1_SOURCE */
120+/* #undef _POSIX_SOURCE */
121+#define _STRUCTURED_PROC 1
+95, -0
 1@@ -0,0 +1,95 @@
 2+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
 3+#  error config.h must be #included before system headers
 4+#endif
 5+#define __CONFIG_H__ 1
 6+#define DEFAULT_AR_DETERMINISTIC 1
 7+#define DEFAULT_FOR_FOLLOW_LINKS 1
 8+#define DEFAULT_F_FOR_IFUNC_SYMBOLS 0
 9+#define DEFAULT_STRINGS_ALL 1
10+/* #undef ENABLE_CHECKING */
11+/* #undef ENABLE_LIBCTF */
12+/* #undef ENABLE_NLS */
13+#define EXECUTABLE_SUFFIX ""
14+#define HAVE_DECL_ASPRINTF 1
15+#define HAVE_DECL_ENVIRON 1
16+#define HAVE_DECL_GETC_UNLOCKED 1
17+#define HAVE_DECL_GETOPT 1
18+#define HAVE_DECL_SBRK 1
19+#define HAVE_DECL_STPCPY 1
20+#define HAVE_DECL_STRNLEN 1
21+#define HAVE_DLFCN_H 1
22+/* #undef HAVE_EXECUTABLE_SUFFIX */
23+#define HAVE_FCNTL_H 1
24+#define HAVE_GETC_UNLOCKED 1
25+#define HAVE_GETPAGESIZE 1
26+#define HAVE_GOOD_UTIME_H 1
27+#define HAVE_ICONV 1
28+#define HAVE_INTTYPES_H 1
29+#define HAVE_LC_MESSAGES 1
30+/* #undef HAVE_LIBDEBUGINFOD */
31+#define HAVE_MBSTATE_T 1
32+#define HAVE_MEMORY_H 1
33+#define HAVE_MKDTEMP 1
34+#define HAVE_MKSTEMP 1
35+#define HAVE_MMAP 1
36+/* #undef HAVE_MSGPACK */
37+#define HAVE_SBRK 1
38+#define HAVE_STDINT_H 1
39+#define HAVE_STDLIB_H 1
40+#define HAVE_STRINGS_H 1
41+#define HAVE_STRING_H 1
42+/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */
43+/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */
44+/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */
45+#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
46+#define HAVE_SYS_FILE_H 1
47+#define HAVE_SYS_PARAM_H 1
48+#define HAVE_SYS_STAT_H 1
49+#define HAVE_SYS_TIME_H 1
50+#define HAVE_SYS_TYPES_H 1
51+#define HAVE_SYS_WAIT_H 1
52+#define HAVE_UNISTD_H 1
53+#define HAVE_UTIMENSAT 1
54+#define HAVE_UTIMES 1
55+/* #undef HAVE_WINDOWS_H */
56+#define ICONV_CONST 
57+#define LT_OBJDIR ".libs/"
58+#define PACKAGE "binutils"
59+#define PACKAGE_BUGREPORT ""
60+#define PACKAGE_NAME "binutils"
61+#define PACKAGE_STRING "binutils 2.39"
62+#define PACKAGE_TARNAME "binutils"
63+#define PACKAGE_URL ""
64+#define PACKAGE_VERSION "2.39"
65+#define SIZEOF_LONG 8
66+#define SIZEOF_LONG_LONG 8
67+#define STDC_HEADERS 1
68+#define TARGET "x86_64-pc-linux-musl"
69+#define TARGET_PREPENDS_UNDERSCORE 0
70+#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1
71+/* #undef USE_BINARY_FOPEN */
72+#ifndef _ALL_SOURCE
73+# define _ALL_SOURCE 1
74+#endif
75+#ifndef _GNU_SOURCE
76+# define _GNU_SOURCE 1
77+#endif
78+#ifndef _POSIX_PTHREAD_SEMANTICS
79+# define _POSIX_PTHREAD_SEMANTICS 1
80+#endif
81+#ifndef _TANDEM_SOURCE
82+# define _TANDEM_SOURCE 1
83+#endif
84+#ifndef __EXTENSIONS__
85+# define __EXTENSIONS__ 1
86+#endif
87+#define VERSION "2.39"
88+/* #undef YYTEXT_POINTER */
89+#ifndef _DARWIN_USE_64_BIT_INODE
90+# define _DARWIN_USE_64_BIT_INODE 1
91+#endif
92+/* #undef _FILE_OFFSET_BITS */
93+/* #undef _LARGE_FILES */
94+/* #undef _MINIX */
95+/* #undef _POSIX_1_SOURCE */
96+/* #undef _POSIX_SOURCE */
+121, -0
  1@@ -0,0 +1,121 @@
  2+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
  3+#  error config.h must be #included before system headers
  4+#endif
  5+#define __CONFIG_H__ 1
  6+/* #undef AC_APPLE_UNIVERSAL_BUILD */
  7+/* #undef AIX_WEAK_SUPPORT */
  8+/* #undef BROKEN_ASSERT */
  9+/* #undef CROSS_COMPILE */
 10+#define DEFAULT_ARCH "x86_64"
 11+/* #undef DEFAULT_CRIS_ARCH */
 12+#define DEFAULT_EMULATION "i386elf"
 13+#define DEFAULT_FLAG_COMPRESS_DEBUG 1
 14+#define DEFAULT_GENERATE_BUILD_NOTES 0
 15+#define DEFAULT_GENERATE_ELF_STT_COMMON 0
 16+#define DEFAULT_GENERATE_X86_RELAX_RELOCATIONS 1
 17+#define DEFAULT_MIPS_FIX_LOONGSON3_LLSC 0
 18+/* #undef DEFAULT_RISCV_ARCH_WITH_EXT */
 19+#define DEFAULT_RISCV_ATTR 1
 20+/* #undef DEFAULT_RISCV_ISA_SPEC */
 21+/* #undef DEFAULT_RISCV_PRIV_SPEC */
 22+#define DEFAULT_X86_USED_NOTE 1
 23+#define EMULATIONS &i386elf,
 24+/* #undef ENABLE_CHECKING */
 25+/* #undef ENABLE_NLS */
 26+#define HAVE_DECL_ASPRINTF 1
 27+#define HAVE_DECL_GETOPT 1
 28+#define HAVE_DECL_MEMPCPY 1
 29+#define HAVE_DECL_STPCPY 1
 30+#define HAVE_DLFCN_H 1
 31+#define HAVE_INTTYPES_H 1
 32+#define HAVE_LC_MESSAGES 1
 33+#define HAVE_MEMORY_H 1
 34+#define HAVE_STDINT_H 1
 35+#define HAVE_STDLIB_H 1
 36+#define HAVE_STRINGS_H 1
 37+#define HAVE_STRING_H 1
 38+#define HAVE_STRSIGNAL 1
 39+#define HAVE_ST_MTIM_TV_NSEC 1
 40+#define HAVE_ST_MTIM_TV_SEC 1
 41+#define HAVE_SYS_STAT_H 1
 42+#define HAVE_SYS_TYPES_H 1
 43+/* #undef HAVE_TM_GMTOFF */
 44+#define HAVE_UNISTD_H 1
 45+/* #undef HAVE_WINDOWS_H */
 46+/* #undef I386COFF */
 47+#define LT_OBJDIR ".libs/"
 48+/* #undef MIPS_CPU_STRING_DEFAULT */
 49+/* #undef MIPS_DEFAULT_64BIT */
 50+/* #undef MIPS_DEFAULT_ABI */
 51+/* #undef NDS32_DEFAULT_ARCH_NAME */
 52+/* #undef NDS32_DEFAULT_AUDIO_EXT */
 53+/* #undef NDS32_DEFAULT_DSP_EXT */
 54+/* #undef NDS32_DEFAULT_DX_REGS */
 55+/* #undef NDS32_DEFAULT_PERF_EXT */
 56+/* #undef NDS32_DEFAULT_PERF_EXT2 */
 57+/* #undef NDS32_DEFAULT_STRING_EXT */
 58+/* #undef NDS32_DEFAULT_ZOL_EXT */
 59+/* #undef NDS32_LINUX_TOOLCHAIN */
 60+/* #undef NEED_DECLARATION_ENVIRON */
 61+/* #undef NEED_DECLARATION_FFS */
 62+/* #undef OBJ_MAYBE_AOUT */
 63+/* #undef OBJ_MAYBE_COFF */
 64+/* #undef OBJ_MAYBE_ECOFF */
 65+/* #undef OBJ_MAYBE_ELF */
 66+/* #undef OBJ_MAYBE_GENERIC */
 67+/* #undef OBJ_MAYBE_SOM */
 68+#define PACKAGE "gas"
 69+#define PACKAGE_BUGREPORT ""
 70+#define PACKAGE_NAME "gas"
 71+#define PACKAGE_STRING "gas 2.39"
 72+#define PACKAGE_TARNAME "gas"
 73+#define PACKAGE_URL ""
 74+#define PACKAGE_VERSION "2.39"
 75+#define STDC_HEADERS 1
 76+/* #undef STRICTCOFF */
 77+#define TARGET_ALIAS "x86_64-linux-musl"
 78+/* #undef TARGET_BYTES_BIG_ENDIAN */
 79+#define TARGET_CANONICAL "x86_64-pc-linux-musl"
 80+#define TARGET_CPU "x86_64"
 81+#define TARGET_OS "linux-musl"
 82+/* #undef TARGET_SOLARIS_COMMENT */
 83+#define TARGET_VENDOR "pc"
 84+/* #undef TARGET_WITH_CPU */
 85+/* #undef USE_BINARY_FOPEN */
 86+/* #undef USE_EMULATIONS */
 87+/* #undef USE_E_MIPS_ABI_O32 */
 88+#ifndef _ALL_SOURCE
 89+# define _ALL_SOURCE 1
 90+#endif
 91+#ifndef _GNU_SOURCE
 92+# define _GNU_SOURCE 1
 93+#endif
 94+#ifndef _POSIX_PTHREAD_SEMANTICS
 95+# define _POSIX_PTHREAD_SEMANTICS 1
 96+#endif
 97+#ifndef _TANDEM_SOURCE
 98+# define _TANDEM_SOURCE 1
 99+#endif
100+#ifndef __EXTENSIONS__
101+# define __EXTENSIONS__ 1
102+#endif
103+/* #undef USING_CGEN */
104+#define VERSION "2.39"
105+#if defined AC_APPLE_UNIVERSAL_BUILD
106+# if defined __BIG_ENDIAN__
107+#  define WORDS_BIGENDIAN 1
108+# endif
109+#else
110+# ifndef WORDS_BIGENDIAN
111+/* #  undef WORDS_BIGENDIAN */
112+# endif
113+#endif
114+/* #undef YYTEXT_POINTER */
115+#ifndef _DARWIN_USE_64_BIT_INODE
116+# define _DARWIN_USE_64_BIT_INODE 1
117+#endif
118+/* #undef _FILE_OFFSET_BITS */
119+/* #undef _LARGE_FILES */
120+/* #undef _MINIX */
121+/* #undef _POSIX_1_SOURCE */
122+/* #undef _POSIX_SOURCE */
+339, -0
  1@@ -0,0 +1,339 @@
  2+local version = setmetatable({2, 39}, {__index=function() return 0 end})
  3+local defvec = 'x86_64_elf64_vec'
  4+local selvecs = {[defvec]=true, i386_elf32_vec=true}
  5+local selarchs = {i386=true}
  6+local emuls = {
  7+	'elf_x86_64',
  8+	'elf_i386',
  9+}
 10+
 11+cflags{
 12+	'-std=c99', '-Wall', '-Wno-return-local-addr', '-Wno-stringop-truncation',
 13+	'-D _POSIX_C_SOURCE=200809L',
 14+	'-D HAVE_CONFIG_H',
 15+	'-I $srcdir/include',
 16+	'-I $outdir/bfd',
 17+	'-I $srcdir/bfd',
 18+	'-isystem $builddir/pkg/zlib/include',
 19+}
 20+
 21+pkg.deps = {
 22+	'pkg/zlib/headers',
 23+	'$outdir/bfd/bfd.h',
 24+	'$outdir/bfd/bfdver.h',
 25+	'$outdir/bfd/bfd_stdint.h',
 26+}
 27+
 28+sub('libiberty.ninja', function()
 29+	cflags{'-I $dir/libiberty'}
 30+	-- src/libiberty/Makefile.in:/^REQUIRED_OFILES
 31+	lib('libiberty.a', [[libiberty/(
 32+		regex.c cplus-dem.c cp-demangle.c
 33+		md5.c sha1.c alloca.c
 34+		argv.c
 35+		choose-temp.c concat.c
 36+		cp-demint.c crc32.c d-demangle.c
 37+		dwarfnames.c dyn-string.c
 38+		fdmatch.c fibheap.c
 39+		filedescriptor.c
 40+		filename_cmp.c floatformat.c
 41+		fnmatch.c fopen_unlocked.c
 42+		getopt.c getopt1.c getpwd.c
 43+		getruntime.c hashtab.c hex.c
 44+		lbasename.c lrealpath.c
 45+		make-relative-prefix.c make-temp-file.c
 46+		objalloc.c
 47+		obstack.c
 48+		partition.c pexecute.c physmem.c
 49+		pex-common.c pex-one.c
 50+		pex-unix.c vprintf-support.c
 51+		rust-demangle.c
 52+		safe-ctype.c
 53+		simple-object.c simple-object-coff.c
 54+		simple-object-elf.c simple-object-mach-o.c
 55+		simple-object-xcoff.c
 56+		sort.c spaces.c
 57+		splay-tree.c stack-limit.c
 58+		strerror.c strsignal.c
 59+		timeval-utils.c unlink-if-ordinary.c
 60+		xasprintf.c xatexit.c xexit.c
 61+		xmalloc.c xmemdup.c xstrdup.c
 62+		xstrerror.c xstrndup.c
 63+		xvasprintf.c
 64+	)]])
 65+end)
 66+
 67+sub('bfd.ninja', function()
 68+	cflags{'-I $dir/bfd'}
 69+	build('sed', '$outdir/bfd/bfd.h', '$srcdir/bfd/bfd-in2.h', {expr={
 70+		'-e s,@supports_plugins@,0,',
 71+		'-e s,@wordsize@,64,',
 72+		'-e s,@bfd_default_target_size@,64,',
 73+		[[-e 's,@BFD_INT64_FMT@,__PRI64,']],
 74+		'-e s,@bfd_file_ptr@,int64_t,',
 75+		'-e s,@bfd_ufile_ptr@,uint64_t,',
 76+	}})
 77+	build('sed', '$outdir/bfd/bfdver.h', '$srcdir/bfd/version.h', {expr={
 78+		string.format('-e s,@bfd_version@,%d%02d%02d%02d%02d,', version[1], version[2], version[3], version[4], version[5]),
 79+		string.format([[-e 's,@bfd_version_string@,"%s",']], table.concat(version, '.')),
 80+		[[-e 's,@bfd_version_package@,"(GNU Binutils) ",']],
 81+		[[-e 's,@report_bugs_to@,"<http://www.sourceware.org/bugzilla/>",']],
 82+	}})
 83+	build('printf', '$outdir/bfd/bfd_stdint.h', nil, {args=[['#include <stdint.h>\n']]})
 84+	build('sed', '$outdir/bfd/targmatch.h', {'$srcdir/bfd/config.bfd', '|', '$srcdir/bfd/targmatch.sed'}, {
 85+		expr='-f $srcdir/bfd/targmatch.sed',
 86+	})
 87+	build('sed', '$outdir/bfd/elf32-target.h', '$srcdir/bfd/elfxx-target.h', {expr='-e s,NN,32,g'})
 88+	build('sed', '$outdir/bfd/elf64-target.h', '$srcdir/bfd/elfxx-target.h', {expr='-e s,NN,64,g'})
 89+	build('sed', '$outdir/bfd/pex64igen.c', '$srcdir/bfd/peXXigen.c', {expr='-e s,XX,pex64,g'})
 90+	build('sed', '$outdir/bfd/peigen.c', '$srcdir/bfd/peXXigen.c', {expr='-e s,XX,pe,g'})
 91+
 92+	-- src/bfd/config.bfd
 93+	for _, vec in ipairs(table.keys(selvecs)) do
 94+		if vec:find('elf64') or vec:find('mips_elf32_n') then
 95+			selvecs.elf64_le_vec = true
 96+			selvecs.elf64_be_vec = true
 97+		end
 98+		if vec:find('elf32') or vec:find('elf64') or vec:find('mips_elf32_n') then
 99+			selvecs.elf32_le_vec = true
100+			selvecs.elf32_be_vec = true
101+		end
102+		if vec:find('iamcu_elf32') then
103+			selarchs.iamcu = true
104+		end
105+	end
106+	local srcs = {}
107+	local special = {
108+		['dwarf2.c']='bfd/dwarf2.c.o',
109+		['peigen.c']='$outdir/bfd/peigen.c',
110+		['pex64igen.c']='$outdir/bfd/pex64igen.c',
111+	}
112+	for vec, vecsrcs in pairs(load 'vec.lua') do
113+		if selvecs[vec] then
114+			for src in iterstrings(vecsrcs) do
115+				srcs[special[src] or 'bfd/'..src] = true
116+			end
117+		end
118+	end
119+	for arch in pairs(selarchs) do
120+		srcs['bfd/cpu-'..arch..'.c'] = true
121+	end
122+	local deps = {
123+		'$gendir/deps',
124+		'$outdir/bfd/targmatch.h',
125+		'$outdir/bfd/elf32-target.h',
126+		'$outdir/bfd/elf64-target.h',
127+	}
128+	local selvecnames = table.keys(selvecs)
129+	cc('bfd/targets.c', nil, {cflags={
130+		'$cflags',
131+		'-D DEFAULT_VECTOR='..defvec,
132+		'-D HAVE_'..table.concat(selvecnames, ' -D HAVE_'),
133+		string.format([[-D 'SELECT_VECS=&%s']], table.concat(selvecnames, ',&')),
134+	}})
135+	cc('bfd/archures.c', nil, {cflags={
136+		'$cflags',
137+		string.format([[-D 'SELECT_ARCHITECTURES=&bfd_%s_arch']], table.concat(table.keys(selarchs), '_arch,&bfd_')),
138+	}})
139+	cc('bfd/dwarf2.c', nil, {cflags={'$cflags', string.format([[-D 'DEBUGDIR="%s/lib/debug"']], config.prefix)}})
140+	lib('libbfd.a', {
141+		-- src/bfd/Makefile.am:/^BFD32_LIBS_CFILES
142+		-- src/bfd/Makefile.am:/^BFD64_LIBS_CFILES
143+		paths[[bfd/(
144+			archive.c archures.c.o bfd.c bfdio.c bfdwin.c cache.c coff-bfd.c
145+			compress.c corefile.c elf-properties.c format.c hash.c
146+			init.c libbfd.c linker.c merge.c opncls.c reloc.c
147+			section.c simple.c stab-syms.c stabs.c syms.c targets.c.o
148+			binary.c ihex.c srec.c tekhex.c verilog.c
149+
150+			archive64.c
151+		)]],
152+		table.keys(srcs),
153+		'libiberty.a',
154+		'$builddir/pkg/zlib/libz.a',
155+	}, deps)
156+end)
157+
158+sub('opcodes.ninja', function()
159+	cflags{'-I $dir/opcodes'}
160+	local srcs = {}
161+	for arch, archsrcs in pairs(load 'arch.lua') do
162+		if selarchs[arch] then
163+			for src in iterstrings(archsrcs) do
164+				srcs['opcodes/'..src] = true
165+			end
166+		end
167+	end
168+	cc('opcodes/disassemble.c', nil, {cflags={
169+		'$cflags', '-D ARCH_'..table.concat(table.keys(selarchs), ' -D ARCH_'),
170+	}})
171+	lib('libopcodes.a', {
172+		paths[[opcodes/(dis-buf.c disassemble.c.o dis-init.c)]],
173+		table.keys(srcs),
174+	})
175+end)
176+
177+sub('binutils.ninja', function()
178+	cflags{
179+		string.format([[-D 'LOCALEDIR="%s/share/locale"']], config.prefix),
180+		'-D bin_dummy_emulation=bin_vanilla_emulation',
181+		'-I $dir/binutils',
182+		'-I $srcdir/binutils',
183+	}
184+	lib('libcommon.a', [[
185+		binutils/(
186+			bucomm.c version.c filemode.c rename.c
187+			elfcomm.c
188+			rddbg.c debug.c stabs.c rdcoff.c wrstabs.c
189+			dwarf.c demanguse.c
190+		)
191+		libbfd.a.d
192+		libiberty.a
193+	]])
194+
195+	cc('binutils/objdump.c', nil, {cflags='$cflags -D OBJDUMP_PRIVATE_VECTORS='})
196+	exe('bin/size',    [[binutils/size.c                    libcommon.a.d]])
197+	exe('bin/objcopy', [[binutils/(objcopy.c not-strip.c)   libcommon.a.d]])
198+	exe('bin/strings', [[binutils/strings.c                 libcommon.a.d]])
199+	exe('bin/readelf', [[binutils/(readelf.c unwind-ia64.c) libcommon.a.d]])
200+	exe('bin/elfedit', [[binutils/elfedit.c                 libcommon.a.d]])
201+	exe('bin/strip',   [[binutils/(objcopy.c.o is-strip.c)  libcommon.a.d]])
202+	exe('bin/nm',      [[binutils/nm.c                      libcommon.a.d]])
203+	exe('bin/objdump', [[binutils/(objdump.c.o prdbg.c)     libcommon.a.d libopcodes.a]])
204+	exe('bin/addr2line', [[binutils/addr2line.c             libcommon.a.d]])
205+
206+	local arobjs = objects[[
207+		binutils/(
208+			arparse.c arlex.c ar.c arsup.c binemul.c
209+			emul_vanilla.c
210+		)
211+		libcommon.a.d
212+	]]
213+	exe('bin/ar', {arobjs, 'binutils/not-ranlib.c'})
214+	exe('bin/ranlib', {arobjs, 'binutils/is-ranlib.c'})
215+
216+	for _, tool in ipairs{'size', 'objcopy', 'strings', 'readelf', 'elfedit', 'strip', 'nm', 'objdump', 'addr2line', 'ar', 'ranlib'} do
217+		file('bin/'..tool, '755', '$outdir/bin/'..tool)
218+		man{'binutils/doc/'..tool..'.1'}
219+		sym(string.format('bin/%s-%s', config.target.platform, tool), tool)
220+	end
221+end)
222+
223+sub('gas.ninja', function()
224+	cflags{
225+		'-I $dir/gas',
226+		'-I $outdir/gas',
227+		'-I $srcdir/gas',
228+		'-I $srcdir/gas/config',
229+		'-I $srcdir',
230+	}
231+	build('copy', '$outdir/gas/targ-cpu.h', '$srcdir/gas/config/tc-i386.h')
232+	build('copy', '$outdir/gas/targ-env.h', '$srcdir/gas/config/te-linux.h')
233+	build('copy', '$outdir/gas/obj-format.h', '$srcdir/gas/config/obj-elf.h')
234+	local deps = {
235+		'$gendir/deps',
236+		'$outdir/gas/targ-cpu.h',
237+		'$outdir/gas/targ-env.h',
238+		'$outdir/gas/obj-format.h',
239+	}
240+	-- src/gas/Makefile.am:/^GAS_CFILES
241+	exe('bin/as', [[
242+		gas/(
243+			app.c
244+			as.c
245+			atof-generic.c
246+			compress-debug.c
247+			cond.c
248+			depend.c
249+			dwarf2dbg.c
250+			dw2gencfi.c
251+			ecoff.c
252+			ehopt.c
253+			expr.c
254+			flonum-copy.c
255+			flonum-konst.c
256+			flonum-mult.c
257+			frags.c
258+			hash.c
259+			input-file.c
260+			input-scrub.c
261+			listing.c
262+			literal.c
263+			macro.c
264+			messages.c
265+			output-file.c
266+			read.c
267+			remap.c
268+			sb.c
269+			stabs.c
270+			subsegs.c
271+			symbols.c
272+			write.c
273+
274+			config/(tc-i386.c obj-elf.c atof-ieee.c)
275+		)
276+		libopcodes.a
277+		libbfd.a.d
278+	]], deps)
279+	file('bin/as', '755', '$outdir/bin/as')
280+	sym(string.format('bin/%s-as', config.target.platform), 'as')
281+	man{'gas/doc/as.1'}
282+end)
283+
284+sub('ld.ninja', function()
285+	cflags{
286+		'-D ELF_LIST_OPTIONS=true',
287+		'-D ELF_SHLIB_LIST_OPTIONS=true',
288+		'-D ELF_PLT_UNWIND_LIST_OPTIONS=true',
289+		string.format([[-D 'BINDIR="%s/bin"']], config.prefix),
290+		string.format([[-D 'SCRIPTDIR="%s/%s/lib"']], config.prefix, config.target.platform),
291+		string.format([[-D 'TOOLBINDIR="%s/%s/bin"']], config.prefix, config.target.platform),
292+		'-I $dir/ld',
293+		'-I $outdir/ld',
294+		'-I $srcdir/ld',
295+	}
296+	local deps = {
297+		'$gendir/deps',
298+		'$outdir/ld/ldemul-list.h',
299+	}
300+
301+	rule('ldemul', 'sh $dir/ldemul.sh $emuls >$out')
302+	build('ldemul', '$outdir/ld/ldemul-list.h', {'|', '$dir/ldemul.sh'}, {emuls=emuls})
303+
304+	build('copy', '$outdir/ld/stringify.sed', '$srcdir/ld/emultempl/astring.sed')
305+	rule('genscripts', string.format([[cd $outdir/ld && LIB_PATH= sh $$OLDPWD/$srcdir/ld/genscripts.sh $$OLDPWD/$srcdir/ld /lib '' '' %s %s %s '' /lib '%s' /lib no yes $emul %s]], config.target.platform, config.target.platform, config.target.platform, table.concat(emuls, ' '), config.target.platform))
306+	local srcs = {}
307+	for _, emul in ipairs(emuls) do
308+		local out = string.format('$outdir/ld/e%s.c', emul)
309+		table.insert(srcs, out)
310+		build('genscripts', string.format('$outdir/ld/e%s.c', emul), {'|', '$srcdir/ld/genscripts.sh', '$outdir/ld/stringify.sed'}, {
311+			emul=emul,
312+		})
313+	end
314+
315+	cc('ld/ldmain.c', nil, {cflags={
316+		'$cflags',
317+		string.format([[-D 'DEFAULT_EMULATION="%s"']], emuls[1]),
318+		string.format([[-D 'TARGET="%s"']], 'x86_64-pc-linux-musl'),
319+	}})
320+	exe('bin/ld', {
321+		-- src/ld/Makefile.am:/^ld_new_SOURCES
322+		-- src/ld/configure.tgt:/^targ_extra_ofiles
323+		paths[[
324+			ld/(
325+				ldgram.c ldlex-wrapper.c lexsup.c ldlang.c mri.c ldctor.c ldmain.c.o
326+				ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c plugin.c
327+				ldbuildid.c
328+
329+				ldelf.c ldelfgen.c
330+			)
331+			libbfd.a.d
332+		]],
333+		srcs,
334+	}, deps)
335+	file('bin/ld', '755', '$outdir/bin/ld')
336+	sym(string.format('bin/%s-ld', config.target.platform), 'ld')
337+	man{'ld/ld.1'}
338+end)
339+
340+fetch 'curl'
+92, -0
 1@@ -0,0 +1,92 @@
 2+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
 3+#  error config.h must be #included before system headers
 4+#endif
 5+#define __CONFIG_H__ 1
 6+#define DEFAULT_EMIT_GNU_HASH 1
 7+#define DEFAULT_EMIT_SYSV_HASH 0
 8+/* #undef DEFAULT_FLAG_COMPRESS_DEBUG */
 9+#define DEFAULT_LD_EXECSTACK 1
10+#define DEFAULT_LD_TEXTREL_CHECK textrel_check_warning
11+#define DEFAULT_LD_TEXTREL_CHECK_WARNING 1
12+#define DEFAULT_LD_WARN_EXECSTACK 2
13+#define DEFAULT_LD_WARN_RWX_SEGMENTS 1
14+#define DEFAULT_LD_Z_RELRO 1
15+#define DEFAULT_LD_Z_SEPARATE_CODE 1
16+#define DEFAULT_NEW_DTAGS 1
17+/* #undef ENABLE_CHECKING */
18+/* #undef ENABLE_LIBCTF */
19+/* #undef ENABLE_NLS */
20+/* #undef EXTRA_SHLIB_EXTENSION */
21+#define GOT_HANDLING_DEFAULT GOT_HANDLING_TARGET_DEFAULT
22+#define HAVE_CLOSE 1
23+#define HAVE_DECL_ASPRINTF 1
24+#define HAVE_DECL_ENVIRON 1
25+#define HAVE_DECL_GETOPT 1
26+#define HAVE_DECL_SBRK 1
27+#define HAVE_DLFCN_H 1
28+/* #undef HAVE_ELF_HINTS_H */
29+#define HAVE_FCNTL_H 1
30+#define HAVE_GETPAGESIZE 1
31+#define HAVE_GLOB 1
32+#define HAVE_INITFINI_ARRAY 1
33+#define HAVE_INTTYPES_H 1
34+/* #undef HAVE_JANSSON */
35+#define HAVE_LC_MESSAGES 1
36+#define HAVE_LIMITS_H 1
37+#define HAVE_LSEEK 1
38+#define HAVE_MEMORY_H 1
39+#define HAVE_MKSTEMP 1
40+#define HAVE_MMAP 1
41+#define HAVE_OPEN 1
42+#define HAVE_REALPATH 1
43+#define HAVE_SBRK 1
44+#define HAVE_STDINT_H 1
45+#define HAVE_STDLIB_H 1
46+#define HAVE_STRINGS_H 1
47+#define HAVE_STRING_H 1
48+#define HAVE_SYS_FILE_H 1
49+#define HAVE_SYS_MMAN_H 1
50+#define HAVE_SYS_PARAM_H 1
51+#define HAVE_SYS_STAT_H 1
52+#define HAVE_SYS_TIME_H 1
53+#define HAVE_SYS_TYPES_H 1
54+#define HAVE_UNISTD_H 1
55+#define HAVE_WAITPID 1
56+/* #undef HAVE_WINDOWS_H */
57+#define LT_OBJDIR ".libs/"
58+#define PACKAGE "ld"
59+#define PACKAGE_BUGREPORT ""
60+#define PACKAGE_NAME "ld"
61+#define PACKAGE_STRING "ld 2.39"
62+#define PACKAGE_TARNAME "ld"
63+#define PACKAGE_URL ""
64+#define PACKAGE_VERSION "2.39"
65+#define SIZEOF_VOID_P 8
66+#define STDC_HEADERS 1
67+#define SUPPORT_ERROR_HANDLING_SCRIPT 1
68+/* #undef USE_BINARY_FOPEN */
69+#ifndef _ALL_SOURCE
70+# define _ALL_SOURCE 1
71+#endif
72+#ifndef _GNU_SOURCE
73+# define _GNU_SOURCE 1
74+#endif
75+#ifndef _POSIX_PTHREAD_SEMANTICS
76+# define _POSIX_PTHREAD_SEMANTICS 1
77+#endif
78+#ifndef _TANDEM_SOURCE
79+# define _TANDEM_SOURCE 1
80+#endif
81+#ifndef __EXTENSIONS__
82+# define __EXTENSIONS__ 1
83+#endif
84+#define VERSION "2.39"
85+/* #undef YYTEXT_POINTER */
86+#ifndef _DARWIN_USE_64_BIT_INODE
87+# define _DARWIN_USE_64_BIT_INODE 1
88+#endif
89+/* #undef _FILE_OFFSET_BITS */
90+/* #undef _LARGE_FILES */
91+/* #undef _MINIX */
92+/* #undef _POSIX_1_SOURCE */
93+/* #undef _POSIX_SOURCE */
+4, -0
1@@ -0,0 +1,4 @@
2+printf 'extern ld_emulation_xfer_type ld_%s_emulation;\n' "$@"
3+printf '#define EMULATION_LIST '
4+printf '&ld_%s_emulation, ' "$@"
5+printf '0\n'
+201, -0
  1@@ -0,0 +1,201 @@
  2+/* #undef AC_APPLE_UNIVERSAL_BUILD */
  3+/* #undef CRAY_STACKSEG_END */
  4+#define HAVE_ALLOCA_H 1
  5+#define HAVE_ASPRINTF 1
  6+#define HAVE_ATEXIT 1
  7+#define HAVE_BASENAME 1
  8+#define HAVE_BCMP 1
  9+#define HAVE_BCOPY 1
 10+#define HAVE_BSEARCH 1
 11+#define HAVE_BZERO 1
 12+#define HAVE_CALLOC 1
 13+/* #undef HAVE_CANONICALIZE_FILE_NAME */
 14+#define HAVE_CLOCK 1
 15+#define HAVE_DECL_ASPRINTF 1
 16+#define HAVE_DECL_BASENAME 1
 17+#define HAVE_DECL_CALLOC 1
 18+#define HAVE_DECL_FFS 1
 19+#define HAVE_DECL_GETENV 1
 20+#define HAVE_DECL_GETOPT 1
 21+#define HAVE_DECL_MALLOC 1
 22+#define HAVE_DECL_REALLOC 1
 23+#define HAVE_DECL_SBRK 1
 24+#define HAVE_DECL_SNPRINTF 1
 25+#define HAVE_DECL_STRNLEN 1
 26+#define HAVE_DECL_STRTOL 1
 27+#define HAVE_DECL_STRTOLL 1
 28+#define HAVE_DECL_STRTOUL 1
 29+#define HAVE_DECL_STRTOULL 1
 30+#define HAVE_DECL_STRVERSCMP 1
 31+#define HAVE_DECL_VASPRINTF 1
 32+#define HAVE_DECL_VSNPRINTF 1
 33+#define HAVE_DUP3 1
 34+#define HAVE_FCNTL_H 1
 35+#define HAVE_FFS 1
 36+#define HAVE_FORK 1
 37+#define HAVE_GETCWD 1
 38+#define HAVE_GETPAGESIZE 1
 39+#define HAVE_GETRLIMIT 1
 40+#define HAVE_GETRUSAGE 1
 41+/* #undef HAVE_GETSYSINFO */
 42+#define HAVE_GETTIMEOFDAY 1
 43+#define HAVE_INDEX 1
 44+#define HAVE_INSQUE 1
 45+#define HAVE_INTPTR_T 1
 46+#define HAVE_INTTYPES_H 1
 47+#define HAVE_LIMITS_H 1
 48+#define HAVE_LONG_LONG 1
 49+/* #undef HAVE_MACHINE_HAL_SYSINFO_H */
 50+#define HAVE_MALLOC_H 1
 51+#define HAVE_MEMCHR 1
 52+#define HAVE_MEMCMP 1
 53+#define HAVE_MEMCPY 1
 54+#define HAVE_MEMMEM 1
 55+#define HAVE_MEMMOVE 1
 56+#define HAVE_MEMORY_H 1
 57+#define HAVE_MEMSET 1
 58+#define HAVE_MKSTEMPS 1
 59+#define HAVE_MMAP 1
 60+/* #undef HAVE_ON_EXIT */
 61+#define HAVE_PIPE2 1
 62+#define HAVE_POSIX_SPAWN 1
 63+/* #undef HAVE_PROCESS_H */
 64+#define HAVE_PSIGNAL 1
 65+/* #undef HAVE_PSTAT_GETDYNAMIC */
 66+/* #undef HAVE_PSTAT_GETSTATIC */
 67+#define HAVE_PUTENV 1
 68+#define HAVE_RANDOM 1
 69+#define HAVE_REALPATH 1
 70+#define HAVE_RENAME 1
 71+#define HAVE_RINDEX 1
 72+#define HAVE_SBRK 1
 73+#define HAVE_SETENV 1
 74+/* #undef HAVE_SETPROCTITLE */
 75+#define HAVE_SETRLIMIT 1
 76+/* #undef HAVE_SIGSETMASK */
 77+#define HAVE_SNPRINTF 1
 78+/* #undef HAVE_SPAWNVE */
 79+/* #undef HAVE_SPAWNVPE */
 80+#define HAVE_SPAWN_H 1
 81+#define HAVE_STDINT_H 1
 82+#define HAVE_STDIO_EXT_H 1
 83+#define HAVE_STDLIB_H 1
 84+#define HAVE_STPCPY 1
 85+#define HAVE_STPNCPY 1
 86+#define HAVE_STRCASECMP 1
 87+#define HAVE_STRCHR 1
 88+#define HAVE_STRDUP 1
 89+#define HAVE_STRERROR 1
 90+#define HAVE_STRINGS_H 1
 91+#define HAVE_STRING_H 1
 92+#define HAVE_STRNCASECMP 1
 93+#define HAVE_STRNDUP 1
 94+#define HAVE_STRNLEN 1
 95+#define HAVE_STRRCHR 1
 96+#define HAVE_STRSIGNAL 1
 97+#define HAVE_STRSTR 1
 98+#define HAVE_STRTOD 1
 99+#define HAVE_STRTOL 1
100+#define HAVE_STRTOLL 1
101+#define HAVE_STRTOUL 1
102+#define HAVE_STRTOULL 1
103+#define HAVE_STRVERSCMP 1
104+#define HAVE_SYSCONF 1
105+/* #undef HAVE_SYSCTL */
106+/* #undef HAVE_SYSMP */
107+/* #undef HAVE_SYS_ERRLIST */
108+#define HAVE_SYS_FILE_H 1
109+#define HAVE_SYS_MMAN_H 1
110+/* #undef HAVE_SYS_NERR */
111+#define HAVE_SYS_PARAM_H 1
112+#define HAVE_SYS_PRCTL_H 1
113+/* #undef HAVE_SYS_PSTAT_H */
114+#define HAVE_SYS_RESOURCE_H 1
115+/* #undef HAVE_SYS_SIGLIST */
116+#define HAVE_SYS_STAT_H 1
117+/* #undef HAVE_SYS_SYSCTL_H */
118+#define HAVE_SYS_SYSINFO_H 1
119+/* #undef HAVE_SYS_SYSMP_H */
120+/* #undef HAVE_SYS_SYSTEMCFG_H */
121+/* #undef HAVE_SYS_TABLE_H */
122+#define HAVE_SYS_TIME_H 1
123+#define HAVE_SYS_TYPES_H 1
124+#define HAVE_SYS_WAIT_H 1
125+/* #undef HAVE_TABLE */
126+#define HAVE_TIMES 1
127+#define HAVE_TIME_H 1
128+#define HAVE_TMPNAM 1
129+#define HAVE_UINTPTR_T 1
130+#define HAVE_UNISTD_H 1
131+#define HAVE_VASPRINTF 1
132+#define HAVE_VFORK 1
133+/* #undef HAVE_VFORK_H */
134+#define HAVE_VFPRINTF 1
135+#define HAVE_VPRINTF 1
136+#define HAVE_VSPRINTF 1
137+#define HAVE_WAIT3 1
138+#define HAVE_WAIT4 1
139+#define HAVE_WAITPID 1
140+#define HAVE_WORKING_FORK 1
141+#define HAVE_WORKING_VFORK 1
142+/* #undef HAVE__DOPRNT */
143+/* #undef HAVE__SYSTEM_CONFIGURATION */
144+#define HAVE___FSETLOCKING 1
145+#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
146+/* #undef NEED_DECLARATION_ERRNO */
147+/* #undef NO_MINUS_C_MINUS_O */
148+#define PACKAGE_BUGREPORT ""
149+#define PACKAGE_NAME ""
150+#define PACKAGE_STRING ""
151+#define PACKAGE_TARNAME ""
152+#define PACKAGE_URL ""
153+#define PACKAGE_VERSION ""
154+#define SIZEOF_INT 4
155+#define SIZEOF_LONG 8
156+#define SIZEOF_LONG_LONG 8
157+#define SIZEOF_SIZE_T 8
158+#define STACK_DIRECTION -1
159+#define STDC_HEADERS 1
160+#define TIME_WITH_SYS_TIME 1
161+#define UNSIGNED_64BIT_TYPE uint64_t
162+#ifndef _ALL_SOURCE
163+# define _ALL_SOURCE 1
164+#endif
165+#ifndef _GNU_SOURCE
166+# define _GNU_SOURCE 1
167+#endif
168+#ifndef _POSIX_PTHREAD_SEMANTICS
169+# define _POSIX_PTHREAD_SEMANTICS 1
170+#endif
171+#ifndef _TANDEM_SOURCE
172+# define _TANDEM_SOURCE 1
173+#endif
174+#ifndef __EXTENSIONS__
175+# define __EXTENSIONS__ 1
176+#endif
177+#if defined AC_APPLE_UNIVERSAL_BUILD
178+# if defined __BIG_ENDIAN__
179+#  define WORDS_BIGENDIAN 1
180+# endif
181+#else
182+# ifndef WORDS_BIGENDIAN
183+/* #  undef WORDS_BIGENDIAN */
184+# endif
185+#endif
186+#ifndef _DARWIN_USE_64_BIT_INODE
187+# define _DARWIN_USE_64_BIT_INODE 1
188+#endif
189+/* #undef _FILE_OFFSET_BITS */
190+/* #undef _LARGE_FILES */
191+/* #undef _MINIX */
192+/* #undef _POSIX_1_SOURCE */
193+/* #undef _POSIX_SOURCE */
194+/* #undef const */
195+#ifndef __cplusplus
196+/* #undef inline */
197+#endif
198+/* #undef intptr_t */
199+/* #undef pid_t */
200+/* #undef ssize_t */
201+/* #undef uintptr_t */
202+/* #undef vfork */
+48, -0
 1@@ -0,0 +1,48 @@
 2+#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
 3+#  error config.h must be #included before system headers
 4+#endif
 5+#define __CONFIG_H__ 1
 6+/* #undef ENABLE_CHECKING */
 7+/* #undef ENABLE_NLS */
 8+#define HAVE_DECL_BASENAME 1
 9+#define HAVE_DECL_STPCPY 1
10+#define HAVE_DLFCN_H 1
11+#define HAVE_INTTYPES_H 1
12+#define HAVE_MEMORY_H 1
13+#define HAVE_SIGSETJMP 1
14+#define HAVE_STDINT_H 1
15+#define HAVE_STDLIB_H 1
16+#define HAVE_STRINGS_H 1
17+#define HAVE_STRING_H 1
18+#define HAVE_SYS_STAT_H 1
19+#define HAVE_SYS_TYPES_H 1
20+#define HAVE_UNISTD_H 1
21+#define LT_OBJDIR ".libs/"
22+#define PACKAGE "opcodes"
23+#define PACKAGE_BUGREPORT ""
24+#define PACKAGE_NAME "opcodes"
25+#define PACKAGE_STRING "opcodes 2.39"
26+#define PACKAGE_TARNAME "opcodes"
27+#define PACKAGE_URL ""
28+#define PACKAGE_VERSION "2.39"
29+#define SIZEOF_VOID_P 8
30+#define STDC_HEADERS 1
31+#ifndef _ALL_SOURCE
32+# define _ALL_SOURCE 1
33+#endif
34+#ifndef _GNU_SOURCE
35+# define _GNU_SOURCE 1
36+#endif
37+#ifndef _POSIX_PTHREAD_SEMANTICS
38+# define _POSIX_PTHREAD_SEMANTICS 1
39+#endif
40+#ifndef _TANDEM_SOURCE
41+# define _TANDEM_SOURCE 1
42+#endif
43+#ifndef __EXTENSIONS__
44+# define __EXTENSIONS__ 1
45+#endif
46+#define VERSION "2.39"
47+/* #undef _MINIX */
48+/* #undef _POSIX_1_SOURCE */
49+/* #undef _POSIX_SOURCE */
+222, -0
  1@@ -0,0 +1,222 @@
  2+From 8e578ea68fa570aa46f04d4cf1c593ac11732bdf Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Wed, 17 Apr 2019 16:44:05 -0700
  5+Subject: [PATCH] libiberty: Implement pex_unix_exec_child using posix_spawn
  6+
  7+---
  8+ libiberty/config.in    |  6 +++
  9+ libiberty/configure    | 10 ++---
 10+ libiberty/configure.ac | 10 ++---
 11+ libiberty/pex-unix.c   | 95 +++++++++++++++++++++++++++++++++++++++++-
 12+ 4 files changed, 110 insertions(+), 11 deletions(-)
 13+
 14+diff --git a/libiberty/config.in b/libiberty/config.in
 15+index f7052b5d958..ce79a9e77f2 100644
 16+--- a/libiberty/config.in
 17++++ b/libiberty/config.in
 18+@@ -198,6 +198,9 @@
 19+ /* Define to 1 if you have the `pipe2' function. */
 20+ #undef HAVE_PIPE2
 21+ 
 22++/* Define to 1 if you have the `posix_spawn' function. */
 23++#undef HAVE_POSIX_SPAWN
 24++
 25+ /* Define to 1 if you have the <process.h> header file. */
 26+ #undef HAVE_PROCESS_H
 27+ 
 28+@@ -249,6 +252,9 @@
 29+ /* Define to 1 if you have the `spawnvpe' function. */
 30+ #undef HAVE_SPAWNVPE
 31+ 
 32++/* Define to 1 if you have the <spawn.h> header file. */
 33++#undef HAVE_SPAWN_H
 34++
 35+ /* Define to 1 if you have the <stdint.h> header file. */
 36+ #undef HAVE_STDINT_H
 37+ 
 38+diff --git a/libiberty/configure b/libiberty/configure
 39+index 306c07bd37e..6f85b1fd529 100755
 40+--- a/libiberty/configure
 41++++ b/libiberty/configure
 42+@@ -5652,7 +5652,7 @@ host_makefile_frag=${frag}
 43+ # It's OK to check for header files.  Although the compiler may not be
 44+ # able to link anything, it had better be able to at least compile
 45+ # something.
 46+-for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h sys/prctl.h
 47++for ac_header in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h sys/prctl.h spawn.h
 48+ do :
 49+   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 50+ ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header"
 51+@@ -6161,9 +6161,9 @@ funcs="$funcs setproctitle"
 52+ vars="sys_errlist sys_nerr sys_siglist"
 53+ 
 54+ checkfuncs="__fsetlocking canonicalize_file_name dup3 getrlimit getrusage \
 55+- getsysinfo gettimeofday on_exit pipe2 psignal pstat_getdynamic pstat_getstatic \
 56+- realpath setrlimit spawnve spawnvpe strerror strsignal sysconf sysctl \
 57+- sysmp table times wait3 wait4"
 58++ getsysinfo gettimeofday on_exit pipe2 posix_spawn psignal pstat_getdynamic \
 59++ pstat_getstatic realpath setrlimit spawnve spawnvpe strerror strsignal \
 60++ sysconf sysctl sysmp table times wait3 wait4"
 61+ 
 62+ # Darwin has sbrk, but it is deprecated and that produces build-time warnings
 63+ # so do not check for it.
 64+@@ -6184,7 +6184,7 @@ if test "x" = "y"; then
 65+     index insque \
 66+     memchr memcmp memcpy memmem memmove memset mkstemps \
 67+     on_exit \
 68+-    pipe2 psignal pstat_getdynamic pstat_getstatic putenv \
 69++    pipe2 posix_spawn psignal pstat_getdynamic pstat_getstatic putenv \
 70+     random realpath rename rindex \
 71+     sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \
 72+      stpcpy stpncpy strcasecmp strchr strdup \
 73+diff --git a/libiberty/configure.ac b/libiberty/configure.ac
 74+index 6c1ff9c6093..5d21f383e7d 100644
 75+--- a/libiberty/configure.ac
 76++++ b/libiberty/configure.ac
 77+@@ -289,7 +289,7 @@ AC_SUBST_FILE(host_makefile_frag)
 78+ # It's OK to check for header files.  Although the compiler may not be
 79+ # able to link anything, it had better be able to at least compile
 80+ # something.
 81+-AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h sys/prctl.h)
 82++AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h stdint.h stdio_ext.h process.h sys/prctl.h spawn.h)
 83+ AC_HEADER_SYS_WAIT
 84+ AC_HEADER_TIME
 85+ 
 86+@@ -412,9 +412,9 @@ funcs="$funcs setproctitle"
 87+ vars="sys_errlist sys_nerr sys_siglist"
 88+ 
 89+ checkfuncs="__fsetlocking canonicalize_file_name dup3 getrlimit getrusage \
 90+- getsysinfo gettimeofday on_exit pipe2 psignal pstat_getdynamic pstat_getstatic \
 91+- realpath setrlimit spawnve spawnvpe strerror strsignal sysconf sysctl \
 92+- sysmp table times wait3 wait4"
 93++ getsysinfo gettimeofday on_exit pipe2 posix_spawn psignal pstat_getdynamic \
 94++ pstat_getstatic realpath setrlimit spawnve spawnvpe strerror strsignal \
 95++ sysconf sysctl sysmp table times wait3 wait4"
 96+ 
 97+ # Darwin has sbrk, but it is deprecated and that produces build-time warnings
 98+ # so do not check for it.
 99+@@ -435,7 +435,7 @@ if test "x" = "y"; then
100+     index insque \
101+     memchr memcmp memcpy memmem memmove memset mkstemps \
102+     on_exit \
103+-    pipe2 psignal pstat_getdynamic pstat_getstatic putenv \
104++    pipe2 posix_spawn psignal pstat_getdynamic pstat_getstatic putenv \
105+     random realpath rename rindex \
106+     sbrk setenv setproctitle setrlimit sigsetmask snprintf spawnve spawnvpe \
107+      stpcpy stpncpy strcasecmp strchr strdup \
108+diff --git a/libiberty/pex-unix.c b/libiberty/pex-unix.c
109+index 850d344ba58..ba3a6d5d38f 100644
110+--- a/libiberty/pex-unix.c
111++++ b/libiberty/pex-unix.c
112+@@ -58,6 +58,9 @@ extern int errno;
113+ #ifdef HAVE_PROCESS_H
114+ #include <process.h>
115+ #endif
116++#ifdef HAVE_SPAWN_H
117++#include <spawn.h>
118++#endif
119+ 
120+ #ifdef vfork /* Autoconf may define this to fork for us. */
121+ # define VFORK_STRING "fork"
122+@@ -366,7 +369,97 @@ pex_unix_close (struct pex_obj *obj ATTRIBUTE_UNUSED, int fd)
123+ 
124+ /* Execute a child.  */
125+ 
126+-#if defined(HAVE_SPAWNVE) && defined(HAVE_SPAWNVPE)
127++#if defined(HAVE_POSIX_SPAWN)
128++/* Implementation of pex->exec_child using the posix_spawn operation.  */
129++
130++static pid_t
131++pex_unix_exec_child (struct pex_obj *obj, int flags, const char *executable,
132++		     char * const * argv, char * const * env,
133++                     int in, int out, int errdes,
134++		     int toclose, const char **errmsg, int *err)
135++{
136++  posix_spawn_file_actions_t file_actions;
137++  pid_t pid;
138++  int ret;
139++
140++  *errmsg = "posix_spawn";
141++  ret = posix_spawn_file_actions_init (&file_actions);
142++  if (ret != 0)
143++    goto error;
144++  if (in != STDIN_FILE_NO)
145++    {
146++      ret = posix_spawn_file_actions_adddup2 (&file_actions, in, STDIN_FILE_NO);
147++      if (ret != 0)
148++        goto error;
149++      ret = posix_spawn_file_actions_addclose (&file_actions, in);
150++      if (ret != 0)
151++        goto error;
152++    }
153++  if (out != STDOUT_FILE_NO)
154++    {
155++      ret = posix_spawn_file_actions_adddup2 (&file_actions, out, STDOUT_FILE_NO);
156++      if (ret != 0)
157++        goto error;
158++      ret = posix_spawn_file_actions_addclose (&file_actions, out);
159++      if (ret != 0)
160++        goto error;
161++    }
162++  if ((flags & PEX_STDERR_TO_STDOUT) != 0)
163++    {
164++      ret = posix_spawn_file_actions_adddup2 (&file_actions, STDOUT_FILE_NO, STDERR_FILE_NO);
165++      if (ret != 0)
166++        goto error;
167++    }
168++  else if (errdes != STDERR_FILE_NO)
169++    {
170++      ret = posix_spawn_file_actions_adddup2 (&file_actions, errdes, STDERR_FILE_NO);
171++      if (ret != 0)
172++        goto error;
173++      ret = posix_spawn_file_actions_addclose (&file_actions, errdes);
174++      if (ret != 0)
175++        goto error;
176++    }
177++  if (toclose >= 0)
178++    {
179++      ret = posix_spawn_file_actions_addclose (&file_actions, toclose);
180++      if (ret != 0)
181++        goto error;
182++    }
183++  if (env == NULL)
184++    env = environ;
185++  if ((flags & PEX_SEARCH) != 0)
186++    ret = posix_spawnp (&pid, executable, &file_actions, NULL, argv, env);
187++  else
188++    ret = posix_spawn (&pid, executable, &file_actions, NULL, argv, env);
189++  if (ret != 0)
190++    goto error;
191++  posix_spawn_file_actions_destroy(&file_actions);
192++
193++  *errmsg = "close";
194++  if (in != STDIN_FILE_NO && close (in) < 0)
195++    {
196++      ret = errno;
197++      goto error;
198++    }
199++  if (out != STDOUT_FILE_NO && close (out) < 0)
200++    {
201++      ret = errno;
202++      goto error;
203++    }
204++  if (errdes != STDERR_FILE_NO && close (errdes) < 0)
205++    {
206++      ret = errno;
207++      goto error;
208++    }
209++
210++  return pid;
211++
212++ error:
213++  *err = ret;
214++  return (pid_t) -1;
215++}
216++
217++#elif defined(HAVE_SPAWNVE) && defined(HAVE_SPAWNVPE)
218+ /* Implementation of pex->exec_child using the Cygwin spawn operation.  */
219+ 
220+ /* Subroutine of pex_unix_exec_child.  Move OLD_FD to a new file descriptor
221+-- 
222+2.35.1
223+
+29, -0
 1@@ -0,0 +1,29 @@
 2+From 7e7d7da3e8d453d1125488cc5cd7c42293b62934 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 5 Jun 2020 01:17:51 -0700
 5+Subject: [PATCH] Adjust style to prevent gcc warning
 6+
 7+This is still implementation-defined, but matches the style used
 8+elsewhere in this file and prevents a conversion overflow warning.
 9+---
10+ bfd/elf.c | 3 ++-
11+ 1 file changed, 2 insertions(+), 1 deletion(-)
12+
13+diff --git a/bfd/elf.c b/bfd/elf.c
14+index 84a5d94281..5631993d15 100644
15+--- a/bfd/elf.c
16++++ b/bfd/elf.c
17+@@ -734,8 +734,9 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
18+ 	      /* If all groups are invalid then fail.  */
19+ 	      if (num_group == 0)
20+ 		{
21++		  num_group = (unsigned) -1;
22+ 		  elf_tdata (abfd)->group_sect_ptr = NULL;
23+-		  elf_tdata (abfd)->num_group = num_group = -1;
24++		  elf_tdata (abfd)->num_group = num_group;
25+ 		  _bfd_error_handler
26+ 		    (_("%pB: no valid group sections found"), abfd);
27+ 		  bfd_set_error (bfd_error_bad_value);
28+-- 
29+2.30.0
30+
+62, -0
 1@@ -0,0 +1,62 @@
 2+From dab3e5da03770ba254c95d0c1d8c9f029dd57257 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 6 Sep 2021 18:51:05 -0700
 5+Subject: [PATCH] Remove support for long double in error formatter
 6+
 7+No bfd errors try to format long double, so there is no point in
 8+supporting it in the formatter.
 9+---
10+ bfd/bfd.c | 9 ++-------
11+ 1 file changed, 2 insertions(+), 7 deletions(-)
12+
13+diff --git a/bfd/bfd.c b/bfd/bfd.c
14+index a2f294da983..3e59057d07a 100644
15+--- a/bfd/bfd.c
16++++ b/bfd/bfd.c
17+@@ -871,7 +871,6 @@ union _bfd_doprnt_args
18+   long l;
19+   long long ll;
20+   double d;
21+-  long double ld;
22+   void *p;
23+   enum
24+   {
25+@@ -880,7 +879,6 @@ union _bfd_doprnt_args
26+     Long,
27+     LongLong,
28+     Double,
29+-    LongDouble,
30+     Ptr
31+   } type;
32+ };
33+@@ -1066,7 +1064,7 @@ _bfd_doprnt (FILE *stream, const char *format, union _bfd_doprnt_args *args)
34+ 		if (wide_width == 0)
35+ 		  PRINT_TYPE (double, d);
36+ 		else
37+-		  PRINT_TYPE (long double, ld);
38++		  abort();
39+ 	      }
40+ 	      break;
41+ 	    case 's':
42+@@ -1283,7 +1281,7 @@ _bfd_doprnt_scan (const char *format, union _bfd_doprnt_args *args)
43+ 		if (wide_width == 0)
44+ 		  arg_type = Double;
45+ 		else
46+-		  arg_type = LongDouble;
47++		  abort();
48+ 	      }
49+ 	      break;
50+ 	    case 's':
51+@@ -1334,9 +1332,6 @@ error_handler_internal (const char *fmt, va_list ap)
52+ 	case Double:
53+ 	  args[i].d = va_arg (ap, double);
54+ 	  break;
55+-	case LongDouble:
56+-	  args[i].ld = va_arg (ap, long double);
57+-	  break;
58+ 	case Ptr:
59+ 	  args[i].p = va_arg (ap, void *);
60+ 	  break;
61+-- 
62+2.34.1
63+
+1, -0
1@@ -0,0 +1 @@
2+645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00  binutils-2.39.tar.xz
+1, -0
1@@ -0,0 +1 @@
2+url = "https://ftp.gnu.org/gnu/binutils/binutils-2.39.tar.xz"
+288, -0
  1@@ -0,0 +1,288 @@
  2+local elf = {
  3+	'elf.c', 'elflink.c', 'elf-attrs.c', 'elf-strtab.c', 'elf-eh-frame.c',
  4+	'dwarf1.c', 'dwarf2.c'
  5+}
  6+local coffgen = {'coffgen.c', 'dwarf2.c'}
  7+local coff = {'cofflink.c', coffgen}
  8+local ecoff = {'ecofflink.c', coffgen}
  9+local xcoff = {'xcofflink.c', coffgen}
 10+local elfxx_x86 = {'elfxx-x86.c', 'elf-ifunc.c', 'elf-nacl.c', 'elf-vxworks.c'}
 11+
 12+-- src/bfd/configure.ac:/for vec in/
 13+return {
 14+	aarch64_elf32_be_vec={'elf32-aarch64.c', 'elfxx-aarch64.c', 'elf-ifunc.c', 'elf32.c', elf},
 15+	aarch64_elf32_le_vec={'elf32-aarch64.c', 'elfxx-aarch64.c', 'elf-ifunc.c', 'elf32.c', elf},
 16+	aarch64_elf64_be_vec={'elf64-aarch64.c', 'elfxx-aarch64.c', 'elf-ifunc.c', 'elf64.c', elf},
 17+	aarch64_elf64_be_cloudabi_vec={'elf64-aarch64.c', 'elfxx-aarch64.c', 'elf-ifunc.c', 'elf64.c', elf},
 18+	aarch64_elf64_le_vec={'elf64-aarch64.c', 'elfxx-aarch64.c', 'elf-ifunc.c', 'elf64.c', elf},
 19+	aarch64_elf64_le_cloudabi_vec={'elf64-aarch64.c', 'elfxx-aarch64.c', 'elf-ifunc.c', 'elf64.c', elf},
 20+	aarch64_mach_o_vec={'mach-o-aarch64.c'},
 21+	aarch64_pei_vec={'pei-aarch64.c', 'pe-aarch64igen.c', coff},
 22+	alpha_ecoff_le_vec={'coff-alpha.c', 'ecoff.c', ecoff},
 23+	alpha_elf64_vec={'elf64-alpha.c', 'elf64.c', elf},
 24+	alpha_elf64_fbsd_vec={'elf64-alpha.c', 'elf64.c', elf},
 25+	alpha_vms_vec={'vms-alpha.c', 'vms-misc.c', 'vms-lib.c'},
 26+	alpha_vms_lib_txt_vec={'vms-lib.c', 'vms-misc.c'},
 27+	am33_elf32_linux_vec={'elf32-am33lin.c', 'elf32.c', elf},
 28+	amdgcn_elf64_le_vec={'elf64-amdgcn.c', 'elf64.c', elf},
 29+	aout0_be_vec={'aout0.c', 'aout32.c'},
 30+	aout64_vec={'demo64.c', 'aout64.c'},
 31+	aout_vec={'host-aout.c', 'aout32.c'},
 32+	arc_elf32_be_vec={'elf32-arc.c', 'elf32.c', elf},
 33+	arc_elf32_le_vec={'elf32-arc.c', 'elf32.c', elf},
 34+	arm_elf32_be_vec={'elf32-arm.c', 'elf32.c', 'elf-nacl.c', 'elf-vxworks.c', elf},
 35+	arm_elf32_le_vec={'elf32-arm.c', 'elf32.c', 'elf-nacl.c', 'elf-vxworks.c', elf},
 36+	arm_elf32_fdpic_be_vec={'elf32-arm.c', 'elf32.c', 'elf-nacl.c', 'elf-vxworks.c', elf},
 37+	arm_elf32_fdpic_le_vec={'elf32-arm.c', 'elf32.c', 'elf-nacl.c', 'elf-vxworks.c', elf},
 38+	arm_elf32_nacl_be_vec={'elf32-arm.c', 'elf32.c', 'elf-nacl.c', 'elf-vxworks.c', elf},
 39+	arm_elf32_nacl_le_vec={'elf32-arm.c', 'elf32.c', 'elf-nacl.c', 'elf-vxworks.c', elf},
 40+	arm_elf32_vxworks_be_vec={'elf32-arm.c', 'elf32.c', 'elf-nacl.c', 'elf-vxworks.c', elf},
 41+	arm_elf32_vxworks_le_vec={'elf32-arm.c', 'elf32.c', 'elf-nacl.c', 'elf-vxworks.c', elf},
 42+	arm_pe_be_vec={'pe-arm.c', 'peigen.c', coff},
 43+	arm_pe_le_vec={'pe-arm.c', 'peigen.c', coff},
 44+	arm_pe_wince_be_vec={'pe-arm-wince.c', 'pe-arm.c', 'peigen.c', coff},
 45+	arm_pe_wince_le_vec={'pe-arm-wince.c', 'pe-arm.c', 'peigen.c', coff},
 46+	arm_pei_be_vec={'pei-arm.c', 'peigen.c', coff},
 47+	arm_pei_le_vec={'pei-arm.c', 'peigen.c', coff},
 48+	arm_pei_wince_be_vec={'pei-arm-wince.c', 'pei-arm.c', 'peigen.c', coff},
 49+	arm_pei_wince_le_vec={'pei-arm-wince.c', 'pei-arm.c', 'peigen.c', coff},
 50+	arm_mach_o_vec={'mach-o-arm.c'},
 51+	avr_elf32_vec={'elf32-avr.c', 'elf32.c', elf},
 52+	bfin_elf32_vec={'elf32-bfin.c', 'elf32.c', elf},
 53+	bfin_elf32_fdpic_vec={'elf32-bfin.c', 'elf32.c', elf},
 54+	cr16_elf32_vec={'elf32-cr16.c', 'elf32.c', elf},
 55+	cris_aout_vec={'aout-cris.c'},
 56+	cris_elf32_vec={'elf32-cris.c', 'elf32.c', elf},
 57+	cris_elf32_us_vec={'elf32-cris.c', 'elf32.c', elf},
 58+	crx_elf32_vec={'elf32-crx.c', 'elf32.c', elf},
 59+	csky_elf32_be_vec={'elf32-csky.c', 'elf32.c', elf},
 60+	csky_elf32_le_vec={'elf32-csky.c', 'elf32.c', elf},
 61+	d10v_elf32_vec={'elf32-d10v.c', 'elf32.c', elf},
 62+	d30v_elf32_vec={'elf32-d30v.c', 'elf32.c', elf},
 63+	dlx_elf32_be_vec={'elf32-dlx.c', 'elf32.c', elf},
 64+	elf32_be_vec={'elf32-gen.c', 'elf32.c', elf},
 65+	elf32_le_vec={'elf32-gen.c', 'elf32.c', elf},
 66+	elf64_be_vec={'elf64-gen.c', 'elf64.c', elf},
 67+	elf64_le_vec={'elf64-gen.c', 'elf64.c', elf},
 68+	bpf_elf64_le_vec={'elf64-bpf.c', 'elf64.c', elf},
 69+	bpf_elf64_be_vec={'elf64-bpf.c', 'elf64.c', elf},
 70+	epiphany_elf32_vec={'elf32-epiphany.c', 'elf32.c', elf},
 71+	fr30_elf32_vec={'elf32-fr30.c', 'elf32.c', elf},
 72+	frv_elf32_vec={'elf32-frv.c', 'elf32.c', elf},
 73+	frv_elf32_fdpic_vec={'elf32-frv.c', 'elf32.c', elf},
 74+	h8300_elf32_vec={'elf32-h8300.c', 'elf32.c', elf},
 75+	h8300_elf32_linux_vec={'elf32-h8300.c', 'elf32.c', elf},
 76+	hppa_elf32_vec={'elf32-hppa.c', 'elf32.c', elf},
 77+	hppa_elf32_linux_vec={'elf32-hppa.c', 'elf32.c', elf},
 78+	hppa_elf32_nbsd_vec={'elf32-hppa.c', 'elf32.c', elf},
 79+	hppa_elf64_vec={'elf64-hppa.c', 'elf64.c', elf},
 80+	hppa_elf64_linux_vec={'elf64-hppa.c', 'elf64.c', elf},
 81+	hppa_som_vec={'som.c'},
 82+	i386_aout_vec={'i386aout.c', 'aout32.c'},
 83+	i386_aout_bsd_vec={'i386bsd.c', 'aout32.c'},
 84+	i386_aout_lynx_vec={'i386lynx.c', 'lynx-core.c', 'aout32.c'},
 85+	i386_coff_vec={'coff-i386.c', coff},
 86+	i386_coff_go32_vec={'coff-go32.c', coff},
 87+	i386_coff_go32stubbed_vec={'coff-stgo32.c', coff},
 88+	i386_coff_lynx_vec={'cf-i386lynx.c', 'lynx-core.c', coff},
 89+	i386_elf32_vec={'elf32-i386.c', elfxx_x86, 'elf32.c', elf},
 90+	i386_elf32_fbsd_vec={'elf32-i386.c', elfxx_x86, 'elf32.c', elf},
 91+	i386_elf32_sol2_vec={'elf32-i386.c', elfxx_x86, 'elf32.c', elf},
 92+	i386_elf32_vxworks_vec={'elf32-i386.c', elfxx_x86, 'elf32.c', elf},
 93+	i386_mach_o_vec={'mach-o-i386.c'},
 94+	i386_msdos_vec={'i386msdos.c'},
 95+	i386_pe_vec={'pe-i386.c', 'peigen.c', coff},
 96+	i386_pe_big_vec={'pe-i386.c', 'peigen.c', coff},
 97+	i386_pei_vec={'pei-i386.c', 'peigen.c', coff},
 98+	iamcu_elf32_vec={'elf32-i386.c', elfxx_x86, 'elf32.c', elf},
 99+	ia64_elf32_be_vec={'elf32-ia64.c', 'elfxx-ia64.c', 'elf32.c', elf},
100+	ia64_elf32_hpux_be_vec={'elf32-ia64.c', 'elfxx-ia64.c', 'elf32.c', elf},
101+	ia64_elf64_be_vec={'elf64-ia64.c', 'elfxx-ia64.c', 'elf64.c', elf},
102+	ia64_elf64_le_vec={'elf64-ia64.c', 'elfxx-ia64.c', 'elf64.c', elf},
103+	ia64_elf64_hpux_be_vec={'elf64-ia64.c', 'elfxx-ia64.c', 'elf64.c', elf},
104+	ia64_elf64_vms_vec={'elf64-ia64-vms.c', 'elf64-ia64.c', 'elfxx-ia64.c', 'elf64.c', 'vms-lib.c', 'vms-misc.c', elf},
105+	ia64_pei_vec={'pei-ia64.c', 'pepigen.c', coff},
106+	ip2k_elf32_vec={'elf32-ip2k.c', 'elf32.c', elf},
107+	iq2000_elf32_vec={'elf32-iq2000.c', 'elf32.c', elf},
108+	lm32_elf32_vec={'elf32-lm32.c', 'elf32.c', elf},
109+	lm32_elf32_fdpic_vec={'elf32-lm32.c', 'elf32.c', elf},
110+	loongarch_elf32_vec={'elf32-loongarch.c', 'elfxx-loongarch.c', 'elf32.c', 'elf-ifunc.c', elf},
111+	loongarch_elf64_vec={'elf64-loongarch.c', 'elf64.c', 'elfxx-loongarch.c', 'elf32.c', 'elf-ifunc.c', elf},
112+	m32c_elf32_vec={'elf32-m32c.c', 'elf32.c', elf},
113+	m32r_elf32_vec={'elf32-m32r.c', 'elf32.c', elf},
114+	m32r_elf32_le_vec={'elf32-m32r.c', 'elf32.c', elf},
115+	m32r_elf32_linux_vec={'elf32-m32r.c', 'elf32.c', elf},
116+	m32r_elf32_linux_le_vec={'elf32-m32r.c', 'elf32.c', elf},
117+	m68hc11_elf32_vec={'elf32-m68hc11.c', 'elf32-m68hc1x.c', 'elf32.c', elf},
118+	m68hc12_elf32_vec={'elf32-m68hc12.c', 'elf32-m68hc1x.c', 'elf32.c', elf},
119+	m68k_elf32_vec={'elf32-m68k.c', 'elf32.c', elf},
120+	s12z_elf32_vec={'elf32-s12z.c', 'elf32.c', elf},
121+	mach_o_be_vec={'mach-o.c', 'dwarf2.c'},
122+	mach_o_le_vec={'mach-o.c', 'dwarf2.c'},
123+	mach_o_fat_vec={'mach-o.c', 'dwarf2.c'},
124+	mcore_elf32_be_vec={'elf32-mcore.c', 'elf32.c', elf},
125+	mcore_elf32_le_vec={'elf32-mcore.c', 'elf32.c', elf},
126+	mcore_pe_be_vec={'pe-mcore.c', 'peigen.c', coff},
127+	mcore_pe_le_vec={'pe-mcore.c', 'peigen.c', coff},
128+	mcore_pei_be_vec={'pei-mcore.c', 'peigen.c', coff},
129+	mcore_pei_le_vec={'pei-mcore.c', 'peigen.c', coff},
130+	mep_elf32_vec={'elf32-mep.c', 'elf32.c', elf},
131+	mep_elf32_le_vec={'elf32-mep.c', 'elf32.c', elf},
132+	metag_elf32_vec={'elf32-metag.c', 'elf32.c', elf},
133+	microblaze_elf32_vec={'elf32-microblaze.c', 'elf32.c', elf},
134+	microblaze_elf32_le_vec={'elf32-microblaze.c', 'elf32.c', elf},
135+	mips_ecoff_be_vec={'coff-mips.c', 'ecoff.c', ecoff},
136+	mips_ecoff_le_vec={'coff-mips.c', 'ecoff.c', ecoff},
137+	mips_ecoff_bele_vec={'coff-mips.c', 'ecoff.c', ecoff},
138+	mips_elf32_be_vec={'elf32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
139+	mips_elf32_le_vec={'elf32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
140+	mips_elf32_n_be_vec={'elfn32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
141+	mips_elf32_n_le_vec={'elfn32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
142+	mips_elf32_ntrad_be_vec={'elfn32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
143+	mips_elf32_ntrad_le_vec={'elfn32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
144+	mips_elf32_ntradfbsd_be_vec={'elfn32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
145+	mips_elf32_ntradfbsd_le_vec={'elfn32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
146+	mips_elf32_trad_be_vec={'elf32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
147+	mips_elf32_trad_le_vec={'elf32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
148+	mips_elf32_tradfbsd_be_vec={'elf32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
149+	mips_elf32_tradfbsd_le_vec={'elf32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
150+	mips_elf32_vxworks_be_vec={'elf32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
151+	mips_elf32_vxworks_le_vec={'elf32-mips.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
152+	mips_elf64_be_vec={'elf64-mips.c', 'elf64.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
153+	mips_elf64_le_vec={'elf64-mips.c', 'elf64.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
154+	mips_elf64_trad_be_vec={'elf64-mips.c', 'elf64.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
155+	mips_elf64_trad_le_vec={'elf64-mips.c', 'elf64.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
156+	mips_elf64_tradfbsd_be_vec={'elf64-mips.c', 'elf64.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
157+	mips_elf64_tradfbsd_le_vec={'elf64-mips.c', 'elf64.c', 'elfxx-mips.c', 'elf-vxworks.c', 'elf32.c', elf, ecoff},
158+	mmix_elf64_vec={'elf64-mmix.c', 'elf64.c', elf},
159+	mmix_mmo_vec={'mmo.c'},
160+	mn10200_elf32_vec={'elf-m10200.c', 'elf32.c', elf},
161+	mn10300_elf32_vec={'elf-m10300.c', 'elf32.c', elf},
162+	moxie_elf32_be_vec={'elf32-moxie.c', 'elf32.c', elf},
163+	moxie_elf32_le_vec={'elf32-moxie.c', 'elf32.c', elf},
164+	msp430_elf32_vec={'elf32-msp430.c', 'elf32.c', elf},
165+	msp430_elf32_ti_vec={'elf32-msp430.c', 'elf32.c', elf},
166+	mt_elf32_vec={'elf32-mt.c', 'elf32.c', elf},
167+	nds32_elf32_be_vec={'elf32-nds32.c', 'elf32.c', elf},
168+	nds32_elf32_le_vec={'elf32-nds32.c', 'elf32.c', elf},
169+	nds32_elf32_linux_be_vec={'elf32-nds32.c', 'elf32.c', elf},
170+	nds32_elf32_linux_le_vec={'elf32-nds32.c', 'elf32.c', elf},
171+	nfp_elf64_vec={'elf64-nfp.c', 'elf64.c', elf},
172+	nios2_elf32_be_vec={'elf32-nios2.c', 'elf32.c', elf},
173+	nios2_elf32_le_vec={'elf32-nios2.c', 'elf32.c', elf},
174+	ns32k_aout_pc532mach_vec={'pc532-mach.c', 'aout-ns32k.c'},
175+	ns32k_aout_pc532nbsd_vec={'ns32knetbsd.c', 'aout-ns32k.c'},
176+	or1k_elf32_vec={'elf32-or1k.c', 'elf32.c', elf},
177+	pdp11_aout_vec={'pdp11.c'},
178+	pef_vec={'pef.c'},
179+	pef_xlib_vec={'pef.c'},
180+	pj_elf32_vec={'elf32-pj.c', 'elf32.c', elf},
181+	pj_elf32_le_vec={'elf32-pj.c', 'elf32.c', elf},
182+	powerpc_boot_vec={'ppcboot.c'},
183+	powerpc_elf32_vec={'elf32-ppc.c', 'elf-vxworks.c', 'elf32.c', elf},
184+	powerpc_elf32_le_vec={'elf32-ppc.c', 'elf-vxworks.c', 'elf32.c', elf},
185+	powerpc_elf32_fbsd_vec={'elf32-ppc.c', 'elf-vxworks.c', 'elf32.c', elf},
186+	powerpc_elf32_vxworks_vec={'elf32-ppc.c', 'elf-vxworks.c', 'elf32.c', elf},
187+	powerpc_elf64_vec={'elf64-ppc.c', 'elf64-gen.c', 'elf64.c', elf},
188+	powerpc_elf64_le_vec={'elf64-ppc.c', 'elf64-gen.c', 'elf64.c', elf},
189+	powerpc_elf64_fbsd_vec={'elf64-ppc.c', 'elf64-gen.c', 'elf64.c', elf},
190+	powerpc_elf64_fbsd_le_vec={'elf64-ppc.c', 'elf64-gen.c', 'elf64.c', elf},
191+	powerpc_xcoff_vec={'coff-rs6000.c', xcoff},
192+	pru_elf32_vec={'elf32-pru.c', 'elf32.c', elf},
193+	riscv_elf32_vec={'elf32-riscv.c', 'elfxx-riscv.c', 'elf-ifunc.c', 'elf32.c', elf},
194+	riscv_elf64_vec={'elf64-riscv.c', 'elf64.c', 'elfxx-riscv.c', 'elf-ifunc.c', 'elf32.c', elf},
195+	riscv_elf32_be_vec={'elf32-riscv.c', 'elfxx-riscv.c', 'elf-ifunc.c', 'elf32.c', elf},
196+	riscv_elf64_be_vec={'elf64-riscv.c', 'elf64.c', 'elfxx-riscv.c', 'elf-ifunc.c', 'elf32.c', elf},
197+	rl78_elf32_vec={'elf32-rl78.c', 'elf32.c', elf},
198+	rs6000_xcoff64_vec={'coff64-rs6000.c', 'aix5ppc-core.c', xcoff},
199+	rs6000_xcoff64_aix_vec={'coff64-rs6000.c', 'aix5ppc-core.c', xcoff},
200+	rs6000_xcoff_vec={'coff-rs6000.c', xcoff},
201+	rx_elf32_be_vec={'elf32-rx.c', 'elf32.c', elf},
202+	rx_elf32_be_ns_vec={'elf32-rx.c', 'elf32.c', elf},
203+	rx_elf32_le_vec={'elf32-rx.c', 'elf32.c', elf},
204+	rx_elf32_linux_le_vec={'elf32-rx.c', 'elf32.c', elf},
205+	s390_elf32_vec={'elf32-s390.c', 'elf32.c', elf},
206+	s390_elf64_vec={'elf64-s390.c', 'elf64.c', elf},
207+	score_elf32_be_vec={'elf32-score.c', 'elf32-score7.c', 'elf32.c', 'elf64.c', elf},
208+	score_elf32_le_vec={'elf32-score.c', 'elf32-score7.c', 'elf32.c', 'elf64.c', elf},
209+	sh_coff_vec={'coff-sh.c', coff},
210+	sh_coff_le_vec={'coff-sh.c', coff},
211+	sh_coff_small_vec={'coff-sh.c', coff},
212+	sh_coff_small_le_vec={'coff-sh.c', coff},
213+	sh_elf32_vec={'elf32-sh.c', 'elf-vxworks.c', 'elf32.c', elf, 'coff-sh.c', coff},
214+	sh_elf32_le_vec={'elf32-sh.c', 'elf-vxworks.c', 'elf32.c', elf, 'coff-sh.c', coff},
215+	sh_elf32_fdpic_be_vec={'elf32-sh.c', 'elf-vxworks.c', 'elf32.c', elf, 'coff-sh.c', coff},
216+	sh_elf32_fdpic_le_vec={'elf32-sh.c', 'elf-vxworks.c', 'elf32.c', elf, 'coff-sh.c', coff},
217+	sh_elf32_linux_vec={'elf32-sh.c', 'elf-vxworks.c', 'elf32.c', elf, 'coff-sh.c', coff},
218+	sh_elf32_linux_be_vec={'elf32-sh.c', 'elf-vxworks.c', 'elf32.c', elf, 'coff-sh.c', coff},
219+	sh_elf32_nbsd_vec={'elf32-sh.c', 'elf-vxworks.c', 'elf32.c', elf, 'coff-sh.c', coff},
220+	sh_elf32_nbsd_le_vec={'elf32-sh.c', 'elf-vxworks.c', 'elf32.c', elf, 'coff-sh.c', coff},
221+	sh_elf32_vxworks_vec={'elf32-sh.c', 'elf-vxworks.c', 'elf32.c', elf, 'coff-sh.c', coff},
222+	sh_elf32_vxworks_le_vec={'elf32-sh.c', 'elf-vxworks.c', 'elf32.c', elf, 'coff-sh.c', coff},
223+	sh_pe_le_vec={'pe-sh.c', 'coff-sh.c', 'peigen.c', coff},
224+	sh_pei_le_vec={'pei-sh.c', 'coff-sh.c', 'peigen.c', coff},
225+	sparc_elf32_vec={'elf32-sparc.c', 'elfxx-sparc.c', 'elf-vxworks.c', 'elf32.c', elf},
226+	sparc_elf32_sol2_vec={'elf32-sparc.c', 'elfxx-sparc.c', 'elf-vxworks.c', 'elf32.c', elf},
227+	sparc_elf32_vxworks_vec={'elf32-sparc.c', 'elfxx-sparc.c', 'elf-vxworks.c', 'elf32.c', elf},
228+	sparc_elf64_vec={'elf64-sparc.c', 'elfxx-sparc.c', 'elf-vxworks.c', 'elf64.c', elf},
229+	sparc_elf64_fbsd_vec={'elf64-sparc.c', 'elfxx-sparc.c', 'elf-vxworks.c', 'elf64.c', elf},
230+	sparc_elf64_sol2_vec={'elf64-sparc.c', 'elfxx-sparc.c', 'elf-vxworks.c', 'elf64.c', elf},
231+	spu_elf32_vec={'elf32-spu.c', 'elf32.c', elf},
232+	sym_vec={'xsym.c'},
233+	tic30_coff_vec={'coff-tic30.c', coffgen},
234+	tic4x_coff0_vec={'coff-tic4x.c', coffgen},
235+	tic4x_coff0_beh_vec={'coff-tic4x.c', coffgen},
236+	tic4x_coff1_vec={'coff-tic4x.c', coffgen},
237+	tic4x_coff1_beh_vec={'coff-tic4x.c', coffgen},
238+	tic4x_coff2_vec={'coff-tic4x.c', coffgen},
239+	tic4x_coff2_beh_vec={'coff-tic4x.c', coffgen},
240+	tic54x_coff0_vec={'coff-tic54x.c', coffgen},
241+	tic54x_coff0_beh_vec={'coff-tic54x.c', coffgen},
242+	tic54x_coff1_vec={'coff-tic54x.c', coffgen},
243+	tic54x_coff1_beh_vec={'coff-tic54x.c', coffgen},
244+	tic54x_coff2_vec={'coff-tic54x.c', coffgen},
245+	tic54x_coff2_beh_vec={'coff-tic54x.c', coffgen},
246+	tic6x_elf32_be_vec={'elf32-tic6x.c', 'elf32.c', elf},
247+	tic6x_elf32_le_vec={'elf32-tic6x.c', 'elf32.c', elf},
248+	tic6x_elf32_c6000_be_vec={'elf32-tic6x.c', 'elf32.c', elf},
249+	tic6x_elf32_c6000_le_vec={'elf32-tic6x.c', 'elf32.c', elf},
250+	tic6x_elf32_linux_be_vec={'elf32-tic6x.c', 'elf32.c', elf},
251+	tic6x_elf32_linux_le_vec={'elf32-tic6x.c', 'elf32.c', elf},
252+	tilegx_elf32_be_vec={'elf32-tilegx.c', 'elfxx-tilegx.c', 'elf32.c', elf},
253+	tilegx_elf32_le_vec={'elf32-tilegx.c', 'elfxx-tilegx.c', 'elf32.c', elf},
254+	tilegx_elf64_be_vec={'elf64-tilegx.c', 'elfxx-tilegx.c', 'elf64.c', elf},
255+	tilegx_elf64_le_vec={'elf64-tilegx.c', 'elfxx-tilegx.c', 'elf64.c', elf},
256+	tilepro_elf32_vec={'elf32-tilepro.c', 'elf32.c', elf},
257+	v800_elf32_vec={'elf32-v850.c', 'elf32.c', elf},
258+	v850_elf32_vec={'elf32-v850.c', 'elf32.c', elf},
259+	vax_aout_1knbsd_vec={'vax1knetbsd.c', 'aout32.c'},
260+	vax_aout_nbsd_vec={'vaxnetbsd.c', 'aout32.c'},
261+	vax_elf32_vec={'elf32-vax.c', 'elf32.c', elf},
262+	ft32_elf32_vec={'elf32-ft32.c', 'elf32.c', elf},
263+	visium_elf32_vec={'elf32-visium.c', 'elf32.c', elf},
264+	wasm_vec={'wasm-module.c'},
265+	wasm32_elf32_vec={'elf32-wasm32.c', 'elf32.c', elf},
266+	x86_64_coff_vec={'coff-x86_64.c', coff},
267+	x86_64_elf32_vec={'elf64-x86-64.c', elfxx_x86, 'elf64.c', 'elf32.c', elf},
268+	x86_64_elf64_vec={'elf64-x86-64.c', elfxx_x86, 'elf64.c', elf},
269+	x86_64_elf64_cloudabi_vec={'elf64-x86-64.c', elfxx_x86, 'elf64.c', elf},
270+	x86_64_elf64_fbsd_vec={'elf64-x86-64.c', elfxx_x86, 'elf64.c', elf},
271+	x86_64_elf64_sol2_vec={'elf64-x86-64.c', elfxx_x86, 'elf64.c', elf},
272+	x86_64_mach_o_vec={'mach-o-x86-64.c'},
273+	x86_64_pe_vec={'pe-x86_64.c', 'pex64igen.c', coff},
274+	x86_64_pe_big_vec={'pe-x86_64.c', 'pex64igen.c', coff},
275+	x86_64_pei_vec={'pei-x86_64.c', 'pex64igen.c', coff},
276+	xgate_elf32_vec={'elf32-xgate.c', 'elf32.c', elf},
277+	xstormy16_elf32_vec={'elf32-xstormy16.c', 'elf32.c', elf},
278+	xtensa_elf32_be_vec={'xtensa-isa.c', 'xtensa-modules.c', 'elf32-xtensa.c', 'elf32.c', elf},
279+	xtensa_elf32_le_vec={'xtensa-isa.c', 'xtensa-modules.c', 'elf32-xtensa.c', 'elf32.c', elf},
280+	z80_coff_vec={'coff-z80.c', 'reloc16.c', coffgen},
281+	z80_elf32_vec={'elf32-z80.c', 'elf32.c', elf},
282+	z8k_coff_vec={'coff-z8k.c', 'reloc16.c', coff},
283+
284+	srec_vec={'srec.c'},
285+	symbolsrec_vec={'srec.c'},
286+	tekhex_vec={'tekhex.c'},
287+	core_cisco_be_vec={'cisco-core.c'},
288+	core_cisco_le_vec={'cisco-core.c'},
289+}
+1, -0
1@@ -0,0 +1 @@
2+2.39 r0
+2, -0
1@@ -0,0 +1,2 @@
2+/byacc-20220128.tgz
3+/src
+37, -0
 1@@ -0,0 +1,37 @@
 2+#define GCC_NORETURN __attribute__((noreturn))
 3+#define GCC_PRINTF 1
 4+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
 5+#define GCC_SCANF 1
 6+#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
 7+#define GCC_UNUSED __attribute__((unused))
 8+#define HAVE_FCNTL_H 1
 9+#define HAVE_GETOPT 1
10+#define HAVE_GETOPT_H 1
11+#define HAVE_GETOPT_HEADER 1
12+#define HAVE_INTTYPES_H 1
13+/* #undef HAVE_LIBDBMALLOC */
14+/* #undef HAVE_LIBDMALLOC */
15+#define HAVE_MEMORY_H 1
16+#define HAVE_MKSTEMP 1
17+#define HAVE_STDINT_H 1
18+#define HAVE_STDLIB_H 1
19+#define HAVE_STDNORETURN_H 1
20+#define HAVE_STRINGS_H 1
21+#define HAVE_STRING_H 1
22+#define HAVE_SYS_STAT_H 1
23+#define HAVE_SYS_TYPES_H 1
24+#define HAVE_UNISTD_H 1
25+#define HAVE_VSNPRINTF 1
26+/* #undef MAXTABLE */
27+#define MIXEDCASE_FILENAMES 1
28+/* #undef NEED_GETOPT_H */
29+/* #undef NO_LEAKS */
30+#define STDC_HEADERS 1
31+#define STDC_NORETURN _Noreturn
32+#define SYSTEM_NAME "linux-musl"
33+/* #undef USE_DBMALLOC */
34+/* #undef USE_DMALLOC */
35+/* #undef USE_VALGRIND */
36+/* #undef YYBTYACC */
37+/* #undef YY_NO_LEAKS */
38+/* #undef mode_t */
+27, -0
 1@@ -0,0 +1,27 @@
 2+cflags{
 3+	'-Wall', '-Wpedantic',
 4+	'-D HAVE_CONFIG_H',
 5+	'-D YYPATCH=20220128',
 6+	'-I $dir',
 7+}
 8+
 9+exe('yacc', {
10+	'closure.c',
11+	'error.c',
12+	'graph.c',
13+	'lalr.c',
14+	'lr0.c',
15+	'main.c',
16+	'mkpar.c',
17+	'mstring.c',
18+	'output.c',
19+	'reader.c',
20+	'yaccpar.c',
21+	'symtab.c',
22+	'verbose.c',
23+	'warshall.c',
24+})
25+file('bin/yacc', '755', '$outdir/yacc')
26+man{'yacc.1'}
27+
28+fetch 'curl'
+1, -0
1@@ -0,0 +1 @@
2+42c1805cc529314e6a76326fe1b33e80c70862a44b01474da362e2f7db2d749c  byacc-20220128.tgz
+1, -0
1@@ -0,0 +1 @@
2+url = "https://invisible-mirror.net/archives/byacc/byacc-20220128.tgz"
+1, -0
1@@ -0,0 +1 @@
2+20220128 r0
+20, -0
 1@@ -0,0 +1,20 @@
 2+cflags{'-Wall'}
 3+
 4+pkg.hdrs = copy('$outdir/include', '$srcdir', {'bzlib.h'})
 5+
 6+lib('libbz2.a', {
 7+	'blocksort.c',
 8+	'huffman.c',
 9+	'crctable.c',
10+	'randtable.c',
11+	'compress.c',
12+	'decompress.c',
13+	'bzlib.c'
14+})
15+exe('bzip2', {'bzip2.c', 'libbz2.a'})
16+
17+file('bin/bzip2', '755', '$outdir/bzip2')
18+man{'bzip2.1'}
19+sym('bin/bzcat', 'bzip2')
20+
21+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 6a8690fc8d26c815e798c588f796eabe9d684cf0
+1, -0
1@@ -0,0 +1 @@
2+1.0.8 r0
+1, -0
1@@ -0,0 +1 @@
2+/cacert.pem
+4, -0
1@@ -0,0 +1,4 @@
2+phony('cacert.pem', '$dir/fetch')
3+file('share/cacert/cert.pem', '644', '$dir/cacert.pem')
4+
5+fetch 'curl'
+1, -0
1@@ -0,0 +1 @@
2+6ed95025fba2aef0ce7b647607225745624497f876d74ef6ec22b26e73e9de77  cacert.pem
+2, -0
1@@ -0,0 +1,2 @@
2+url = "https://curl.haxx.se/ca/cacert-2022-07-19.pem"
3+output = "cacert.pem"
+1, -0
1@@ -0,0 +1 @@
2+2022-07-19 r0
+36, -0
 1@@ -0,0 +1,36 @@
 2+cflags{
 3+	'-std=c11', '-Wall', '-Wextra', '-Wpedantic',
 4+	'-Wno-maybe-uninitialized',
 5+	'-D _GNU_SOURCE',
 6+	'-isystem $builddir/pkg/libtls-bearssl/include',
 7+	'-isystem $builddir/pkg/netbsd-curses/include',
 8+}
 9+
10+pkg.deps = {
11+	'pkg/libtls-bearssl/headers',
12+	'pkg/netbsd-curses/headers',
13+}
14+
15+exe('catgirl', [[
16+	buffer.c
17+	chat.c
18+	command.c
19+	complete.c
20+	config.c
21+	edit.c
22+	filter.c
23+	handle.c
24+	input.c
25+	irc.c
26+	log.c
27+	ui.c
28+	url.c
29+	window.c
30+	xdg.c
31+	$builddir/pkg/libtls-bearssl/libtls.a.d
32+	$builddir/pkg/netbsd-curses/libcurses.a.d
33+]])
34+file('bin/catgirl', '755', '$outdir/catgirl')
35+man{'catgirl.1'}
36+
37+fetch 'git'
+390, -0
  1@@ -0,0 +1,390 @@
  2+From beac90889183cb71ca3dfc8c9ada9175879b9c34 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Thu, 7 May 2020 00:36:14 -0700
  5+Subject: [PATCH] Revert "Use gnu-case-range and
  6+ gnu-conditional-omitted-operand extensions"
  7+
  8+This reverts commit 75a6aa9258270169f43f56e063f1bfb57eebe56b.
  9+---
 10+ Makefile   |  2 --
 11+ command.c  | 33 +++++++++++++++++++--------------
 12+ complete.c |  4 ++--
 13+ edit.c     |  2 +-
 14+ handle.c   | 45 +++++++++++++++++++++++++++------------------
 15+ input.c    |  7 ++++++-
 16+ url.c      |  2 +-
 17+ window.c   |  2 +-
 18+ 8 files changed, 57 insertions(+), 40 deletions(-)
 19+
 20+diff --git a/Makefile b/Makefile
 21+index 3abba03..9518cda 100644
 22+--- a/Makefile
 23++++ b/Makefile
 24+@@ -2,9 +2,7 @@ PREFIX ?= /usr/local
 25+ BINDIR ?= ${PREFIX}/bin
 26+ MANDIR ?= ${PREFIX}/man
 27+ 
 28+-CEXTS = gnu-case-range gnu-conditional-omitted-operand
 29+ CFLAGS += -std=c11 -Wall -Wextra -Wpedantic -Wmissing-prototypes
 30+-CFLAGS += ${CEXTS:%=-Wno-%}
 31+ LDADD.libtls = -ltls
 32+ LDADD.ncursesw = -lncursesw
 33+ 
 34+diff --git a/command.c b/command.c
 35+index a127af3..f5be51b 100644
 36+--- a/command.c
 37++++ b/command.c
 38+@@ -68,8 +68,8 @@ static int splitChunk(const char *cmd, uint id) {
 39+ 	int overhead = snprintf(
 40+ 		NULL, 0, ":%s!%*s@%*s %s %s :\r\n",
 41+ 		self.nick,
 42+-		(self.user ? 0 : network.userLen), (self.user ?: "*"),
 43+-		(self.host ? 0 : network.hostLen), (self.host ?: "*"),
 44++		(self.user ? 0 : network.userLen), (self.user ? self.user : "*"),
 45++		(self.host ? 0 : network.hostLen), (self.host ? self.host : "*"),
 46+ 		cmd, idNames[id]
 47+ 	);
 48+ 	assert(overhead > 0 && overhead < 512);
 49+@@ -171,7 +171,7 @@ static void commandPart(uint id, char *params) {
 50+ 
 51+ static void commandQuit(uint id, char *params) {
 52+ 	(void)id;
 53+-	set(&self.quit, (params ?: "nyaa~"));
 54++	set(&self.quit, (params ? params : "nyaa~"));
 55+ }
 56+ 
 57+ static void commandNick(uint id, char *params) {
 58+@@ -275,7 +275,7 @@ static void commandOp(uint id, char *params) {
 59+ }
 60+ 
 61+ static void commandDeop(uint id, char *params) {
 62+-	channelListMode(id, '-', 'o', (params ?: self.nick));
 63++	channelListMode(id, '-', 'o', (params ? params : self.nick));
 64+ }
 65+ 
 66+ static void commandVoice(uint id, char *params) {
 67+@@ -287,7 +287,7 @@ static void commandVoice(uint id, char *params) {
 68+ }
 69+ 
 70+ static void commandDevoice(uint id, char *params) {
 71+-	channelListMode(id, '-', 'v', (params ?: self.nick));
 72++	channelListMode(id, '-', 'v', (params ? params : self.nick));
 73+ }
 74+ 
 75+ static void commandBan(uint id, char *params) {
 76+@@ -362,12 +362,12 @@ static void commandWhowas(uint id, char *params) {
 77+ 
 78+ static void commandNS(uint id, char *params) {
 79+ 	(void)id;
 80+-	ircFormat("NS %s\r\n", (params ?: "HELP"));
 81++	ircFormat("NS %s\r\n", (params ? params : "HELP"));
 82+ }
 83+ 
 84+ static void commandCS(uint id, char *params) {
 85+ 	(void)id;
 86+-	ircFormat("CS %s\r\n", (params ?: "HELP"));
 87++	ircFormat("CS %s\r\n", (params ? params : "HELP"));
 88+ }
 89+ 
 90+ static void commandQuery(uint id, char *params) {
 91+@@ -442,7 +442,8 @@ static void commandFilter(enum Heat heat, uint id, char *params) {
 92+ 		uiFormat(
 93+ 			id, Cold, NULL, "%sing \3%02d%s %s %s %s",
 94+ 			(heat == Hot ? "Highlight" : "Ignor"), Brown, filter.mask,
 95+-			(filter.cmd ?: ""), (filter.chan ?: ""), (filter.mesg ?: "")
 96++			(filter.cmd ? filter.cmd : ""), (filter.chan ? filter.chan : ""),
 97++			(filter.mesg ? filter.mesg : "")
 98+ 		);
 99+ 	} else {
100+ 		for (size_t i = 0; i < FilterCap && filters[i].mask; ++i) {
101+@@ -450,8 +451,9 @@ static void commandFilter(enum Heat heat, uint id, char *params) {
102+ 			uiFormat(
103+ 				Network, Warm, NULL, "%sing \3%02d%s %s %s %s",
104+ 				(heat == Hot ? "Highlight" : "Ignor"), Brown, filters[i].mask,
105+-				(filters[i].cmd ?: ""), (filters[i].chan ?: ""),
106+-				(filters[i].mesg ?: "")
107++				(filters[i].cmd ? filters[i].cmd : ""),
108++				(filters[i].chan ? filters[i].chan : ""),
109++				(filters[i].mesg ? filters[i].mesg : "")
110+ 			);
111+ 		}
112+ 	}
113+@@ -464,8 +466,8 @@ static void commandUnfilter(enum Heat heat, uint id, char *params) {
114+ 	uiFormat(
115+ 		id, Cold, NULL, "%s %sing \3%02d%s %s %s %s",
116+ 		(found ? "No longer" : "Not"), (heat == Hot ? "highlight" : "ignor"),
117+-		Brown, filter.mask, (filter.cmd ?: ""), (filter.chan ?: ""),
118+-		(filter.mesg ?: "")
119++		Brown, filter.mask, (filter.cmd ? filter.cmd : ""),
120++		(filter.chan ? filter.chan : ""), (filter.mesg ? filter.mesg : "")
121+ 	);
122+ }
123+ 
124+@@ -494,7 +496,9 @@ static void commandExec(uint id, char *params) {
125+ 	dup2(execPipe[1], STDOUT_FILENO);
126+ 	dup2(utilPipe[1], STDERR_FILENO);
127+ 
128+-	const char *shell = getenv("SHELL") ?: "/bin/sh";
129++	const char *shell = getenv("SHELL");
130++	if (!shell)
131++		shell = "/bin/sh";
132+ 	execl(shell, shell, "-c", params, NULL);
133+ 	warn("%s", shell);
134+ 	_exit(EX_UNAVAILABLE);
135+@@ -519,7 +523,8 @@ static void commandHelp(uint id, char *params) {
136+ 	if (pid) return;
137+ 
138+ 	char buf[256];
139+-	snprintf(buf, sizeof(buf), "%sp^COMMANDS$", (getenv("LESS") ?: ""));
140++	const char *less = getenv("LESS");
141++	snprintf(buf, sizeof(buf), "%sp^COMMANDS$", (less ? less : ""));
142+ 	setenv("LESS", buf, 1);
143+ 	execlp("man", "man", "1", "catgirl", NULL);
144+ 	dup2(utilPipe[1], STDERR_FILENO);
145+diff --git a/complete.c b/complete.c
146+index 9e59db5..9ea1192 100644
147+--- a/complete.c
148++++ b/complete.c
149+@@ -71,7 +71,7 @@ static struct Node *prepend(struct Node *node) {
150+ 	node->next = head;
151+ 	if (head) head->prev = node;
152+ 	head = node;
153+-	tail = (tail ?: node);
154++	if (!tail) tail = node;
155+ 	return node;
156+ }
157+ 
158+@@ -80,7 +80,7 @@ static struct Node *append(struct Node *node) {
159+ 	node->prev = tail;
160+ 	if (tail) tail->next = node;
161+ 	tail = node;
162+-	head = (head ?: node);
163++	if (!head) head = node;
164+ 	return node;
165+ }
166+ 
167+diff --git a/edit.c b/edit.c
168+index bb92edf..07705dd 100644
169+--- a/edit.c
170++++ b/edit.c
171+@@ -69,7 +69,7 @@ int editReserve(struct Edit *e, size_t index, size_t count) {
172+ 		return -1;
173+ 	}
174+ 	if (e->len + count > e->cap) {
175+-		size_t cap = (e->cap ?: 256);
176++		size_t cap = (e->cap ? e->cap : 256);
177+ 		while (cap < e->len + count) cap *= 2;
178+ 		wchar_t *buf = realloc(e->buf, sizeof(*buf) * cap);
179+ 		if (!buf) return -1;
180+diff --git a/handle.c b/handle.c
181+index 9f051c7..a4f1015 100644
182+--- a/handle.c
183++++ b/handle.c
184+@@ -301,9 +301,9 @@ static void handleReplyISupport(struct Message *msg) {
185+ 			set(&network.setParamModes, setParam);
186+ 			set(&network.channelModes, channel);
187+ 		} else if (!strcmp(key, "EXCEPTS")) {
188+-			network.excepts = (msg->params[i] ?: "e")[0];
189++			network.excepts = (msg->params[i] ? msg->params[i][0] : 'e');
190+ 		} else if (!strcmp(key, "INVEX")) {
191+-			network.invex = (msg->params[i] ?: "I")[0];
192++			network.invex = (msg->params[i] ? msg->params[i][0] : 'I');
193+ 		}
194+ 	}
195+ }
196+@@ -356,7 +356,7 @@ static void handleJoin(struct Message *msg) {
197+ 		"\3%02d%s\3\t%s%s%sarrives in \3%02d%s\3",
198+ 		hash(msg->user), msg->nick,
199+ 		(msg->params[2] ? "(" : ""),
200+-		(msg->params[2] ?: ""),
201++		(msg->params[2] ? msg->params[2] : ""),
202+ 		(msg->params[2] ? "\17) " : ""),
203+ 		hash(msg->params[0]), msg->params[0]
204+ 	);
205+@@ -388,12 +388,14 @@ static void handlePart(struct Message *msg) {
206+ 		id, heat, tagTime(msg),
207+ 		"\3%02d%s\3\tleaves \3%02d%s\3%s%s",
208+ 		hash(msg->user), msg->nick, hash(msg->params[0]), msg->params[0],
209+-		(msg->params[1] ? ": " : ""), (msg->params[1] ?: "")
210++		(msg->params[1] ? ": " : ""),
211++		(msg->params[1] ? msg->params[1] : "")
212+ 	);
213+ 	logFormat(
214+ 		id, tagTime(msg), "%s leaves %s%s%s",
215+ 		msg->nick, msg->params[0],
216+-		(msg->params[1] ? ": " : ""), (msg->params[1] ?: "")
217++		(msg->params[1] ? ": " : ""),
218++		(msg->params[1] ? msg->params[1] : "")
219+ 	);
220+ }
221+ 
222+@@ -410,12 +412,14 @@ static void handleKick(struct Message *msg) {
223+ 		hash(msg->user), msg->nick,
224+ 		completeColor(id, msg->params[1]), msg->params[1],
225+ 		hash(msg->params[0]), msg->params[0],
226+-		(msg->params[2] ? ": " : ""), (msg->params[2] ?: "")
227++		(msg->params[2] ? ": " : ""),
228++		(msg->params[2] ? msg->params[2] : "")
229+ 	);
230+ 	logFormat(
231+ 		id, tagTime(msg), "%s kicks %s out of %s%s%s",
232+ 		msg->nick, msg->params[1], msg->params[0],
233+-		(msg->params[2] ? ": " : ""), (msg->params[2] ?: "")
234++		(msg->params[2] ? ": " : ""),
235++		(msg->params[2] ? msg->params[2] : "")
236+ 	);
237+ 	completeRemove(id, msg->params[1]);
238+ 	if (kicked) completeClear(id);
239+@@ -466,13 +470,15 @@ static void handleQuit(struct Message *msg) {
240+ 			id, heat, tagTime(msg),
241+ 			"\3%02d%s\3\tleaves%s%s",
242+ 			hash(msg->user), msg->nick,
243+-			(msg->params[0] ? ": " : ""), (msg->params[0] ?: "")
244++			(msg->params[0] ? ": " : ""),
245++			(msg->params[0] ? msg->params[0] : "")
246+ 		);
247+ 		if (id == Network) continue;
248+ 		logFormat(
249+ 			id, tagTime(msg), "%s leaves%s%s",
250+ 			msg->nick,
251+-			(msg->params[0] ? ": " : ""), (msg->params[0] ?: "")
252++			(msg->params[0] ? ": " : ""),
253++			(msg->params[0] ? msg->params[0] : "")
254+ 		);
255+ 	}
256+ 	completeRemove(None, msg->nick);
257+@@ -734,7 +740,7 @@ static void handleReplyUserModeIs(struct Message *msg) {
258+ 		if (*ch == '+') continue;
259+ 		const char *name = UserModes[(byte)*ch];
260+ 		ptr = seprintf(
261+-			ptr, end, ", +%c%s%s", *ch, (name ? " " : ""), (name ?: "")
262++			ptr, end, ", +%c%s%s", *ch, (name ? " " : ""), (name ? name : "")
263+ 		);
264+ 	}
265+ 	uiFormat(
266+@@ -774,13 +780,13 @@ static void handleReplyChannelModeIs(struct Message *msg) {
267+ 			assert(param < ParamCap);
268+ 			ptr = seprintf(
269+ 				ptr, end, ", +%c%s%s %s",
270+-				*ch, (name ? " " : ""), (name ?: ""),
271++				*ch, (name ? " " : ""), (name ? name : ""),
272+ 				msg->params[param++]
273+ 			);
274+ 		} else {
275+ 			ptr = seprintf(
276+ 				ptr, end, ", +%c%s%s",
277+-				*ch, (name ? " " : ""), (name ?: "")
278++				*ch, (name ? " " : ""), (name ? name : "")
279+ 			);
280+ 		}
281+ 	}
282+@@ -807,7 +813,7 @@ static void handleMode(struct Message *msg) {
283+ 				hash(msg->user), msg->nick,
284+ 				(set ? "" : "un"),
285+ 				self.color, msg->params[0],
286+-				set["-+"], *ch, (name ? " " : ""), (name ?: "")
287++				set["-+"], *ch, (name ? " " : ""), (name ? name : "")
288+ 			);
289+ 		}
290+ 		return;
291+@@ -964,7 +970,7 @@ static void handleErrorBanListFull(struct Message *msg) {
292+ 	require(msg, false, 4);
293+ 	uiFormat(
294+ 		idFor(msg->params[1]), Warm, tagTime(msg),
295+-		"%s", (msg->params[4] ?: msg->params[3])
296++		"%s", (msg->params[4] ? msg->params[4] : msg->params[3])
297+ 	);
298+ }
299+ 
300+@@ -1069,14 +1075,15 @@ static void handleReplyWhoisIdle(struct Message *msg) {
301+ 		}
302+ 	}
303+ 	char signon[sizeof("0000-00-00 00:00:00")];
304+-	time_t time = strtol((msg->params[3] ?: ""), NULL, 10);
305++	time_t time = (msg->params[3] ? strtol(msg->params[3], NULL, 10) : 0);
306+ 	strftime(signon, sizeof(signon), "%F %T", localtime(&time));
307+ 	uiFormat(
308+ 		Network, Warm, tagTime(msg),
309+ 		"\3%02d%s\3\tis idle for %lu %s%s%s%s",
310+ 		completeColor(Network, msg->params[1]), msg->params[1],
311+ 		idle, unit, (idle != 1 ? "s" : ""),
312+-		(msg->params[3] ? ", signed on " : ""), (msg->params[3] ? signon : "")
313++		(msg->params[3] ? ", signed on " : ""),
314++		(msg->params[3] ? signon : "")
315+ 	);
316+ }
317+ 
318+@@ -1111,7 +1118,9 @@ static void handleReplyWhoisGeneric(struct Message *msg) {
319+ 		Network, Warm, tagTime(msg),
320+ 		"\3%02d%s\3\t%s%s%s",
321+ 		completeColor(Network, msg->params[1]), msg->params[1],
322+-		msg->params[2], (msg->params[3] ? " " : ""), (msg->params[3] ?: "")
323++		msg->params[2],
324++		(msg->params[3] ? " " : ""),
325++		(msg->params[3] ? msg->params[3] : "")
326+ 	);
327+ }
328+ 
329+@@ -1186,7 +1195,7 @@ static bool isMention(const struct Message *msg) {
330+ 	const char *match = msg->params[1];
331+ 	while (NULL != (match = strstr(match, self.nick))) {
332+ 		char a = (match > msg->params[1] ? match[-1] : ' ');
333+-		char b = (match[len] ?: ' ');
334++		char b = (match[len] ? match[len] : ' ');
335+ 		if ((isspace(a) || ispunct(a)) && (isspace(b) || ispunct(b))) {
336+ 			return true;
337+ 		}
338+diff --git a/input.c b/input.c
339+index f3813c4..820bf3c 100644
340+--- a/input.c
341++++ b/input.c
342+@@ -417,7 +417,6 @@ static void keyCode(int code) {
343+ 		break; case KeyMetaGt: windowScroll(ScrollAll, -1);
344+ 		break; case KeyMetaLt: windowScroll(ScrollAll, +1);
345+ 
346+-		break; case KeyMeta0 ... KeyMeta9: windowShow(code - KeyMeta0);
347+ 		break; case KeyMetaA: windowAuto();
348+ 		break; case KeyMetaB: error = editFn(edit, EditPrevWord);
349+ 		break; case KeyMetaD: error = editFn(edit, EditDeleteNextWord);
350+@@ -448,6 +447,12 @@ static void keyCode(int code) {
351+ 		break; case KEY_SEND: windowScroll(ScrollAll, -1);
352+ 		break; case KEY_SHOME: windowScroll(ScrollAll, +1);
353+ 		break; case KEY_UP: windowScroll(ScrollOne, +1);
354++
355++		break; default: {
356++			if (code >= KeyMeta0 && code <= KeyMeta9) {
357++				windowShow(code - KeyMeta0);
358++			}
359++		}
360+ 	}
361+ 	if (error) err(EX_OSERR, "editFn");
362+ }
363+diff --git a/url.c b/url.c
364+index 219a83c..9c721e0 100644
365+--- a/url.c
366++++ b/url.c
367+@@ -249,7 +249,7 @@ int urlSave(FILE *file) {
368+ 		if (!url->url) continue;
369+ 		int error = 0
370+ 			|| writeString(file, idNames[url->id])
371+-			|| writeString(file, (url->nick ?: ""))
372++			|| writeString(file, (url->nick ? url->nick : ""))
373+ 			|| writeString(file, url->url);
374+ 		if (error) return error;
375+ 	}
376+diff --git a/window.c b/window.c
377+index ee0911f..d7bc472 100644
378+--- a/window.c
379++++ b/window.c
380+@@ -220,7 +220,7 @@ static size_t windowTop(const struct Window *window) {
381+ }
382+ 
383+ static size_t windowBottom(const struct Window *window) {
384+-	size_t bottom = BufferCap - (window->scroll ?: 1);
385++	size_t bottom = BufferCap - (window->scroll ? window->scroll : 1);
386+ 	if (window->scroll) bottom -= SplitLines + MarkerLines;
387+ 	return bottom;
388+ }
389+-- 
390+2.34.1
391+
+27, -0
 1@@ -0,0 +1,27 @@
 2+From 535cd53babbd4d827c7330e223c5e17b1f5128c3 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 31 May 2021 16:37:09 -0700
 5+Subject: [PATCH] Break out of input loop when UI is hidden
 6+
 7+Otherwise, wget_wch() is called immediately after hiding the UI
 8+with M-l, which restores curses mode when using NetBSD's libcurses.
 9+---
10+ input.c | 2 +-
11+ 1 file changed, 1 insertion(+), 1 deletion(-)
12+
13+diff --git a/input.c b/input.c
14+index 820bf3c..f396fbd 100644
15+--- a/input.c
16++++ b/input.c
17+@@ -543,7 +543,7 @@ void inputRead(void) {
18+ 
19+ 	wint_t ch;
20+ 	static bool paste, style, literal;
21+-	for (int ret; ERR != (ret = wget_wch(uiInput, &ch));) {
22++	for (int ret; !waiting && ERR != (ret = wget_wch(uiInput, &ch));) {
23+ 		bool tabbing = false;
24+ 		size_t pos = edits[tab.id].pos;
25+ 		bool spr = uiSpoilerReveal;
26+-- 
27+2.34.1
28+
+27, -0
 1@@ -0,0 +1,27 @@
 2+From dd47da4db71e820aed9a0cd29d7855903216de65 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 31 May 2021 16:40:28 -0700
 5+Subject: [PATCH] Resize status window explicitly during resize()
 6+
 7+Although ncurses automatically resizes windows that extend to the
 8+previous screen limits, NetBSD's libcurses does not, so resize the
 9+status window explicitly.
10+---
11+ ui.c | 1 +
12+ 1 file changed, 1 insertion(+)
13+
14+diff --git a/ui.c b/ui.c
15+index 64bd6ce..4d0012c 100644
16+--- a/ui.c
17++++ b/ui.c
18+@@ -274,6 +274,7 @@ void uiFormat(
19+ 
20+ void uiResize(void) {
21+ 	wclear(uiMain);
22++	wresize(uiStatus, 1, COLS);
23+ 	wresize(uiMain, MAIN_LINES, COLS);
24+ 	windowResize();
25+ }
26+-- 
27+2.34.1
28+
+34, -0
 1@@ -0,0 +1,34 @@
 2+From 2c3519fb68301db5a2aef8715b3cd6ea29fa45ae Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 3 Jun 2021 00:54:30 -0700
 5+Subject: [PATCH] [HACK] Disable colorized output in M-l window list
 6+
 7+vid_attr is not supported by NetBSD's libcurses, and this is not
 8+crucial feature.
 9+---
10+ window.c | 2 --
11+ 1 file changed, 2 deletions(-)
12+
13+diff --git a/window.c b/window.c
14+index d7bc472..b322c55 100644
15+--- a/window.c
16++++ b/window.c
17+@@ -294,7 +294,6 @@ void windowBare(void) {
18+ 		char buf[TimeCap];
19+ 		struct Style style = { .fg = Gray, .bg = Default };
20+ 		strftime(buf, sizeof(buf), windowTime.format, localtime(&line->time));
21+-		vid_attr(uiAttr(style), uiPair(style), NULL);
22+ 		printf("%s ", buf);
23+ 
24+ 		bool align = false;
25+@@ -310,7 +309,6 @@ void windowBare(void) {
26+ 			size_t tab = strcspn(str, "\t");
27+ 			if (tab < len) len = tab;
28+ 
29+-			vid_attr(uiAttr(style), uiPair(style), NULL);
30+ 			printf("%.*s", (int)len, str);
31+ 			str += len;
32+ 		}
33+-- 
34+2.34.1
35+
+37, -0
 1@@ -0,0 +1,37 @@
 2+From 28e65915e9bb137266d8af78233f9e04c9c30130 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 13 Mar 2022 15:17:58 -0700
 5+Subject: [PATCH] Don't rely on internal struct tags of curses implementation
 6+
 7+---
 8+ chat.h | 7 ++++---
 9+ 1 file changed, 4 insertions(+), 3 deletions(-)
10+
11+diff --git a/chat.h b/chat.h
12+index 1c46f00..f65f2f0 100644
13+--- a/chat.h
14++++ b/chat.h
15+@@ -27,6 +27,7 @@
16+ 
17+ #include <assert.h>
18+ #include <ctype.h>
19++#include <curses.h>
20+ #include <err.h>
21+ #include <getopt.h>
22+ #include <stdarg.h>
23+@@ -309,9 +310,9 @@ enum {
24+ 	InputCols = 1024,
25+ };
26+ extern char uiTitle[TitleCap];
27+-extern struct _win_st *uiStatus;
28+-extern struct _win_st *uiMain;
29+-extern struct _win_st *uiInput;
30++extern WINDOW *uiStatus;
31++extern WINDOW *uiMain;
32++extern WINDOW *uiInput;
33+ extern bool uiSpoilerReveal;
34+ extern struct Util uiNotifyUtil;
35+ void uiInit(void);
36+-- 
37+2.34.1
38+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit f51e7b4d2cc601bef8f22d5061ff8fafb012d671
+1, -0
1@@ -0,0 +1 @@
2+2.1 r0
+2, -0
1@@ -0,0 +1,2 @@
2+/curl-7.85.0.tar.gz
3+/src
+26, -0
 1@@ -0,0 +1,26 @@
 2+# curl
 3+
 4+## curl_config.h
 5+Generated with
 6+
 7+	./configure \
 8+		--disable-pop3 \
 9+		--disable-smb \
10+		--with-ca-bundle=/etc/ssl/cert.pem \
11+		--with-bearssl \
12+		CPPFLAGS='-I/src/oasis/out/pkg/bearssl/include -I/src/oasis/out/pkg/zlib/include' \
13+		LDFLAGS='-L/src/oasis/out/pkg/bearssl -L/src/oasis/out/pkg/zlib'
14+
15+There are a number of non-standard definitions, but they don't seem to be
16+architecture-specific except for
17+
18+- `SIZEOF_CURL_OFF_T`
19+- `SIZEOF_INT`
20+- `SIZEOF_LONG`
21+- `SIZEOF_LONG_LONG`
22+- `SIZEOF_OFF_T`
23+- `SIZEOF_SHORT`
24+- `SIZEOF_SIZE_T`
25+- `SIZEOF_TIME_T`
26+
27+Perhaps all or most of these can eliminated using standard C99 features.
+342, -0
  1@@ -0,0 +1,342 @@
  2+/* #undef CURLDEBUG */
  3+#define CURL_CA_BUNDLE "/etc/ssl/cert.pem"
  4+/* #undef CURL_CA_FALLBACK */
  5+/* #undef CURL_CA_PATH */
  6+/* #undef CURL_DEFAULT_SSL_BACKEND */
  7+/* #undef CURL_DISABLE_ALTSVC */
  8+/* #undef CURL_DISABLE_COOKIES */
  9+/* #undef CURL_DISABLE_CRYPTO_AUTH */
 10+/* #undef CURL_DISABLE_DICT */
 11+/* #undef CURL_DISABLE_DOH */
 12+/* #undef CURL_DISABLE_FILE */
 13+/* #undef CURL_DISABLE_FTP */
 14+/* #undef CURL_DISABLE_GETOPTIONS */
 15+/* #undef CURL_DISABLE_GOPHER */
 16+/* #undef CURL_DISABLE_HEADERS_API */
 17+/* #undef CURL_DISABLE_HSTS */
 18+/* #undef CURL_DISABLE_HTTP */
 19+/* #undef CURL_DISABLE_HTTP_AUTH */
 20+/* #undef CURL_DISABLE_IMAP */
 21+#define CURL_DISABLE_LDAP 1
 22+#define CURL_DISABLE_LDAPS 1
 23+/* #undef CURL_DISABLE_LIBCURL_OPTION */
 24+/* #undef CURL_DISABLE_MIME */
 25+/* #undef CURL_DISABLE_MQTT */
 26+/* #undef CURL_DISABLE_NETRC */
 27+/* #undef CURL_DISABLE_NTLM */
 28+/* #undef CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG */
 29+/* #undef CURL_DISABLE_PARSEDATE */
 30+#define CURL_DISABLE_POP3 1
 31+/* #undef CURL_DISABLE_PROGRESS_METER */
 32+/* #undef CURL_DISABLE_PROXY */
 33+/* #undef CURL_DISABLE_RTSP */
 34+/* #undef CURL_DISABLE_SHUFFLE_DNS */
 35+#define CURL_DISABLE_SMB 1
 36+/* #undef CURL_DISABLE_SMTP */
 37+/* #undef CURL_DISABLE_SOCKETPAIR */
 38+/* #undef CURL_DISABLE_TELNET */
 39+/* #undef CURL_DISABLE_TFTP */
 40+/* #undef CURL_DISABLE_VERBOSE_STRINGS */
 41+#define CURL_EXTERN_SYMBOL __attribute__ ((__visibility__ ("default")))
 42+#define CURL_SA_FAMILY_T sa_family_t
 43+/* #undef CURL_WITH_MULTI_SSL */
 44+/* #undef DEBUGBUILD */
 45+/* #undef EGD_SOCKET */
 46+#define ENABLE_IPV6 1
 47+#define GETHOSTNAME_TYPE_ARG2 size_t
 48+#define HAVE_ALARM 1
 49+#define HAVE_ARPA_INET_H 1
 50+#define HAVE_ARPA_TFTP_H 1
 51+#define HAVE_ASSERT_H 1
 52+#define HAVE_ATOMIC 1
 53+#define HAVE_BASENAME 1
 54+#define HAVE_BOOL_T 1
 55+/* #undef HAVE_BORINGSSL */
 56+/* #undef HAVE_BROTLI */
 57+/* #undef HAVE_BROTLI_DECODE_H */
 58+/* #undef HAVE_BUILTIN_AVAILABLE */
 59+#define HAVE_CLOCK_GETTIME_MONOTONIC 1
 60+/* #undef HAVE_CLOSESOCKET */
 61+/* #undef HAVE_CLOSESOCKET_CAMEL */
 62+#define HAVE_CONNECT 1
 63+/* #undef HAVE_CRYPTO_H */
 64+#define HAVE_DECL_GETPWUID_R 1
 65+/* #undef HAVE_DECL_GETPWUID_R_MISSING */
 66+#define HAVE_DLFCN_H 1
 67+#define HAVE_ERRNO_H 1
 68+/* #undef HAVE_ERR_H */
 69+#define HAVE_FCHMOD 1
 70+#define HAVE_FCNTL 1
 71+#define HAVE_FCNTL_H 1
 72+#define HAVE_FCNTL_O_NONBLOCK 1
 73+#define HAVE_FNMATCH 1
 74+#define HAVE_FREEADDRINFO 1
 75+#define HAVE_FSETXATTR 1
 76+#define HAVE_FSETXATTR_5 1
 77+/* #undef HAVE_FSETXATTR_6 */
 78+#define HAVE_FTRUNCATE 1
 79+#define HAVE_GETADDRINFO 1
 80+#define HAVE_GETADDRINFO_THREADSAFE 1
 81+#define HAVE_GETEUID 1
 82+#define HAVE_GETHOSTBYNAME 1
 83+#define HAVE_GETHOSTBYNAME_R 1
 84+/* #undef HAVE_GETHOSTBYNAME_R_3 */
 85+/* #undef HAVE_GETHOSTBYNAME_R_5 */
 86+#define HAVE_GETHOSTBYNAME_R_6 1
 87+#define HAVE_GETHOSTNAME 1
 88+#define HAVE_GETIFADDRS 1
 89+/* #undef HAVE_GETPASS_R */
 90+#define HAVE_GETPEERNAME 1
 91+#define HAVE_GETPPID 1
 92+#define HAVE_GETPWUID 1
 93+#define HAVE_GETPWUID_R 1
 94+#define HAVE_GETRLIMIT 1
 95+#define HAVE_GETSOCKNAME 1
 96+#define HAVE_GETTIMEOFDAY 1
 97+/* #undef HAVE_GLIBC_STRERROR_R */
 98+#define HAVE_GMTIME_R 1
 99+/* #undef HAVE_GNUTLS_SRP */
100+/* #undef HAVE_GSSAPI */
101+/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
102+/* #undef HAVE_GSSAPI_GSSAPI_H */
103+/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */
104+/* #undef HAVE_GSSGNU */
105+/* #undef HAVE_GSSHEIMDAL */
106+/* #undef HAVE_GSSMIT */
107+/* #undef HAVE_HYPER_H */
108+/* #undef HAVE_IDN2_H */
109+#define HAVE_IFADDRS_H 1
110+#define HAVE_IF_NAMETOINDEX 1
111+#define HAVE_INET_NTOP 1
112+#define HAVE_INET_PTON 1
113+#define HAVE_INTTYPES_H 1
114+/* #undef HAVE_IOCTLSOCKET */
115+/* #undef HAVE_IOCTLSOCKET_CAMEL */
116+/* #undef HAVE_IOCTLSOCKET_CAMEL_FIONBIO */
117+/* #undef HAVE_IOCTLSOCKET_FIONBIO */
118+/* #undef HAVE_IO_H */
119+/* #undef HAVE_LBER_H */
120+/* #undef HAVE_LDAP_H */
121+#define HAVE_LDAP_SSL 1
122+/* #undef HAVE_LDAP_SSL_H */
123+/* #undef HAVE_LDAP_URL_PARSE */
124+/* #undef HAVE_LIBBROTLIDEC */
125+#define HAVE_LIBGEN_H 1
126+/* #undef HAVE_LIBIDN2 */
127+/* #undef HAVE_LIBRESSL */
128+/* #undef HAVE_LIBRTMP_RTMP_H */
129+/* #undef HAVE_LIBSSH */
130+/* #undef HAVE_LIBSSH2 */
131+/* #undef HAVE_LIBSSH2_H */
132+/* #undef HAVE_LIBSSH_LIBSSH_H */
133+/* #undef HAVE_LIBSSL */
134+/* #undef HAVE_LIBWOLFSSH */
135+#define HAVE_LIBZ 1
136+/* #undef HAVE_LIBZSTD */
137+#define HAVE_LINUX_TCP_H 1
138+#define HAVE_LOCALE_H 1
139+#define HAVE_LONGLONG 1
140+/* #undef HAVE_MACH_ABSOLUTE_TIME */
141+/* #undef HAVE_MEMRCHR */
142+#define HAVE_MSG_NOSIGNAL 1
143+/* #undef HAVE_MSH3_H */
144+#define HAVE_NETDB_H 1
145+/* #undef HAVE_NETINET_IN6_H */
146+#define HAVE_NETINET_IN_H 1
147+#define HAVE_NETINET_TCP_H 1
148+#define HAVE_NETINET_UDP_H 1
149+#define HAVE_NET_IF_H 1
150+/* #undef HAVE_NGHTTP2_NGHTTP2_H */
151+/* #undef HAVE_NGHTTP3_NGHTTP3_H */
152+/* #undef HAVE_NGTCP2_NGTCP2_CRYPTO_H */
153+/* #undef HAVE_NGTCP2_NGTCP2_H */
154+/* #undef HAVE_OLD_GSSMIT */
155+/* #undef HAVE_OPENSSL3 */
156+/* #undef HAVE_OPENSSL_CRYPTO_H */
157+/* #undef HAVE_OPENSSL_ERR_H */
158+/* #undef HAVE_OPENSSL_PEM_H */
159+/* #undef HAVE_OPENSSL_RSA_H */
160+/* #undef HAVE_OPENSSL_SRP */
161+/* #undef HAVE_OPENSSL_SSL_H */
162+/* #undef HAVE_OPENSSL_X509_H */
163+/* #undef HAVE_PEM_H */
164+#define HAVE_PIPE 1
165+/* #undef HAVE_PK11_CREATEMANAGEDGENERICOBJECT */
166+#define HAVE_POLL_FINE 1
167+#define HAVE_POLL_H 1
168+#define HAVE_POSIX_STRERROR_R 1
169+/* #undef HAVE_PROTO_BSDSOCKET_H */
170+#define HAVE_PTHREAD_H 1
171+#define HAVE_PWD_H 1
172+/* #undef HAVE_QUICHE_CONN_SET_QLOG_FD */
173+/* #undef HAVE_QUICHE_H */
174+/* #undef HAVE_RAND_EGD */
175+#define HAVE_RECV 1
176+/* #undef HAVE_RSA_H */
177+#define HAVE_SCHED_YIELD 1
178+#define HAVE_SELECT 1
179+#define HAVE_SEND 1
180+#define HAVE_SENDMSG 1
181+#define HAVE_SETJMP_H 1
182+#define HAVE_SETLOCALE 1
183+/* #undef HAVE_SETMODE */
184+#define HAVE_SETRLIMIT 1
185+#define HAVE_SIGACTION 1
186+#define HAVE_SIGINTERRUPT 1
187+#define HAVE_SIGNAL 1
188+#define HAVE_SIGNAL_H 1
189+#define HAVE_SIGSETJMP 1
190+#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
191+#define HAVE_SOCKET 1
192+#define HAVE_SOCKETPAIR 1
193+/* #undef HAVE_SOCKET_H */
194+/* #undef HAVE_SSL_GET_ECH_STATUS */
195+/* #undef HAVE_SSL_H */
196+#define HAVE_STDATOMIC_H 1
197+#define HAVE_STDBOOL_H 1
198+#define HAVE_STDINT_H 1
199+#define HAVE_STDIO_H 1
200+#define HAVE_STDLIB_H 1
201+#define HAVE_STRCASECMP 1
202+/* #undef HAVE_STRCMPI */
203+#define HAVE_STRDUP 1
204+#define HAVE_STRERROR_R 1
205+/* #undef HAVE_STRICMP */
206+#define HAVE_STRINGS_H 1
207+#define HAVE_STRING_H 1
208+#define HAVE_STRTOK_R 1
209+#define HAVE_STRTOLL 1
210+#define HAVE_STRUCT_SOCKADDR_STORAGE 1
211+#define HAVE_STRUCT_TIMEVAL 1
212+#define HAVE_SUSECONDS_T 1
213+/* #undef HAVE_SYS_FILIO_H */
214+#define HAVE_SYS_IOCTL_H 1
215+#define HAVE_SYS_PARAM_H 1
216+#define HAVE_SYS_POLL_H 1
217+#define HAVE_SYS_RESOURCE_H 1
218+#define HAVE_SYS_SELECT_H 1
219+#define HAVE_SYS_SOCKET_H 1
220+/* #undef HAVE_SYS_SOCKIO_H */
221+#define HAVE_SYS_STAT_H 1
222+#define HAVE_SYS_TIME_H 1
223+#define HAVE_SYS_TYPES_H 1
224+#define HAVE_SYS_UIO_H 1
225+#define HAVE_SYS_UN_H 1
226+/* #undef HAVE_SYS_UTIME_H */
227+#define HAVE_SYS_WAIT_H 1
228+#define HAVE_SYS_XATTR_H 1
229+#define HAVE_TERMIOS_H 1
230+/* #undef HAVE_TERMIO_H */
231+/* #undef HAVE_TIME_T_UNSIGNED */
232+#define HAVE_UNISTD_H 1
233+#define HAVE_UTIME 1
234+#define HAVE_UTIMES 1
235+#define HAVE_UTIME_H 1
236+#define HAVE_VARIADIC_MACROS_C99 1
237+#define HAVE_VARIADIC_MACROS_GCC 1
238+/* #undef HAVE_WINCRYPT_H */
239+/* #undef HAVE_WINDOWS_H */
240+/* #undef HAVE_WINLDAP_H */
241+/* #undef HAVE_WINSOCK2_H */
242+/* #undef HAVE_WOLFSSH_SSH_H */
243+/* #undef HAVE_WOLFSSL_DES_ECB_ENCRYPT */
244+/* #undef HAVE_WOLFSSL_GET_PEER_CERTIFICATE */
245+/* #undef HAVE_WOLFSSL_USEALPN */
246+#define HAVE_WRITABLE_ARGV 1
247+/* #undef HAVE_WS2TCPIP_H */
248+/* #undef HAVE_X509_H */
249+#define HAVE_ZLIB_H 1
250+/* #undef HAVE_ZSTD */
251+/* #undef HAVE_ZSTD_H */
252+#define LT_OBJDIR ".libs/"
253+/* #undef NEED_LBER_H */
254+/* #undef NEED_REENTRANT */
255+/* #undef NEED_THREAD_SAFE */
256+#define NTLM_WB_ENABLED 1
257+#define NTLM_WB_FILE "/usr/bin/ntlm_auth"
258+#define OS "oasis"
259+#define PACKAGE "curl"
260+#define PACKAGE_BUGREPORT "a suitable curl mailing list: https://curl.se/mail/"
261+#define PACKAGE_NAME "curl"
262+#define PACKAGE_STRING "curl -"
263+#define PACKAGE_TARNAME "curl"
264+#define PACKAGE_URL ""
265+#define PACKAGE_VERSION "-"
266+/* #undef RANDOM_FILE */
267+#define RECV_TYPE_ARG1 int
268+#define RECV_TYPE_ARG2 void *
269+#define RECV_TYPE_ARG3 size_t
270+#define RECV_TYPE_ARG4 int
271+#define RECV_TYPE_RETV ssize_t
272+#define SELECT_QUAL_ARG5 
273+#define SELECT_TYPE_ARG1 int
274+#define SELECT_TYPE_ARG234 fd_set *
275+#define SELECT_TYPE_ARG5 struct timeval *
276+#define SELECT_TYPE_RETV int
277+#define SEND_QUAL_ARG2 const
278+#define SEND_TYPE_ARG1 int
279+#define SEND_TYPE_ARG2 void *
280+#define SEND_TYPE_ARG3 size_t
281+#define SEND_TYPE_ARG4 int
282+#define SEND_TYPE_RETV ssize_t
283+#define SIZEOF_CURL_OFF_T 8
284+#define SIZEOF_INT 4
285+/* probe SIZEOF_LONG */
286+/* #undef SIZEOF_LONG_LONG */
287+#define SIZEOF_OFF_T 8
288+/* probe SIZEOF_SIZE_T */
289+/* probe SIZEOF_TIME_T */
290+#define STDC_HEADERS 1
291+/* #undef USE_AMISSL */
292+/* #undef USE_ARES */
293+#define USE_BEARSSL 1
294+/* #undef USE_ECH */
295+/* #undef USE_GNUTLS */
296+/* #undef USE_GSASL */
297+/* #undef USE_HYPER */
298+/* #undef USE_LIBPSL */
299+/* #undef USE_LIBRTMP */
300+/* #undef USE_LIBSSH */
301+/* #undef USE_LIBSSH2 */
302+/* #undef USE_MANUAL */
303+/* #undef USE_MBEDTLS */
304+/* #undef USE_MSH3 */
305+/* #undef USE_NGHTTP2 */
306+/* #undef USE_NGHTTP3 */
307+/* #undef USE_NGTCP2 */
308+/* #undef USE_NGTCP2_CRYPTO_GNUTLS */
309+/* #undef USE_NGTCP2_CRYPTO_OPENSSL */
310+/* #undef USE_NGTCP2_CRYPTO_WOLFSSL */
311+/* #undef USE_NSS */
312+/* #undef USE_OPENLDAP */
313+/* #undef USE_OPENSSL */
314+/* #undef USE_QUICHE */
315+/* #undef USE_RUSTLS */
316+/* #undef USE_SCHANNEL */
317+/* #undef USE_SECTRANSP */
318+#define USE_THREADS_POSIX 1
319+/* #undef USE_THREADS_WIN32 */
320+/* #undef USE_TLS_SRP */
321+#define USE_UNIX_SOCKETS 1
322+/* #undef USE_WIN32_CRYPTO */
323+/* #undef USE_WIN32_IDN */
324+/* #undef USE_WIN32_LARGE_FILES */
325+/* #undef USE_WIN32_LDAP */
326+/* #undef USE_WIN32_SMALL_FILES */
327+/* #undef USE_WINDOWS_SSPI */
328+/* #undef USE_WOLFSSH */
329+/* #undef USE_WOLFSSL */
330+#define VERSION "-"
331+/* #undef WANT_IDN_PROTOTYPES */
332+#ifndef _ALL_SOURCE
333+/* #  undef _ALL_SOURCE */
334+#endif
335+/* #undef _FILE_OFFSET_BITS */
336+/* #undef _LARGE_FILES */
337+/* #undef const */
338+/* #undef in_addr_t */
339+#ifndef __cplusplus
340+/* #undef inline */
341+#endif
342+/* #undef size_t */
343+/* #undef ssize_t */
+143, -0
  1@@ -0,0 +1,143 @@
  2+cflags{
  3+	'-std=c99', '-Wall', '-Wpedantic', '-Wno-maybe-uninitialized',
  4+	'-D _DEFAULT_SOURCE',
  5+	'-D HAVE_CONFIG_H',
  6+	'-D BUILDING_LIBCURL',
  7+	'-D CURL_STATICLIB',
  8+	'-I $outdir',
  9+	'-I $outdir/include/curl',
 10+	'-I $outdir/include',
 11+	'-I $srcdir/lib',
 12+	'-I $srcdir/src',
 13+	'-isystem $builddir/pkg/bearssl/include',
 14+	'-isystem $builddir/pkg/linux-headers/include',
 15+	'-isystem $builddir/pkg/zlib/include',
 16+}
 17+
 18+build('cat', '$outdir/curl_config.h', {
 19+	'$dir/curl_config.h',
 20+	'$builddir/probe/SIZEOF_LONG',
 21+	'$builddir/probe/SIZEOF_SIZE_T',
 22+	'$builddir/probe/SIZEOF_TIME_T',
 23+})
 24+
 25+pkg.hdrs = copy('$outdir/include/curl', '$srcdir/include/curl', {
 26+	'curl.h',
 27+	'curlver.h',
 28+	'easy.h',
 29+	'mprintf.h',
 30+	'stdcheaders.h',
 31+	'multi.h',
 32+	'typecheck-gcc.h',
 33+	'system.h',
 34+	'urlapi.h',
 35+	'options.h',
 36+	'header.h',
 37+})
 38+pkg.deps = {
 39+	'$outdir/curl_config.h',
 40+	'$gendir/headers',
 41+	'pkg/bearssl/headers',
 42+	'pkg/linux-headers/headers',
 43+	'pkg/zlib/headers',
 44+}
 45+
 46+-- src/lib/Makefile.inc:/^CSOURCES
 47+lib('libcurl.a', [[
 48+	lib/(
 49+		altsvc.c amigaos.c asyn-ares.c asyn-thread.c base64.c bufref.c
 50+		c-hyper.c conncache.c connect.c content_encoding.c cookie.c
 51+		curl_addrinfo.c curl_ctype.c curl_des.c curl_endian.c
 52+		curl_fnmatch.c curl_get_line.c curl_gethostname.c curl_gssapi.c
 53+		curl_memrchr.c curl_multibyte.c curl_ntlm_core.c curl_ntlm_wb.c
 54+		curl_path.c curl_range.c curl_rtmp.c curl_sasl.c curl_sspi.c
 55+		curl_threads.c dict.c doh.c dotdot.c dynbuf.c easy.c
 56+		easygetopt.c easyoptions.c escape.c file.c fileinfo.c fopen.c
 57+		formdata.c ftp.c ftplistparser.c getenv.c getinfo.c gopher.c
 58+		h2h3.c hash.c headers.c hmac.c hostasyn.c hostip.c hostip4.c
 59+		hostip6.c hostsyn.c hsts.c http.c http2.c http_chunks.c
 60+		http_digest.c http_negotiate.c http_ntlm.c http_proxy.c
 61+		http_aws_sigv4.c idn_win32.c if2ip.c imap.c inet_ntop.c
 62+		inet_pton.c krb5.c ldap.c llist.c md4.c md5.c memdebug.c mime.c
 63+		mprintf.c mqtt.c multi.c netrc.c nonblock.c openldap.c
 64+		parsedate.c pingpong.c pop3.c progress.c psl.c rand.c rename.c
 65+		rtsp.c select.c sendf.c setopt.c sha256.c share.c slist.c smb.c
 66+		smtp.c socketpair.c socks.c socks_gssapi.c socks_sspi.c
 67+		speedcheck.c splay.c strcase.c strdup.c strerror.c strtok.c
 68+		strtoofft.c system_win32.c telnet.c tftp.c timediff.c timeval.c
 69+		transfer.c url.c urlapi.c version.c version_win32.c warnless.c
 70+		wildcard.c
 71+		vauth/(
 72+			cleartext.c cram.c digest.c digest_sspi.c
 73+			gsasl.c krb5_gssapi.c krb5_sspi.c ntlm.c
 74+			ntlm_sspi.c oauth2.c spnego_gssapi.c
 75+			spnego_sspi.c vauth.c
 76+		)
 77+		vtls/(
 78+			bearssl.c gskit.c gtls.c hostcheck.c keylog.c mbedtls.c
 79+			mbedtls_threadlock.c nss.c openssl.c rustls.c schannel.c
 80+			schannel_verify.c sectransp.c vtls.c wolfssl.c
 81+			x509asn1.c
 82+		)
 83+		vquic/(msh3.c ngtcp2.c quiche.c vquic.c)
 84+		vssh/(libssh.c libssh2.c wolfssh.c)
 85+	)
 86+	$builddir/pkg/bearssl/libbearssl.a
 87+	$builddir/pkg/zlib/libz.a
 88+]])
 89+
 90+build('cc', '$outdir/tool_hugehelp.c.o', {
 91+	'$dir/tool_hugehelp.c', '||', '$gendir/deps', '$srcdir/src/tool_hugehelp.h',
 92+})
 93+
 94+-- src/src/Makefile.inc:/^CURL_CFILES
 95+exe('curl', [[
 96+	src/(
 97+		slist_wc.c
 98+		tool_binmode.c
 99+		tool_bname.c
100+		tool_cb_dbg.c
101+		tool_cb_hdr.c
102+		tool_cb_prg.c
103+		tool_cb_rea.c
104+		tool_cb_see.c
105+		tool_cb_wrt.c
106+		tool_cfgable.c
107+		tool_dirhie.c
108+		tool_doswin.c
109+		tool_easysrc.c
110+		tool_filetime.c
111+		tool_findfile.c
112+		tool_formparse.c
113+		tool_getparam.c
114+		tool_getpass.c
115+		tool_help.c
116+		tool_helpers.c
117+		tool_libinfo.c
118+		tool_listhelp.c
119+		tool_main.c
120+		tool_msgs.c
121+		tool_operate.c
122+		tool_operhlp.c
123+		tool_panykey.c
124+		tool_paramhlp.c
125+		tool_parsecfg.c
126+		tool_progress.c
127+		tool_strdup.c
128+		tool_setopt.c
129+		tool_sleep.c
130+		tool_urlglob.c
131+		tool_util.c
132+		tool_vms.c
133+		tool_writeout.c
134+		tool_writeout_json.c
135+		tool_xattr.c
136+	)
137+	tool_hugehelp.c.o
138+	libcurl.a.d
139+]])
140+
141+file('bin/curl', '755', '$outdir/curl')
142+man{'docs/curl.1'}
143+
144+fetch 'curl'
+50, -0
 1@@ -0,0 +1,50 @@
 2+From 04afba4813f504cafb717c48c50de4395fb3ea71 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 16 Oct 2020 19:09:50 -0700
 5+Subject: [PATCH] Reuse dynbuf symbols for curl tool
 6+
 7+---
 8+ lib/dynbuf.h | 24 +++++++++++-------------
 9+ 1 file changed, 11 insertions(+), 13 deletions(-)
10+
11+diff --git a/lib/dynbuf.h b/lib/dynbuf.h
12+index c1e97235d..8b9158051 100644
13+--- a/lib/dynbuf.h
14++++ b/lib/dynbuf.h
15+@@ -24,22 +24,20 @@
16+  *
17+  ***************************************************************************/
18+ 
19+-#ifndef BUILDING_LIBCURL
20+ /* this renames the functions so that the tool code can use the same code
21+    without getting symbol collisions */
22+-#define Curl_dyn_init(a,b) curlx_dyn_init(a,b)
23+-#define Curl_dyn_add(a,b) curlx_dyn_add(a,b)
24+-#define Curl_dyn_addn(a,b,c) curlx_dyn_addn(a,b,c)
25+-#define Curl_dyn_addf curlx_dyn_addf
26+-#define Curl_dyn_vaddf curlx_dyn_vaddf
27+-#define Curl_dyn_free(a) curlx_dyn_free(a)
28+-#define Curl_dyn_ptr(a) curlx_dyn_ptr(a)
29+-#define Curl_dyn_uptr(a) curlx_dyn_uptr(a)
30+-#define Curl_dyn_len(a) curlx_dyn_len(a)
31+-#define Curl_dyn_reset(a) curlx_dyn_reset(a)
32+-#define Curl_dyn_tail(a,b) curlx_dyn_tail(a,b)
33++#define curlx_dyn_init(a,b) Curl_dyn_init(a,b)
34++#define curlx_dyn_add(a,b) Curl_dyn_add(a,b)
35++#define curlx_dyn_addn(a,b,c) Curl_dyn_addn(a,b,c)
36++#define curlx_dyn_addf Curl_dyn_addf
37++#define curlx_dyn_vaddf Curl_dyn_vaddf
38++#define curlx_dyn_free(a) Curl_dyn_free(a)
39++#define curlx_dyn_ptr(a) Curl_dyn_ptr(a)
40++#define curlx_dyn_uptr(a) Curl_dyn_uptr(a)
41++#define curlx_dyn_len(a) Curl_dyn_len(a)
42++#define curlx_dyn_reset(a) Curl_dyn_reset(a)
43++#define curlx_dyn_tail(a,b) Curl_dyn_tail(a,b)
44+ #define curlx_dynbuf dynbuf /* for the struct name */
45+-#endif
46+ 
47+ struct dynbuf {
48+   char *bufr;    /* point to a null-terminated allocated buffer */
49+-- 
50+2.35.1
51+
+29, -0
 1@@ -0,0 +1,29 @@
 2+From 643bad651c570c0e2b5889df4d0cb0803fa58b1e Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 15 Nov 2021 13:10:02 -0800
 5+Subject: [PATCH] bearssl: Remove unnecessary CA blob length check
 6+
 7+BearSSL APIs take a size_t length parameter, so unlike OpenSSL,
 8+there is no conversion to int and no reason to check that it's less
 9+than INT_MAX.
10+---
11+ lib/vtls/bearssl.c | 3 ---
12+ 1 file changed, 3 deletions(-)
13+
14+diff --git a/lib/vtls/bearssl.c b/lib/vtls/bearssl.c
15+index f14eb66a2..ffa7c1166 100644
16+--- a/lib/vtls/bearssl.c
17++++ b/lib/vtls/bearssl.c
18+@@ -129,9 +129,6 @@ static CURLcode load_cafile(struct cafile_source *source,
19+       return CURLE_SSL_CACERT_BADFILE;
20+   }
21+ 
22+-  if(source->type == CAFILE_SOURCE_BLOB && source->len > (size_t)INT_MAX)
23+-    return CURLE_SSL_CACERT_BADFILE;
24+-
25+   ca.err = CURLE_OK;
26+   ca.in_cert = FALSE;
27+   ca.anchors = NULL;
28+-- 
29+2.35.1
30+
+1, -0
1@@ -0,0 +1 @@
2+78a06f918bd5fde3c4573ef4f9806f56372b32ec1829c9ec474799eeee641c27  curl-7.85.0.tar.gz
+3, -0
1@@ -0,0 +1,3 @@
2+/* built-in manual is disabled, blank function */
3+#include "tool_hugehelp.h"
4+void hugehelp(void) {}
+1, -0
1@@ -0,0 +1 @@
2+url = "https://curl.se/download/curl-7.85.0.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+7.85.0 r0
+41, -0
 1@@ -0,0 +1,41 @@
 2+/* #undef CONF_CHECK_ATARI */
 3+#define HAVE_DECL_GETMNTENT 1
 4+#define HAVE_DECL_GETMNTINFO 0
 5+#define HAVE_ENDIAN_H 1
 6+#define HAVE_ERR_H 1
 7+/* #undef HAVE_ICONV */
 8+#define HAVE_INTTYPES_H 1
 9+/* #undef HAVE_LIBKERN_OSBYTEORDER_H */
10+#define HAVE_LINUX_FD_H 1
11+#define HAVE_LINUX_HDREG_H 1
12+#define HAVE_LINUX_LOOP_H 1
13+#define HAVE_LINUX_VERSION_H 1
14+/* #undef HAVE_MINIX_CONFIG_H */
15+#define HAVE_STDINT_H 1
16+#define HAVE_STDIO_H 1
17+#define HAVE_STDLIB_H 1
18+#define HAVE_STRINGS_H 1
19+#define HAVE_STRING_H 1
20+/* #undef HAVE_SYS_DISKLABEL_H */
21+/* #undef HAVE_SYS_DISK_H */
22+/* #undef HAVE_SYS_ENDIAN_H */
23+/* #undef HAVE_SYS_IOCCOM_H */
24+/* #undef HAVE_SYS_MKDEV_H */
25+/* #undef HAVE_SYS_QUEUE_H */
26+#define HAVE_SYS_STAT_H 1
27+#define HAVE_SYS_TYPES_H 1
28+#define HAVE_UNISTD_H 1
29+#define HAVE_VASPRINTF 1
30+#define HAVE_WCHAR_H 1
31+/* #undef ICONV_CONST */
32+#define PACKAGE "dosfstools"
33+#define PACKAGE_BUGREPORT ""
34+#define PACKAGE_NAME "dosfstools"
35+#define PACKAGE_STRING "dosfstools 4.2"
36+#define PACKAGE_TARNAME "dosfstools"
37+#define PACKAGE_URL ""
38+#define PACKAGE_VERSION "4.2"
39+#define STDC_HEADERS 1
40+#define VERSION "4.2"
41+/* #undef _FILE_OFFSET_BITS */
42+/* #undef _LARGE_FILES */
+38, -0
 1@@ -0,0 +1,38 @@
 2+set('version', '4.2')
 3+cflags{
 4+	'-std=c99', '-Wall', '-Wpedantic',
 5+	'-Wno-address-of-packed-member', '-Wno-overflow', -- ioctl
 6+	'-D _GNU_SOURCE',
 7+	'-include $dir/config.h',
 8+	'-I $dir',
 9+	'-I $srcdir/src/blkdev',
10+	'-isystem $builddir/pkg/linux-headers/include',
11+}
12+
13+pkg.deps = {
14+	'pkg/linux-headers/headers',
15+}
16+
17+lib('libcommon.a', [[src/(common.c charconv.c)]])
18+
19+exe('mkfs.fat', [[
20+	src/(mkfs.fat.c device_info.c blkdev/(blkdev.c linux_version.c))
21+	libcommon.a
22+]])
23+file('bin/mkfs.fat', '755', '$outdir/mkfs.fat')
24+
25+exe('fsck.fat', [[
26+	src/(fsck.fat.c check.c file.c lfn.c boot.c fat.c io.c)
27+	libcommon.a
28+]])
29+file('bin/fsck.fat', '755', '$outdir/fsck.fat')
30+
31+for _, src in ipairs{'fsck.fat.8', 'mkfs.fat.8'} do
32+	local out = '$outdir/'..src
33+	build('sed', out, '$srcdir/manpages/'..src..'.in', {
34+		expr='s,@PACKAGE_VERSION@,$version,',
35+	})
36+	man{out}
37+end
38+
39+fetch 'git'
+40, -0
 1@@ -0,0 +1,40 @@
 2+From ff921b142f8df1ec718a7d1b398821eaaa8c6aac Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 1 Jul 2019 22:52:11 -0700
 5+Subject: [PATCH] Use __attribute__ consistently
 6+
 7+---
 8+ src/common.h | 6 +++---
 9+ 1 file changed, 3 insertions(+), 3 deletions(-)
10+
11+diff --git a/src/common.h b/src/common.h
12+index 9a68531..2cc4559 100644
13+--- a/src/common.h
14++++ b/src/common.h
15+@@ -41,12 +41,12 @@ extern int atari_format;	/* Use Atari variation of MS-DOS FS format */
16+ extern const char *program_name;
17+ 
18+ void die(const char *msg, ...)
19+-    __attribute((noreturn, format(printf, 1, 2)));
20++    __attribute__ ((noreturn, format(printf, 1, 2)));
21+ 
22+ /* Displays a prinf-style message and terminates the program. */
23+ 
24+ void pdie(const char *msg, ...)
25+-    __attribute((noreturn, format(printf, 1, 2)));
26++    __attribute__ ((noreturn, format(printf, 1, 2)));
27+ 
28+ /* Like die, but appends an error message according to the state of errno. */
29+ 
30+@@ -68,7 +68,7 @@ int min(int a, int b);
31+ /* Returns the smaller integer value of a and b. */
32+ 
33+ int xasprintf(char **strp, const char *fmt, ...)
34+-    __attribute((format(printf, 2, 3)));
35++    __attribute__ ((format(printf, 2, 3)));
36+ 
37+ /* Runs asprintf() and terminates the program if it fails. */
38+ 
39+-- 
40+2.31.1
41+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 697f7692c951173c1b732901e13f72bd3182d575
+1, -0
1@@ -0,0 +1 @@
2+4.2 r1
+2, -0
1@@ -0,0 +1,2 @@
2+#define VERSION "4.2"
3+#define VERSION_DATE "2021-01-31"
+1, -0
1@@ -0,0 +1 @@
2+/tools.ninja
+12, -0
 1@@ -0,0 +1,12 @@
 2+# e2fsprogs
 3+
 4+# config.h
 5+Generated with
 6+
 7+	./configure \
 8+		--disable-nls \
 9+		--disable-tdb \
10+		--disable-testio-debug \
11+		--disable-uuidd
12+
13+Some irrelevant gnulib lines were filtered out. `dirpaths.h` was inlined.
+1, -0
1@@ -0,0 +1 @@
2+#include <linux/types.h>
+205, -0
  1@@ -0,0 +1,205 @@
  2+/* #undef AC_APPLE_UNIVERSAL_BUILD */
  3+/* #undef CONFIG_BLKID_DEBUG */
  4+#define CONFIG_BUILD_FINDFS 1
  5+/* #undef CONFIG_DEVELOPER_FEATURES */
  6+/* #undef CONFIG_JBD_DEBUG */
  7+#define CONFIG_MMP 1
  8+/* #undef CONFIG_TDB */
  9+/* #undef CONFIG_TESTIO_DEBUG */
 10+/* #undef DISABLE_BACKTRACE */
 11+#define ENABLE_BMAP_STATS 1
 12+/* #undef ENABLE_BMAP_STATS_OPS */
 13+/* #undef ENABLE_NLS */
 14+/* #undef HAVE_ADD_KEY */
 15+/* #undef HAVE_ATTR_XATTR_H */
 16+/* #undef HAVE_BACKTRACE */
 17+/* #undef HAVE_BLKID_PROBE_ENABLE_PARTITIONS */
 18+/* #undef HAVE_BLKID_PROBE_GET_TOPOLOGY */
 19+/* #undef HAVE_BLKID_TOPOLOGY_GET_DAX */
 20+/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */
 21+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
 22+/* #undef HAVE_CHFLAGS */
 23+/* #undef HAVE_DCGETTEXT */
 24+#define HAVE_DIRENT_H 1
 25+#define HAVE_DLOPEN 1
 26+/* #undef HAVE_DOPRNT */
 27+#define HAVE_ERRNO_H 1
 28+/* #undef HAVE_EXECINFO_H */
 29+#define HAVE_EXT2_IOCTLS 1
 30+/* #undef HAVE_FADVISE64 */
 31+#define HAVE_FALLOCATE 1
 32+#define HAVE_FALLOCATE64 1
 33+#define HAVE_FCHOWN 1
 34+#define HAVE_FCNTL 1
 35+#define HAVE_FDATASYNC 1
 36+#define HAVE_FSTAT64 1
 37+#define HAVE_FSYNC 1
 38+#define HAVE_FTRUNCATE64 1
 39+/* #undef HAVE_FUSE_H */
 40+#define HAVE_FUTIMES 1
 41+#define HAVE_GETCWD 1
 42+#define HAVE_GETDTABLESIZE 1
 43+#define HAVE_GETHOSTNAME 1
 44+/* #undef HAVE_GETMNTINFO */
 45+#define HAVE_GETOPT_H 1
 46+#define HAVE_GETPWUID_R 1
 47+#define HAVE_GETRLIMIT 1
 48+#define HAVE_GETRUSAGE 1
 49+/* #undef HAVE_GETTEXT */
 50+/* #undef HAVE_ICONV */
 51+#define HAVE_INTPTR_T 1
 52+#define HAVE_INTTYPES_H 1
 53+#define HAVE_JRAND48 1
 54+/* #undef HAVE_KEYCTL */
 55+#define HAVE_LINUX_FALLOC_H 1
 56+#define HAVE_LINUX_FD_H 1
 57+#define HAVE_LINUX_FSMAP_H 1
 58+#define HAVE_LINUX_LOOP_H 1
 59+#define HAVE_LINUX_MAJOR_H 1
 60+#define HAVE_LINUX_TYPES_H 1
 61+#define HAVE_LLISTXATTR 1
 62+/* #undef HAVE_LLSEEK */
 63+/* #undef HAVE_LLSEEK_PROTOTYPE */
 64+#define HAVE_LSEEK64 1
 65+#define HAVE_LSEEK64_PROTOTYPE 1
 66+/* #undef HAVE_MAGIC_H */
 67+/* #undef HAVE_MALLINFO */
 68+#define HAVE_MALLOC_H 1
 69+#define HAVE_MBSTOWCS 1
 70+#define HAVE_MEMALIGN 1
 71+#define HAVE_MEMORY_H 1
 72+#define HAVE_MEMPCPY 1
 73+#define HAVE_MMAP 1
 74+#define HAVE_MNTENT_H 1
 75+#define HAVE_MOUNT_NODEV 1
 76+#define HAVE_MOUNT_NOSUID 1
 77+#define HAVE_MSYNC 1
 78+#define HAVE_NANOSLEEP 1
 79+#define HAVE_NETINET_IN_H 1
 80+/* #undef HAVE_NET_IF_DL_H */
 81+#define HAVE_NET_IF_H 1
 82+#define HAVE_OPEN64 1
 83+#define HAVE_OPTRESET 1
 84+#define HAVE_PATHCONF 1
 85+#define HAVE_PATHS_H 1
 86+#define HAVE_POSIX_FADVISE 1
 87+#define HAVE_POSIX_FADVISE64 1
 88+#define HAVE_POSIX_MEMALIGN 1
 89+#define HAVE_PRCTL 1
 90+#define HAVE_PREAD 1
 91+#define HAVE_PREAD64 1
 92+#define HAVE_PTHREAD 1
 93+#define HAVE_PTHREAD_H 1
 94+#define HAVE_PTHREAD_PRIO_INHERIT 1
 95+#define HAVE_PWRITE 1
 96+#define HAVE_PWRITE64 1
 97+#define HAVE_RECLEN_DIRENT 1
 98+/* #undef HAVE_SA_LEN */
 99+#define HAVE_SECURE_GETENV 1
100+#define HAVE_SEMAPHORE_H 1
101+/* #undef HAVE_SEM_INIT */
102+#define HAVE_SETJMP_H 1
103+#define HAVE_SETMNTENT 1
104+#define HAVE_SETRESGID 1
105+#define HAVE_SETRESUID 1
106+#define HAVE_SIGNAL_H 1
107+#define HAVE_SNPRINTF 1
108+#define HAVE_SRANDOM 1
109+/* #undef HAVE_STAT_FLAGS */
110+#define HAVE_STDARG_H 1
111+#define HAVE_STDINT_H 1
112+#define HAVE_STDLIB_H 1
113+#define HAVE_STPCPY 1
114+#define HAVE_STRCASECMP 1
115+#define HAVE_STRDUP 1
116+#define HAVE_STRINGS_H 1
117+#define HAVE_STRING_H 1
118+#define HAVE_STRNLEN 1
119+#define HAVE_STRPTIME 1
120+#define HAVE_STRTOULL 1
121+#define HAVE_STRUCT_STAT_ST_ATIM 1
122+#define HAVE_SYNC_FILE_RANGE 1
123+#define HAVE_SYSCONF 1
124+/* #undef HAVE_SYS_ACL_H */
125+/* #undef HAVE_SYS_DISKLABEL_H */
126+/* #undef HAVE_SYS_DISK_H */
127+#define HAVE_SYS_FILE_H 1
128+#define HAVE_SYS_IOCTL_H 1
129+/* #undef HAVE_SYS_KEY_H */
130+/* #undef HAVE_SYS_MKDEV_H */
131+#define HAVE_SYS_MMAN_H 1
132+#define HAVE_SYS_MOUNT_H 1
133+#define HAVE_SYS_PRCTL_H 1
134+#define HAVE_SYS_RESOURCE_H 1
135+#define HAVE_SYS_SELECT_H 1
136+#define HAVE_SYS_SOCKET_H 1
137+/* #undef HAVE_SYS_SOCKIO_H */
138+#define HAVE_SYS_STAT_H 1
139+#define HAVE_SYS_SYSCALL_H 1
140+#define HAVE_SYS_SYSMACROS_H 1
141+#define HAVE_SYS_TIME_H 1
142+#define HAVE_SYS_TYPES_H 1
143+#define HAVE_SYS_UN_H 1
144+#define HAVE_SYS_WAIT_H 1
145+#define HAVE_SYS_XATTR_H 1
146+#define HAVE_TERMIOS_H 1
147+/* #undef HAVE_TERMIO_H */
148+#define HAVE_TYPE_SSIZE_T 1
149+#define HAVE_UNISTD_H 1
150+#define HAVE_USLEEP 1
151+#define HAVE_UTIME 1
152+#define HAVE_UTIMES 1
153+#define HAVE_UTIME_H 1
154+#define HAVE_VALLOC 1
155+#define HAVE_VPRINTF 1
156+/* #undef HAVE___SECURE_GETENV */
157+#define PACKAGE "e2fsprogs"
158+#define PACKAGE_BUGREPORT ""
159+#define PACKAGE_NAME ""
160+#define PACKAGE_STRING ""
161+#define PACKAGE_TARNAME ""
162+#define PACKAGE_URL ""
163+#define PACKAGE_VERSION ""
164+/* #undef PTHREAD_CREATE_JOINABLE */
165+#define SIZEOF_INT 4
166+/* probe SIZEOF_LONG */
167+#define SIZEOF_LONG_LONG 8
168+#define SIZEOF_OFF_T 8
169+#define SIZEOF_SHORT 2
170+/* probe SIZEOF_TIME_T */
171+#define STDC_HEADERS 1
172+#ifdef HAVE__THREAD_LOCAL
173+# define TLS _Thread_local
174+#endif
175+#ifndef _ALL_SOURCE
176+# define _ALL_SOURCE 1
177+#endif
178+#ifndef _GNU_SOURCE
179+# define _GNU_SOURCE 1
180+#endif
181+#ifndef _POSIX_PTHREAD_SEMANTICS
182+# define _POSIX_PTHREAD_SEMANTICS 1
183+#endif
184+#ifndef _TANDEM_SOURCE
185+# define _TANDEM_SOURCE 1
186+#endif
187+#ifndef __EXTENSIONS__
188+# define __EXTENSIONS__ 1
189+#endif
190+/* #undef USE_UUIDD */
191+#define VERSION "0.14.1"
192+#if defined AC_APPLE_UNIVERSAL_BUILD
193+# if defined __BIG_ENDIAN__
194+#  define WORDS_BIGENDIAN 1
195+# endif
196+#else
197+# ifndef WORDS_BIGENDIAN
198+/* #  undef WORDS_BIGENDIAN */
199+# endif
200+#endif
201+/* #undef _INTL_REDIRECT_MACROS */
202+/* #undef _MINIX */
203+/* #undef _POSIX_1_SOURCE */
204+/* #undef _POSIX_SOURCE */
205+#define LOCALEDIR "/share/locale"
206+#define ROOT_SYSCONFDIR "/etc"
+3, -0
1@@ -0,0 +1,3 @@
2+#include <sys/types.h>
3+#include <linux/types.h>
4+#define __force
+227, -0
  1@@ -0,0 +1,227 @@
  2+set('version', '1.46.4')
  3+cflags{
  4+	'-std=c99', '-Wall',
  5+        '-Wno-address-of-packed-member', '-Wno-format-truncation',
  6+        '-Wno-unused-variable', '-Wno-stringop-truncation',
  7+        '-Wno-stringop-overflow', '-Wno-unused-label',
  8+	'-D HAVE_CONFIG_H',
  9+	'-I $outdir',
 10+	'-I $outdir/include',
 11+	'-I $outdir/internal',
 12+	'-I $outdir/internal/support',
 13+	'-I $srcdir/lib',
 14+	'-isystem $builddir/pkg/linux-headers/include',
 15+	'-isystem $builddir/pkg/util-linux/include',
 16+}
 17+
 18+build('cat', '$outdir/config.h', {
 19+	'$builddir/probe/HAVE__THREAD_LOCAL',
 20+	'$builddir/probe/SIZEOF_LONG',
 21+	'$builddir/probe/SIZEOF_TIME_T',
 22+	'$dir/config.h',
 23+})
 24+
 25+set('subst', {
 26+	'-e s,@E2FSPROGS_VERSION@,$version,',
 27+	'-e s,@E2FSPROGS_MONTH@,Aug,',
 28+	'-e s,@E2FSPROGS_YEAR@,2021,',
 29+	'-e s,@JDEV@,,',
 30+})
 31+
 32+local function et(file, src, hdr)
 33+	src = '$outdir/'..src
 34+	hdr = '$outdir/'..hdr
 35+	build('awk', src, {file, '|', '$srcdir/lib/et/et_c.awk'}, {
 36+		expr='-f $srcdir/lib/et/et_c.awk -v outfile=/dev/stdout outfn='..src:match('[^/]*$'),
 37+	})
 38+	build('awk', hdr, {file, '|', '$srcdir/lib/et/et_h.awk'}, {
 39+		expr='-f $srcdir/lib/et/et_h.awk -v outfile=/dev/stdout outfn='..hdr:match('[^/]*$'),
 40+	})
 41+end
 42+
 43+local function subst(output, input)
 44+	output = '$outdir/'..output
 45+	build('sed', output, '$srcdir/'..input, {expr='$subst'})
 46+	return output
 47+end
 48+
 49+local function substman(files)
 50+	for _, file in ipairs(files) do
 51+		if file:hassuffix('.in') then
 52+			file = subst(file:sub(1, -4), file)
 53+		end
 54+		man{file}
 55+	end
 56+end
 57+
 58+subst('ext2_err.et', 'lib/ext2fs/ext2_err.et.in')
 59+et('$outdir/ext2_err.et', 'ext2_err.c', 'include/ext2fs/ext2_err.h')
 60+et('$srcdir/lib/support/prof_err.et', 'prof_err.c', 'internal/support/prof_err.h')
 61+
 62+build('copy', '$outdir/include/ext2fs/ext2_types.h', '$dir/ext2_types.h')
 63+
 64+sub('tools.ninja', function()
 65+	toolchain(config.host)
 66+	exe('gen_crc32ctable', {'lib/ext2fs/gen_crc32ctable.c'})
 67+end)
 68+rule('gen_crc32ctable', '$outdir/gen_crc32ctable >$out')
 69+build('gen_crc32ctable', '$outdir/internal/crc32c_table.h', {'|', '$outdir/gen_crc32ctable'})
 70+
 71+pkg.hdrs = {
 72+	'$outdir/include/ext2fs/ext2_err.h',
 73+	'$outdir/include/ext2fs/ext2_types.h',
 74+}
 75+pkg.deps = {
 76+	'$outdir/config.h',
 77+	'$gendir/headers',
 78+	'$outdir/internal/support/prof_err.h',
 79+	'$outdir/internal/crc32c_table.h',
 80+	'pkg/linux-headers/headers',
 81+	'pkg/util-linux/headers',
 82+}
 83+
 84+lib('libcomm_err.a', [[lib/et/(error_message.c et_name.c init_et.c com_err.c com_right.c)]])
 85+lib('libe2p.a', [[lib/e2p/(
 86+	feature.c fgetflags.c fsetflags.c fgetversion.c fsetversion.c
 87+	getflags.c getversion.c hashstr.c iod.c ls.c ljs.c mntopts.c
 88+	parse_num.c pe.c pf.c ps.c setflags.c setversion.c uuid.c
 89+	ostype.c percent.c crypto_mode.c fgetproject.c fsetproject.c
 90+	encoding.c errcode.c
 91+)]])
 92+lib('libext2fs.a', [[$outdir/ext2_err.c lib/ext2fs/(
 93+	alloc.c
 94+	alloc_sb.c
 95+	alloc_stats.c
 96+	alloc_tables.c
 97+	atexit.c
 98+	badblocks.c
 99+	bb_inode.c
100+	bitmaps.c
101+	bitops.c
102+	blkmap64_ba.c
103+	blkmap64_rb.c
104+	blknum.c
105+	block.c
106+	bmap.c
107+	check_desc.c
108+	closefs.c
109+	crc16.c
110+	crc32c.c
111+	csum.c
112+	dblist.c
113+	dblist_dir.c
114+	dirblock.c
115+	dirhash.c
116+	dir_iterate.c
117+	expanddir.c
118+	ext_attr.c
119+	extent.c
120+	fallocate.c
121+	fileio.c
122+	finddev.c
123+	flushb.c
124+	freefs.c
125+	gen_bitmap.c
126+	gen_bitmap64.c
127+	get_num_dirs.c
128+	get_pathname.c
129+	getsize.c
130+	getsectsize.c
131+	hashmap.c
132+	i_block.c
133+	icount.c
134+	ind_block.c
135+	initialize.c
136+	inline.c
137+	inline_data.c
138+	inode.c
139+	io_manager.c
140+	ismounted.c
141+	link.c
142+	llseek.c
143+	lookup.c
144+	mkdir.c
145+	mkjournal.c
146+	mmp.c
147+	namei.c
148+	native.c
149+	newdir.c
150+	nls_utf8.c
151+	openfs.c
152+	progress.c
153+	punch.c
154+	qcow2.c
155+	read_bb.c
156+	read_bb_file.c
157+	res_gdt.c
158+	rw_bitmaps.c
159+	sha512.c
160+	swapfs.c
161+	symlink.c
162+	undo_io.c
163+	unix_io.c
164+	sparse_io.c
165+	unlink.c
166+	valid_blk.c
167+	version.c
168+	rbtree.c
169+
170+	dupfs.c
171+)]])
172+lib('libsupport.a', [[$outdir/prof_err.c lib/support/(
173+	cstring.c
174+	mkquota.c
175+	plausible.c
176+	profile.c
177+	parse_qtype.c
178+	profile_helpers.c
179+	quotaio.c
180+	quotaio_v2.c
181+	quotaio_tree.c
182+	dict.c
183+)]])
184+
185+exe('bin/e2fsck', [[
186+	e2fsck/(
187+		unix.c e2fsck.c super.c pass1.c pass1b.c pass2.c
188+		pass3.c pass4.c pass5.c journal.c badblocks.c util.c dirinfo.c
189+		dx_dirinfo.c ehandler.c problem.c message.c quota.c recovery.c
190+		region.c revoke.c ea_refcount.c rehash.c
191+		logfile.c sigcatcher.c readahead.c
192+		extents.c encrypted_files.c
193+	)
194+	libsupport.a libext2fs.a libe2p.a libcomm_err.a
195+	$builddir/pkg/util-linux/libblkid.a.d
196+	$builddir/pkg/util-linux/libuuid.a.d
197+]])
198+file('bin/e2fsck', '755', '$outdir/bin/e2fsck')
199+substman{'e2fsck/e2fsck.8.in', 'e2fsck/e2fsck.conf.5.in'}
200+
201+exe('bin/resize2fs', [[
202+	resize/(
203+		extent.c resize2fs.c main.c online.c resource_track.c
204+		sim_progress.c
205+	)
206+	libext2fs.a libe2p.a libcomm_err.a
207+]])
208+file('bin/resize2fs', '755', '$outdir/bin/resize2fs')
209+substman{'resize/resize2fs.8.in'}
210+
211+build('awk', '$outdir/default_profile.c', {'$srcdir/misc/mke2fs.conf.in', '|', '$srcdir/misc/profile-to-c.awk'}, {
212+	expr='-f $srcdir/misc/profile-to-c.awk',
213+})
214+
215+exe('bin/mke2fs', [[
216+	misc/(
217+		mke2fs.c util.c mk_hugefiles.c
218+		create_inode.c
219+	)
220+	$outdir/default_profile.c
221+	libsupport.a libext2fs.a libe2p.a libcomm_err.a
222+	$builddir/pkg/util-linux/libblkid.a.d
223+	$builddir/pkg/util-linux/libuuid.a.d
224+]])
225+file('bin/mke2fs', '755', '$outdir/bin/mke2fs')
226+substman{'misc/mke2fs.8.in'}
227+
228+fetch 'git'
+156, -0
  1@@ -0,0 +1,156 @@
  2+From 24a0e8d916019160c1fe186ccfb9843d00a5ddde Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Tue, 2 Mar 2021 15:47:20 -0800
  5+Subject: [PATCH] libsupport: remove unused sort_r definition
  6+
  7+e2fsprogs uses sort_r_simple directly, so sort_r is not needed.
  8+
  9+On any linux (including linux-musl), sort_r is defined in terms of
 10+qsort_r, so a compiler that does not support inlining may still
 11+emit a reference to qsort_r.
 12+---
 13+ lib/support/sort_r.h | 119 +------------------------------------------
 14+ 1 file changed, 2 insertions(+), 117 deletions(-)
 15+
 16+diff --git a/lib/support/sort_r.h b/lib/support/sort_r.h
 17+index 3292a26a..08f496d4 100644
 18+--- a/lib/support/sort_r.h
 19++++ b/lib/support/sort_r.h
 20+@@ -22,20 +22,10 @@ void sort_r(void *base, size_t nel, size_t width,
 21+ 
 22+ */
 23+ 
 24+-#define _SORT_R_INLINE inline
 25+-
 26+-#if (defined __gnu_hurd__ || defined __GNU__ || \
 27+-       defined __linux__ || defined __MINGW32__ || defined __GLIBC__)
 28+-#  define _SORT_R_LINUX
 29+-#elif (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || \
 30+-     defined __FreeBSD__ || defined __DragonFly__)
 31+-#  define _SORT_R_BSD
 32+-#elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
 33+-#  define _SORT_R_WINDOWS
 34+-#  undef _SORT_R_INLINE
 35++#if (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
 36+ #  define _SORT_R_INLINE __inline
 37+ #else
 38+-  /* Using our own recursive quicksort sort_r_simple() */
 39++#  define _SORT_R_INLINE inline
 40+ #endif
 41+ 
 42+ #if (defined NESTED_QSORT && NESTED_QSORT == 0)
 43+@@ -211,111 +201,6 @@ static _SORT_R_INLINE void sort_r_simple(void *base, size_t nel, size_t w,
 44+   }
 45+ }
 46+ 
 47+-
 48+-#if defined NESTED_QSORT
 49+-
 50+-  static _SORT_R_INLINE void sort_r(void *base, size_t nel, size_t width,
 51+-                                    int (*compar)(const void *_a,
 52+-                                                  const void *_b,
 53+-                                                  void *aarg),
 54+-                                    void *arg)
 55+-  {
 56+-    int nested_cmp(const void *a, const void *b)
 57+-    {
 58+-      return compar(a, b, arg);
 59+-    }
 60+-
 61+-    qsort(base, nel, width, nested_cmp);
 62+-  }
 63+-
 64+-#else /* !NESTED_QSORT */
 65+-
 66+-  /* Declare structs and functions */
 67+-
 68+-  #if defined _SORT_R_BSD
 69+-
 70+-    /* Ensure qsort_r is defined */
 71+-    extern void qsort_r(void *base, size_t nel, size_t width, void *thunk,
 72+-                        int (*compar)(void *_thunk,
 73+-                                      const void *_a, const void *_b));
 74+-
 75+-  #endif
 76+-
 77+-  #if defined _SORT_R_BSD || defined _SORT_R_WINDOWS
 78+-
 79+-    /* BSD (qsort_r), Windows (qsort_s) require argument swap */
 80+-
 81+-    struct sort_r_data
 82+-    {
 83+-      void *arg;
 84+-      int (*compar)(const void *_a, const void *_b, void *_arg);
 85+-    };
 86+-
 87+-    static _SORT_R_INLINE int sort_r_arg_swap(void *s,
 88+-                                              const void *a, const void *b)
 89+-    {
 90+-      struct sort_r_data *ss = (struct sort_r_data*)s;
 91+-      return (ss->compar)(a, b, ss->arg);
 92+-    }
 93+-
 94+-  #endif
 95+-
 96+-  #if defined _SORT_R_LINUX
 97+-
 98+-    typedef int(* __compar_d_fn_t)(const void *, const void *, void *);
 99+-    extern void qsort_r(void *base, size_t nel, size_t width,
100+-                        __compar_d_fn_t __compar, void *arg)
101+-      __attribute__((nonnull (1, 4)));
102+-
103+-  #endif
104+-
105+-  /* implementation */
106+-
107+-  static _SORT_R_INLINE void sort_r(void *base, size_t nel, size_t width,
108+-                                    int (*compar)(const void *_a,
109+-                                                  const void *_b, void *_arg),
110+-                                    void *arg)
111+-  {
112+-    #if defined _SORT_R_LINUX
113+-
114+-      #if defined __GLIBC__ && ((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 8))
115+-
116+-        /* no qsort_r in glibc before 2.8, need to use nested qsort */
117+-        sort_r_simple(base, nel, width, compar, arg);
118+-
119+-      #else
120+-
121+-        qsort_r(base, nel, width, compar, arg);
122+-
123+-      #endif
124+-
125+-    #elif defined _SORT_R_BSD
126+-
127+-      struct sort_r_data tmp;
128+-      tmp.arg = arg;
129+-      tmp.compar = compar;
130+-      qsort_r(base, nel, width, &tmp, sort_r_arg_swap);
131+-
132+-    #elif defined _SORT_R_WINDOWS
133+-
134+-      struct sort_r_data tmp;
135+-      tmp.arg = arg;
136+-      tmp.compar = compar;
137+-      qsort_s(base, nel, width, sort_r_arg_swap, &tmp);
138+-
139+-    #else
140+-
141+-      /* Fall back to our own quicksort implementation */
142+-      sort_r_simple(base, nel, width, compar, arg);
143+-
144+-    #endif
145+-  }
146+-
147+-#endif /* !NESTED_QSORT */
148+-
149+ #undef _SORT_R_INLINE
150+-#undef _SORT_R_WINDOWS
151+-#undef _SORT_R_LINUX
152+-#undef _SORT_R_BSD
153+ 
154+ #endif /* SORT_R_H_ */
155+-- 
156+2.32.0
157+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 2dfad18d8b5c5afa76001ef6a25700dcf2b7411f
+1, -0
1@@ -0,0 +1 @@
2+1.46.4 r0
+87, -0
 1@@ -0,0 +1,87 @@
 2+cflags{
 3+	'-Wall', '-Wpedantic',
 4+	'-I $outdir/include',
 5+	'-I $srcdir/common',
 6+	'-I $srcdir/libelf',
 7+	'-isystem $builddir/pkg/openbsd/include',
 8+}
 9+
10+pkg.hdrs = {
11+	copy('$outdir/include', '$srcdir/libelf', {'libelf.h', 'gelf.h'}),
12+	copy('$outdir/include', '$srcdir/common', {'elfdefinitions.h'}),
13+	'$outdir/include/sys/elfdefinitions.h',
14+	install=true,
15+}
16+pkg.deps = {'$gendir/headers', 'pkg/openbsd/headers'}
17+
18+rule('m4', 'm4 $m4flags -D SRCDIR=$srcdir/libelf $in >$out')
19+build('m4', '$outdir/libelf_convert.c', {'$srcdir/libelf/libelf_convert.m4', '|', '$srcdir/libelf/elf_types.m4'})
20+build('m4', '$outdir/libelf_fsize.c', {'$srcdir/libelf/libelf_fsize.m4', '|', '$srcdir/libelf/elf_types.m4'})
21+build('m4', '$outdir/libelf_msize.c', {'$srcdir/libelf/libelf_msize.m4', '|', '$srcdir/libelf/elf_types.m4'})
22+build('m4', '$outdir/include/sys/elfdefinitions.h', {'$srcdir/common/sys/elfdefinitions.m4', '|', '$srcdir/common/sys/elfconstants.m4'}, {
23+	m4flags='-I $srcdir/common/sys'
24+})
25+
26+lib('libelf.a', [[
27+	libelf/(
28+		elf.c
29+		elf_begin.c
30+		elf_cntl.c
31+		elf_end.c elf_errmsg.c elf_errno.c
32+		elf_data.c
33+		elf_fill.c
34+		elf_flag.c
35+		elf_getarhdr.c
36+		elf_getarsym.c
37+		elf_getbase.c
38+		elf_getident.c
39+		elf_getversion.c
40+		elf_hash.c
41+		elf_kind.c
42+		elf_memory.c
43+		elf_next.c
44+		elf_open.c
45+		elf_rand.c
46+		elf_rawfile.c
47+		elf_phnum.c
48+		elf_shnum.c
49+		elf_shstrndx.c
50+		elf_scn.c
51+		elf_strptr.c
52+		elf_update.c
53+		elf_version.c
54+		gelf_cap.c
55+		gelf_checksum.c
56+		gelf_dyn.c
57+		gelf_ehdr.c
58+		gelf_getclass.c
59+		gelf_fsize.c
60+		gelf_move.c
61+		gelf_phdr.c
62+		gelf_rel.c
63+		gelf_rela.c
64+		gelf_shdr.c
65+		gelf_sym.c
66+		gelf_syminfo.c
67+		gelf_symshndx.c
68+		gelf_xlate.c
69+		libelf_align.c
70+		libelf_allocate.c
71+		libelf_ar.c
72+		libelf_ar_util.c
73+		libelf_checksum.c
74+		libelf_data.c
75+		libelf_ehdr.c
76+		libelf_elfmachine.c
77+		libelf_extended.c
78+		libelf_memory.c
79+		libelf_open.c
80+		libelf_phdr.c
81+		libelf_shdr.c
82+		libelf_xlate.c
83+	)
84+	$outdir/(libelf_convert.c libelf_fsize.c libelf_msize.c)
85+]])
86+file('lib/libelf.a', '644', '$outdir/libelf.a')
87+
88+fetch 'git'
+25, -0
 1@@ -0,0 +1,25 @@
 2+From 1f3cf2b7c4232f82ae37a62bcccccaa1398d834b Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 2 Jul 2019 23:49:18 -0700
 5+Subject: [PATCH] Prevent empty top-level declarations
 6+
 7+---
 8+ common/_elftc.h | 2 +-
 9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/common/_elftc.h b/common/_elftc.h
12+index 5c4cf610..8c391fb5 100644
13+--- a/common/_elftc.h
14++++ b/common/_elftc.h
15+@@ -305,7 +305,7 @@ struct name {							\
16+ #if defined(__GNUC__)
17+ #define	ELFTC_VCSID(ID)		__asm__(".ident\t\"" ID "\"")
18+ #else
19+-#define	ELFTC_VCSID(ID)		/**/
20++#define	ELFTC_VCSID(ID)		_Static_assert(1, "")
21+ #endif
22+ 
23+ #endif
24+-- 
25+2.31.1
26+
+59, -0
 1@@ -0,0 +1,59 @@
 2+From 7233abcc2902766760f9dd26217df159d4e6340a Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 2 Jul 2019 23:54:25 -0700
 5+Subject: [PATCH] Use _Alignof when built as C11
 6+
 7+---
 8+ libelf/libelf_align.c | 21 +++++++++++++++++----
 9+ 1 file changed, 17 insertions(+), 4 deletions(-)
10+
11+diff --git a/libelf/libelf_align.c b/libelf/libelf_align.c
12+index c0cdce97..2150fea7 100644
13+--- a/libelf/libelf_align.c
14++++ b/libelf/libelf_align.c
15+@@ -39,25 +39,38 @@ struct align {
16+ 	unsigned int a64;
17+ };
18+ 
19+-#ifdef	__GNUC__
20++#if	__STDC_VERSION__ >= 201112L
21++#define	MALIGN(N)	{					\
22++		.a32 = _Alignof(Elf32_##N),			\
23++		.a64 = _Alignof(Elf64_##N)			\
24++	}
25++#define	MALIGN64(V)	{					\
26++		.a32 = 0,					\
27++		.a64 = _Alignof(Elf64_##V)			\
28++	}
29++#define	MALIGN_WORD()	{					\
30++		.a32 = _Alignof(int32_t),			\
31++		.a64 = _Alignof(int64_t)			\
32++	}
33++#elif	defined(__GNUC__)
34+ #define	MALIGN(N)	{					\
35+ 		.a32 = __alignof__(Elf32_##N),			\
36+ 		.a64 = __alignof__(Elf64_##N)			\
37+ 	}
38+-#define	MALIGN64(V)	  {					\
39++#define	MALIGN64(V)	{					\
40+ 		.a32 = 0,					\
41+ 		.a64 = __alignof__(Elf64_##V)			\
42+ 	}
43+ #define	MALIGN_WORD()	{					\
44+ 		.a32 = __alignof__(int32_t),			\
45+ 		.a64 = __alignof__(int64_t)			\
46+-	    }
47++	}
48+ #elif defined(__lint__)
49+ #define MALIGN(N)	{ .a32 = 0, .a64 = 0 }
50+ #define MALIGN64(N)	{ .a32 = 0, .a64 = 0 }
51+ #define MALIGN_WORD(N)	{ .a32 = 0, .a64 = 0 }
52+ #else
53+-#error	Need the __alignof__ builtin.
54++#error	Need C11 _Alignof, or the __alignof__ builtin.
55+ #endif
56+ #define	UNSUPPORTED()	{					\
57+ 		.a32 = 0,					\
58+-- 
59+2.31.1
60+
+834, -0
  1@@ -0,0 +1,834 @@
  2+From a2b4fa9da830e1345df70c3372d6cfc14faf8f07 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Thu, 29 Apr 2021 12:09:05 -0700
  5+Subject: [PATCH] Revert "Add back <sys/cdefs.h>."
  6+
  7+This reverts commit 301fff723d18730ade4ef4034ed36fd6369f1886.
  8+---
  9+ libelf/elf.c               | 2 --
 10+ libelf/elf_begin.c         | 2 --
 11+ libelf/elf_cntl.c          | 2 --
 12+ libelf/elf_data.c          | 2 --
 13+ libelf/elf_end.c           | 2 --
 14+ libelf/elf_errmsg.c        | 2 --
 15+ libelf/elf_errno.c         | 2 --
 16+ libelf/elf_fill.c          | 2 --
 17+ libelf/elf_flag.c          | 2 --
 18+ libelf/elf_getarhdr.c      | 2 --
 19+ libelf/elf_getarsym.c      | 2 --
 20+ libelf/elf_getbase.c       | 2 --
 21+ libelf/elf_getident.c      | 2 --
 22+ libelf/elf_getversion.c    | 2 --
 23+ libelf/elf_hash.c          | 2 --
 24+ libelf/elf_kind.c          | 2 --
 25+ libelf/elf_memory.c        | 2 --
 26+ libelf/elf_next.c          | 2 --
 27+ libelf/elf_open.c          | 2 --
 28+ libelf/elf_phnum.c         | 2 --
 29+ libelf/elf_rand.c          | 2 --
 30+ libelf/elf_rawfile.c       | 2 --
 31+ libelf/elf_scn.c           | 1 -
 32+ libelf/elf_shnum.c         | 2 --
 33+ libelf/elf_shstrndx.c      | 2 --
 34+ libelf/elf_strptr.c        | 1 -
 35+ libelf/elf_update.c        | 1 -
 36+ libelf/elf_version.c       | 2 --
 37+ libelf/gelf_cap.c          | 2 --
 38+ libelf/gelf_checksum.c     | 2 --
 39+ libelf/gelf_dyn.c          | 2 --
 40+ libelf/gelf_ehdr.c         | 2 --
 41+ libelf/gelf_fsize.c        | 2 --
 42+ libelf/gelf_getclass.c     | 2 --
 43+ libelf/gelf_move.c         | 2 --
 44+ libelf/gelf_phdr.c         | 2 --
 45+ libelf/gelf_rel.c          | 2 --
 46+ libelf/gelf_rela.c         | 2 --
 47+ libelf/gelf_shdr.c         | 2 --
 48+ libelf/gelf_sym.c          | 2 --
 49+ libelf/gelf_syminfo.c      | 2 --
 50+ libelf/gelf_symshndx.c     | 2 --
 51+ libelf/gelf_xlate.c        | 2 --
 52+ libelf/libelf_allocate.c   | 2 --
 53+ libelf/libelf_ar.c         | 2 --
 54+ libelf/libelf_ar_util.c    | 2 --
 55+ libelf/libelf_checksum.c   | 2 --
 56+ libelf/libelf_convert.m4   | 2 --
 57+ libelf/libelf_data.c       | 2 --
 58+ libelf/libelf_ehdr.c       | 2 --
 59+ libelf/libelf_elfmachine.c | 2 --
 60+ libelf/libelf_extended.c   | 2 --
 61+ libelf/libelf_fsize.m4     | 2 --
 62+ libelf/libelf_memory.c     | 2 --
 63+ libelf/libelf_msize.m4     | 2 --
 64+ libelf/libelf_open.c       | 1 -
 65+ libelf/libelf_phdr.c       | 2 --
 66+ libelf/libelf_shdr.c       | 2 --
 67+ libelf/libelf_xlate.c      | 2 --
 68+ 59 files changed, 114 deletions(-)
 69+
 70+diff --git a/libelf/elf.c b/libelf/elf.c
 71+index 3eac4f47..b391c43a 100644
 72+--- a/libelf/elf.c
 73++++ b/libelf/elf.c
 74+@@ -24,8 +24,6 @@
 75+  * SUCH DAMAGE.
 76+  */
 77+ 
 78+-#include <sys/cdefs.h>
 79+-
 80+ #include <libelf.h>
 81+ 
 82+ #include "_libelf.h"
 83+diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
 84+index f7b1b552..0eccc5f8 100644
 85+--- a/libelf/elf_begin.c
 86++++ b/libelf/elf_begin.c
 87+@@ -24,8 +24,6 @@
 88+  * SUCH DAMAGE.
 89+  */
 90+ 
 91+-#include <sys/cdefs.h>
 92+-
 93+ #include <libelf.h>
 94+ 
 95+ #include "_libelf.h"
 96+diff --git a/libelf/elf_cntl.c b/libelf/elf_cntl.c
 97+index 92efa3b4..0f892fd4 100644
 98+--- a/libelf/elf_cntl.c
 99++++ b/libelf/elf_cntl.c
100+@@ -24,8 +24,6 @@
101+  * SUCH DAMAGE.
102+  */
103+ 
104+-#include <sys/cdefs.h>
105+-
106+ #include <libelf.h>
107+ 
108+ #include "_libelf.h"
109+diff --git a/libelf/elf_data.c b/libelf/elf_data.c
110+index 9101c1ac..0a380464 100644
111+--- a/libelf/elf_data.c
112++++ b/libelf/elf_data.c
113+@@ -24,8 +24,6 @@
114+  * SUCH DAMAGE.
115+  */
116+ 
117+-#include <sys/cdefs.h>
118+-
119+ #include <assert.h>
120+ #include <errno.h>
121+ #include <libelf.h>
122+diff --git a/libelf/elf_end.c b/libelf/elf_end.c
123+index c5920c11..8e483236 100644
124+--- a/libelf/elf_end.c
125++++ b/libelf/elf_end.c
126+@@ -24,8 +24,6 @@
127+  * SUCH DAMAGE.
128+  */
129+ 
130+-#include <sys/cdefs.h>
131+-
132+ #include <assert.h>
133+ #include <libelf.h>
134+ #include <stdlib.h>
135+diff --git a/libelf/elf_errmsg.c b/libelf/elf_errmsg.c
136+index de242828..e5f54762 100644
137+--- a/libelf/elf_errmsg.c
138++++ b/libelf/elf_errmsg.c
139+@@ -24,8 +24,6 @@
140+  * SUCH DAMAGE.
141+  */
142+ 
143+-#include <sys/cdefs.h>
144+-
145+ #include <libelf.h>
146+ #include <stdio.h>
147+ #include <string.h>
148+diff --git a/libelf/elf_errno.c b/libelf/elf_errno.c
149+index baf6c0d7..056f129e 100644
150+--- a/libelf/elf_errno.c
151++++ b/libelf/elf_errno.c
152+@@ -24,8 +24,6 @@
153+  * SUCH DAMAGE.
154+  */
155+ 
156+-#include <sys/cdefs.h>
157+-
158+ #include <libelf.h>
159+ 
160+ #include "_libelf.h"
161+diff --git a/libelf/elf_fill.c b/libelf/elf_fill.c
162+index a6499182..bddec5d1 100644
163+--- a/libelf/elf_fill.c
164++++ b/libelf/elf_fill.c
165+@@ -24,8 +24,6 @@
166+  * SUCH DAMAGE.
167+  */
168+ 
169+-#include <sys/cdefs.h>
170+-
171+ #include <libelf.h>
172+ 
173+ #include "_libelf.h"
174+diff --git a/libelf/elf_flag.c b/libelf/elf_flag.c
175+index 0e68ef08..9c56cfac 100644
176+--- a/libelf/elf_flag.c
177++++ b/libelf/elf_flag.c
178+@@ -24,8 +24,6 @@
179+  * SUCH DAMAGE.
180+  */
181+ 
182+-#include <sys/cdefs.h>
183+-
184+ #include <libelf.h>
185+ 
186+ #include "_libelf.h"
187+diff --git a/libelf/elf_getarhdr.c b/libelf/elf_getarhdr.c
188+index 139ff36d..1a33171e 100644
189+--- a/libelf/elf_getarhdr.c
190++++ b/libelf/elf_getarhdr.c
191+@@ -24,8 +24,6 @@
192+  * SUCH DAMAGE.
193+  */
194+ 
195+-#include <sys/cdefs.h>
196+-
197+ #include <libelf.h>
198+ 
199+ #include "_libelf.h"
200+diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c
201+index e9bd479e..4bfaf7f7 100644
202+--- a/libelf/elf_getarsym.c
203++++ b/libelf/elf_getarsym.c
204+@@ -24,8 +24,6 @@
205+  * SUCH DAMAGE.
206+  */
207+ 
208+-#include <sys/cdefs.h>
209+-
210+ #include <libelf.h>
211+ 
212+ #include "_libelf.h"
213+diff --git a/libelf/elf_getbase.c b/libelf/elf_getbase.c
214+index fe378afa..c42c0649 100644
215+--- a/libelf/elf_getbase.c
216++++ b/libelf/elf_getbase.c
217+@@ -24,8 +24,6 @@
218+  * SUCH DAMAGE.
219+  */
220+ 
221+-#include <sys/cdefs.h>
222+-
223+ #include <libelf.h>
224+ 
225+ #include "_libelf.h"
226+diff --git a/libelf/elf_getident.c b/libelf/elf_getident.c
227+index 701b1f20..c7d33a28 100644
228+--- a/libelf/elf_getident.c
229++++ b/libelf/elf_getident.c
230+@@ -24,8 +24,6 @@
231+  * SUCH DAMAGE.
232+  */
233+ 
234+-#include <sys/cdefs.h>
235+-
236+ #include <ar.h>
237+ #include <assert.h>
238+ #include <libelf.h>
239+diff --git a/libelf/elf_getversion.c b/libelf/elf_getversion.c
240+index 24e68e6d..b967453c 100644
241+--- a/libelf/elf_getversion.c
242++++ b/libelf/elf_getversion.c
243+@@ -24,8 +24,6 @@
244+  * THE POSSIBILITY OF SUCH DAMAGE.
245+  */
246+ 
247+-#include <sys/cdefs.h>
248+-
249+ #include <libelf.h>
250+ 
251+ #include "_libelf.h"
252+diff --git a/libelf/elf_hash.c b/libelf/elf_hash.c
253+index 8d20acbd..f61e8268 100644
254+--- a/libelf/elf_hash.c
255++++ b/libelf/elf_hash.c
256+@@ -24,8 +24,6 @@
257+  * SUCH DAMAGE.
258+  */
259+ 
260+-#include <sys/cdefs.h>
261+-
262+ #include <libelf.h>
263+ 
264+ #include "_libelf.h"
265+diff --git a/libelf/elf_kind.c b/libelf/elf_kind.c
266+index d182c37b..45989800 100644
267+--- a/libelf/elf_kind.c
268++++ b/libelf/elf_kind.c
269+@@ -24,8 +24,6 @@
270+  * SUCH DAMAGE.
271+  */
272+ 
273+-#include <sys/cdefs.h>
274+-
275+ #include <libelf.h>
276+ 
277+ #include "_libelf.h"
278+diff --git a/libelf/elf_memory.c b/libelf/elf_memory.c
279+index 21cf2d2d..0544998c 100644
280+--- a/libelf/elf_memory.c
281++++ b/libelf/elf_memory.c
282+@@ -24,8 +24,6 @@
283+  * SUCH DAMAGE.
284+  */
285+ 
286+-#include <sys/cdefs.h>
287+-
288+ #include <libelf.h>
289+ 
290+ #include "_libelf.h"
291+diff --git a/libelf/elf_next.c b/libelf/elf_next.c
292+index 66fd2e22..e2fe9a2b 100644
293+--- a/libelf/elf_next.c
294++++ b/libelf/elf_next.c
295+@@ -24,8 +24,6 @@
296+  * SUCH DAMAGE.
297+  */
298+ 
299+-#include <sys/cdefs.h>
300+-
301+ #include <ar.h>
302+ #include <assert.h>
303+ #include <libelf.h>
304+diff --git a/libelf/elf_open.c b/libelf/elf_open.c
305+index 577bcc7f..adad0610 100644
306+--- a/libelf/elf_open.c
307++++ b/libelf/elf_open.c
308+@@ -24,8 +24,6 @@
309+  * SUCH DAMAGE.
310+  */
311+ 
312+-#include <sys/cdefs.h>
313+-
314+ #include <libelf.h>
315+ 
316+ #include "_libelf.h"
317+diff --git a/libelf/elf_phnum.c b/libelf/elf_phnum.c
318+index 3ade2c45..3d2b1bcd 100644
319+--- a/libelf/elf_phnum.c
320++++ b/libelf/elf_phnum.c
321+@@ -24,8 +24,6 @@
322+  * SUCH DAMAGE.
323+  */
324+ 
325+-#include <sys/cdefs.h>
326+-
327+ #include <ar.h>
328+ #include <libelf.h>
329+ 
330+diff --git a/libelf/elf_rand.c b/libelf/elf_rand.c
331+index 6946fa6a..eafb0686 100644
332+--- a/libelf/elf_rand.c
333++++ b/libelf/elf_rand.c
334+@@ -24,8 +24,6 @@
335+  * SUCH DAMAGE.
336+  */
337+ 
338+-#include <sys/cdefs.h>
339+-
340+ #include <ar.h>
341+ #include <libelf.h>
342+ 
343+diff --git a/libelf/elf_rawfile.c b/libelf/elf_rawfile.c
344+index cd048e3a..5a5452b5 100644
345+--- a/libelf/elf_rawfile.c
346++++ b/libelf/elf_rawfile.c
347+@@ -24,8 +24,6 @@
348+  * SUCH DAMAGE.
349+  */
350+ 
351+-#include <sys/cdefs.h>
352+-
353+ #include <libelf.h>
354+ 
355+ #include "_libelf.h"
356+diff --git a/libelf/elf_scn.c b/libelf/elf_scn.c
357+index 2557581a..dfa77f53 100644
358+--- a/libelf/elf_scn.c
359++++ b/libelf/elf_scn.c
360+@@ -24,7 +24,6 @@
361+  * SUCH DAMAGE.
362+  */
363+ 
364+-#include <sys/cdefs.h>
365+ #include <sys/queue.h>
366+ 
367+ #include <assert.h>
368+diff --git a/libelf/elf_shnum.c b/libelf/elf_shnum.c
369+index 4319a249..fbc0d0d5 100644
370+--- a/libelf/elf_shnum.c
371++++ b/libelf/elf_shnum.c
372+@@ -24,8 +24,6 @@
373+  * SUCH DAMAGE.
374+  */
375+ 
376+-#include <sys/cdefs.h>
377+-
378+ #include <ar.h>
379+ #include <libelf.h>
380+ 
381+diff --git a/libelf/elf_shstrndx.c b/libelf/elf_shstrndx.c
382+index 90c4b57a..ef62285d 100644
383+--- a/libelf/elf_shstrndx.c
384++++ b/libelf/elf_shstrndx.c
385+@@ -24,8 +24,6 @@
386+  * SUCH DAMAGE.
387+  */
388+ 
389+-#include <sys/cdefs.h>
390+-
391+ #include <ar.h>
392+ #include <libelf.h>
393+ 
394+diff --git a/libelf/elf_strptr.c b/libelf/elf_strptr.c
395+index 6a9e7c5d..5c594b45 100644
396+--- a/libelf/elf_strptr.c
397++++ b/libelf/elf_strptr.c
398+@@ -24,7 +24,6 @@
399+  * SUCH DAMAGE.
400+  */
401+ 
402+-#include <sys/cdefs.h>
403+ #include <sys/param.h>
404+ 
405+ #include <assert.h>
406+diff --git a/libelf/elf_update.c b/libelf/elf_update.c
407+index baf64809..3e19b78a 100644
408+--- a/libelf/elf_update.c
409++++ b/libelf/elf_update.c
410+@@ -24,7 +24,6 @@
411+  * SUCH DAMAGE.
412+  */
413+ 
414+-#include <sys/cdefs.h>
415+ #include <sys/param.h>
416+ #include <sys/stat.h>
417+ 
418+diff --git a/libelf/elf_version.c b/libelf/elf_version.c
419+index 4d4d9e06..f2037a16 100644
420+--- a/libelf/elf_version.c
421++++ b/libelf/elf_version.c
422+@@ -24,8 +24,6 @@
423+  * SUCH DAMAGE.
424+  */
425+ 
426+-#include <sys/cdefs.h>
427+-
428+ #include <libelf.h>
429+ 
430+ #include "_libelf.h"
431+diff --git a/libelf/gelf_cap.c b/libelf/gelf_cap.c
432+index ed63d793..2e82fdf2 100644
433+--- a/libelf/gelf_cap.c
434++++ b/libelf/gelf_cap.c
435+@@ -24,8 +24,6 @@
436+  * SUCH DAMAGE.
437+  */
438+ 
439+-#include <sys/cdefs.h>
440+-
441+ #include <assert.h>
442+ #include <gelf.h>
443+ #include <limits.h>
444+diff --git a/libelf/gelf_checksum.c b/libelf/gelf_checksum.c
445+index ae1f1015..d29dd25f 100644
446+--- a/libelf/gelf_checksum.c
447++++ b/libelf/gelf_checksum.c
448+@@ -24,8 +24,6 @@
449+  * SUCH DAMAGE.
450+  */
451+ 
452+-#include <sys/cdefs.h>
453+-
454+ #include <gelf.h>
455+ #include <libelf.h>
456+ 
457+diff --git a/libelf/gelf_dyn.c b/libelf/gelf_dyn.c
458+index 950b9a72..653d39a5 100644
459+--- a/libelf/gelf_dyn.c
460++++ b/libelf/gelf_dyn.c
461+@@ -24,8 +24,6 @@
462+  * SUCH DAMAGE.
463+  */
464+ 
465+-#include <sys/cdefs.h>
466+-
467+ #include <assert.h>
468+ #include <gelf.h>
469+ #include <limits.h>
470+diff --git a/libelf/gelf_ehdr.c b/libelf/gelf_ehdr.c
471+index 30983333..d6b42c7c 100644
472+--- a/libelf/gelf_ehdr.c
473++++ b/libelf/gelf_ehdr.c
474+@@ -24,8 +24,6 @@
475+  * SUCH DAMAGE.
476+  */
477+ 
478+-#include <sys/cdefs.h>
479+-
480+ #include <assert.h>
481+ #include <gelf.h>
482+ #include <libelf.h>
483+diff --git a/libelf/gelf_fsize.c b/libelf/gelf_fsize.c
484+index 8cfeb7cc..3eeeb80c 100644
485+--- a/libelf/gelf_fsize.c
486++++ b/libelf/gelf_fsize.c
487+@@ -24,8 +24,6 @@
488+  * SUCH DAMAGE.
489+  */
490+ 
491+-#include <sys/cdefs.h>
492+-
493+ #include <gelf.h>
494+ #include <libelf.h>
495+ 
496+diff --git a/libelf/gelf_getclass.c b/libelf/gelf_getclass.c
497+index eb8bfd4e..3e5bf4f3 100644
498+--- a/libelf/gelf_getclass.c
499++++ b/libelf/gelf_getclass.c
500+@@ -24,8 +24,6 @@
501+  * SUCH DAMAGE.
502+  */
503+ 
504+-#include <sys/cdefs.h>
505+-
506+ #include <gelf.h>
507+ 
508+ #include "_libelf.h"
509+diff --git a/libelf/gelf_move.c b/libelf/gelf_move.c
510+index d3f2011e..20bc0d86 100644
511+--- a/libelf/gelf_move.c
512++++ b/libelf/gelf_move.c
513+@@ -24,8 +24,6 @@
514+  * SUCH DAMAGE.
515+  */
516+ 
517+-#include <sys/cdefs.h>
518+-
519+ #include <assert.h>
520+ #include <gelf.h>
521+ #include <limits.h>
522+diff --git a/libelf/gelf_phdr.c b/libelf/gelf_phdr.c
523+index 0ac2c8bf..5996910d 100644
524+--- a/libelf/gelf_phdr.c
525++++ b/libelf/gelf_phdr.c
526+@@ -24,8 +24,6 @@
527+  * SUCH DAMAGE.
528+  */
529+ 
530+-#include <sys/cdefs.h>
531+-
532+ #include <gelf.h>
533+ #include <libelf.h>
534+ #include <limits.h>
535+diff --git a/libelf/gelf_rel.c b/libelf/gelf_rel.c
536+index 1a1459ab..60332597 100644
537+--- a/libelf/gelf_rel.c
538++++ b/libelf/gelf_rel.c
539+@@ -24,8 +24,6 @@
540+  * SUCH DAMAGE.
541+  */
542+ 
543+-#include <sys/cdefs.h>
544+-
545+ #include <assert.h>
546+ #include <gelf.h>
547+ #include <limits.h>
548+diff --git a/libelf/gelf_rela.c b/libelf/gelf_rela.c
549+index 40f94da7..40462248 100644
550+--- a/libelf/gelf_rela.c
551++++ b/libelf/gelf_rela.c
552+@@ -24,8 +24,6 @@
553+  * SUCH DAMAGE.
554+  */
555+ 
556+-#include <sys/cdefs.h>
557+-
558+ #include <assert.h>
559+ #include <gelf.h>
560+ #include <limits.h>
561+diff --git a/libelf/gelf_shdr.c b/libelf/gelf_shdr.c
562+index 9150776b..2248551e 100644
563+--- a/libelf/gelf_shdr.c
564++++ b/libelf/gelf_shdr.c
565+@@ -24,8 +24,6 @@
566+  * SUCH DAMAGE.
567+  */
568+ 
569+-#include <sys/cdefs.h>
570+-
571+ #include <assert.h>
572+ #include <gelf.h>
573+ #include <libelf.h>
574+diff --git a/libelf/gelf_sym.c b/libelf/gelf_sym.c
575+index a8422395..998bfda2 100644
576+--- a/libelf/gelf_sym.c
577++++ b/libelf/gelf_sym.c
578+@@ -24,8 +24,6 @@
579+  * SUCH DAMAGE.
580+  */
581+ 
582+-#include <sys/cdefs.h>
583+-
584+ #include <assert.h>
585+ #include <gelf.h>
586+ #include <limits.h>
587+diff --git a/libelf/gelf_syminfo.c b/libelf/gelf_syminfo.c
588+index ae6c8473..d97ab291 100644
589+--- a/libelf/gelf_syminfo.c
590++++ b/libelf/gelf_syminfo.c
591+@@ -24,8 +24,6 @@
592+  * SUCH DAMAGE.
593+  */
594+ 
595+-#include <sys/cdefs.h>
596+-
597+ #include <assert.h>
598+ #include <gelf.h>
599+ 
600+diff --git a/libelf/gelf_symshndx.c b/libelf/gelf_symshndx.c
601+index ab6e8519..0ba1cc08 100644
602+--- a/libelf/gelf_symshndx.c
603++++ b/libelf/gelf_symshndx.c
604+@@ -24,8 +24,6 @@
605+  * SUCH DAMAGE.
606+  */
607+ 
608+-#include <sys/cdefs.h>
609+-
610+ #include <assert.h>
611+ #include <gelf.h>
612+ 
613+diff --git a/libelf/gelf_xlate.c b/libelf/gelf_xlate.c
614+index 228b17bf..af539a5a 100644
615+--- a/libelf/gelf_xlate.c
616++++ b/libelf/gelf_xlate.c
617+@@ -24,8 +24,6 @@
618+  * SUCH DAMAGE.
619+  */
620+ 
621+-#include <sys/cdefs.h>
622+-
623+ #include <gelf.h>
624+ #include <libelf.h>
625+ #include <string.h>
626+diff --git a/libelf/libelf_allocate.c b/libelf/libelf_allocate.c
627+index 1387568e..3cf58ae7 100644
628+--- a/libelf/libelf_allocate.c
629++++ b/libelf/libelf_allocate.c
630+@@ -28,8 +28,6 @@
631+  * Internal APIs
632+  */
633+ 
634+-#include <sys/cdefs.h>
635+-
636+ #include <assert.h>
637+ #include <errno.h>
638+ #include <libelf.h>
639+diff --git a/libelf/libelf_ar.c b/libelf/libelf_ar.c
640+index 2a8b834b..26632c86 100644
641+--- a/libelf/libelf_ar.c
642++++ b/libelf/libelf_ar.c
643+@@ -24,8 +24,6 @@
644+  * SUCH DAMAGE.
645+  */
646+ 
647+-#include <sys/cdefs.h>
648+-
649+ #include <assert.h>
650+ #include <ctype.h>
651+ #include <libelf.h>
652+diff --git a/libelf/libelf_ar_util.c b/libelf/libelf_ar_util.c
653+index 601036fa..f98e7258 100644
654+--- a/libelf/libelf_ar_util.c
655++++ b/libelf/libelf_ar_util.c
656+@@ -24,8 +24,6 @@
657+  * SUCH DAMAGE.
658+  */
659+ 
660+-#include <sys/cdefs.h>
661+-
662+ #include <assert.h>
663+ #include <libelf.h>
664+ #include <stdlib.h>
665+diff --git a/libelf/libelf_checksum.c b/libelf/libelf_checksum.c
666+index 84ab3370..d573bc20 100644
667+--- a/libelf/libelf_checksum.c
668++++ b/libelf/libelf_checksum.c
669+@@ -24,8 +24,6 @@
670+  * SUCH DAMAGE.
671+  */
672+ 
673+-#include <sys/cdefs.h>
674+-
675+ #include <gelf.h>
676+ 
677+ #include "_libelf.h"
678+diff --git a/libelf/libelf_convert.m4 b/libelf/libelf_convert.m4
679+index c9e3c28a..e9eb743b 100644
680+--- a/libelf/libelf_convert.m4
681++++ b/libelf/libelf_convert.m4
682+@@ -24,8 +24,6 @@
683+  * SUCH DAMAGE.
684+  */
685+ 
686+-#include <sys/cdefs.h>
687+-
688+ #include <assert.h>
689+ #include <libelf.h>
690+ #include <string.h>
691+diff --git a/libelf/libelf_data.c b/libelf/libelf_data.c
692+index 3f921a00..6b8f50ae 100644
693+--- a/libelf/libelf_data.c
694++++ b/libelf/libelf_data.c
695+@@ -24,8 +24,6 @@
696+  * SUCH DAMAGE.
697+  */
698+ 
699+-#include <sys/cdefs.h>
700+-
701+ #include <libelf.h>
702+ 
703+ #include "_libelf.h"
704+diff --git a/libelf/libelf_ehdr.c b/libelf/libelf_ehdr.c
705+index 75b3dd00..813e4e17 100644
706+--- a/libelf/libelf_ehdr.c
707++++ b/libelf/libelf_ehdr.c
708+@@ -24,8 +24,6 @@
709+  * SUCH DAMAGE.
710+  */
711+ 
712+-#include <sys/cdefs.h>
713+-
714+ #include <assert.h>
715+ #include <gelf.h>
716+ #include <libelf.h>
717+diff --git a/libelf/libelf_elfmachine.c b/libelf/libelf_elfmachine.c
718+index 5b8244f4..c7e44b39 100644
719+--- a/libelf/libelf_elfmachine.c
720++++ b/libelf/libelf_elfmachine.c
721+@@ -24,8 +24,6 @@
722+  * SUCH DAMAGE.
723+  */
724+ 
725+-#include <sys/cdefs.h>
726+-
727+ #include <assert.h>
728+ #include <libelf.h>
729+ 
730+diff --git a/libelf/libelf_extended.c b/libelf/libelf_extended.c
731+index 2ddac923..2cde9fad 100644
732+--- a/libelf/libelf_extended.c
733++++ b/libelf/libelf_extended.c
734+@@ -24,8 +24,6 @@
735+  * SUCH DAMAGE.
736+  */
737+ 
738+-#include <sys/cdefs.h>
739+-
740+ #include <assert.h>
741+ #include <libelf.h>
742+ 
743+diff --git a/libelf/libelf_fsize.m4 b/libelf/libelf_fsize.m4
744+index 256a856a..0192b7ed 100644
745+--- a/libelf/libelf_fsize.m4
746++++ b/libelf/libelf_fsize.m4
747+@@ -24,8 +24,6 @@
748+  * SUCH DAMAGE.
749+  */
750+ 
751+-#include <sys/cdefs.h>
752+-
753+ #include <libelf.h>
754+ 
755+ #include "_libelf.h"
756+diff --git a/libelf/libelf_memory.c b/libelf/libelf_memory.c
757+index 9aad49b8..e2b6bd22 100644
758+--- a/libelf/libelf_memory.c
759++++ b/libelf/libelf_memory.c
760+@@ -24,8 +24,6 @@
761+  * SUCH DAMAGE.
762+  */
763+ 
764+-#include <sys/cdefs.h>
765+-
766+ #include <ar.h>
767+ #include <assert.h>
768+ #include <string.h>
769+diff --git a/libelf/libelf_msize.m4 b/libelf/libelf_msize.m4
770+index b4cc8634..b6bfb80d 100644
771+--- a/libelf/libelf_msize.m4
772++++ b/libelf/libelf_msize.m4
773+@@ -24,8 +24,6 @@
774+  * SUCH DAMAGE.
775+  */
776+ 
777+-#include <sys/cdefs.h>
778+-
779+ #include <assert.h>
780+ #include <libelf.h>
781+ #include <string.h>
782+diff --git a/libelf/libelf_open.c b/libelf/libelf_open.c
783+index 7216df14..4b0cec72 100644
784+--- a/libelf/libelf_open.c
785++++ b/libelf/libelf_open.c
786+@@ -24,7 +24,6 @@
787+  * SUCH DAMAGE.
788+  */
789+ 
790+-#include <sys/cdefs.h>
791+ #include <sys/types.h>
792+ #include <sys/stat.h>
793+ 
794+diff --git a/libelf/libelf_phdr.c b/libelf/libelf_phdr.c
795+index ac92679f..88cac8aa 100644
796+--- a/libelf/libelf_phdr.c
797++++ b/libelf/libelf_phdr.c
798+@@ -24,8 +24,6 @@
799+  * SUCH DAMAGE.
800+  */
801+ 
802+-#include <sys/cdefs.h>
803+-
804+ #include <assert.h>
805+ #include <gelf.h>
806+ #include <libelf.h>
807+diff --git a/libelf/libelf_shdr.c b/libelf/libelf_shdr.c
808+index 463a0ed0..604a6701 100644
809+--- a/libelf/libelf_shdr.c
810++++ b/libelf/libelf_shdr.c
811+@@ -24,8 +24,6 @@
812+  * SUCH DAMAGE.
813+  */
814+ 
815+-#include <sys/cdefs.h>
816+-
817+ #include <gelf.h>
818+ #include <libelf.h>
819+ 
820+diff --git a/libelf/libelf_xlate.c b/libelf/libelf_xlate.c
821+index 003f9532..f8a7967c 100644
822+--- a/libelf/libelf_xlate.c
823++++ b/libelf/libelf_xlate.c
824+@@ -24,8 +24,6 @@
825+  * SUCH DAMAGE.
826+  */
827+ 
828+-#include <sys/cdefs.h>
829+-
830+ #include <assert.h>
831+ #include <libelf.h>
832+ 
833+-- 
834+2.31.1
835+
+26, -0
 1@@ -0,0 +1,26 @@
 2+From ddc7be75561caab4927241df5473561eacc4cca4 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 29 Apr 2021 12:20:12 -0700
 5+Subject: [PATCH] readelf: remove unnecessary ';' after function definition
 6+
 7+This is not allowed by the ISO C grammar.
 8+---
 9+ readelf/readelf.c | 2 +-
10+ 1 file changed, 1 insertion(+), 1 deletion(-)
11+
12+diff --git a/readelf/readelf.c b/readelf/readelf.c
13+index d3b1bb51..7dafd341 100644
14+--- a/readelf/readelf.c
15++++ b/readelf/readelf.c
16+@@ -458,7 +458,7 @@ elf_osabi(unsigned int abi)
17+ 		snprintf(s_abi, sizeof(s_abi), "<unknown: %#x>", abi);
18+ 		return (s_abi);
19+ 	}
20+-};
21++}
22+ 
23+ static const char *
24+ elf_machine(unsigned int mach)
25+-- 
26+2.31.1
27+
+26, -0
 1@@ -0,0 +1,26 @@
 2+From fe335f0f01aabe08df740092306ecc107ff5d96d Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 28 Jun 2021 18:23:22 -0700
 5+Subject: [PATCH] Allow empty Elf_Data
 6+
 7+---
 8+ libelf/elf_update.c | 3 +++
 9+ 1 file changed, 3 insertions(+)
10+
11+diff --git a/libelf/elf_update.c b/libelf/elf_update.c
12+index 3e19b78a..62f64fc1 100644
13+--- a/libelf/elf_update.c
14++++ b/libelf/elf_update.c
15+@@ -815,6 +815,9 @@ _libelf_write_scn(Elf *e, unsigned char *nf, struct _Elf_Extent *ex)
16+ 			    LIBELF_PRIVATE(fillchar),
17+ 			    (size_t) (sh_off + d->d_off - (uint64_t) rc));
18+ 
19++		if (d->d_size == 0)
20++			continue;
21++
22+ 		rc = (off_t) (sh_off + d->d_off);
23+ 
24+ 		assert(d->d_buf != NULL);
25+-- 
26+2.32.0
27+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit f7e9afc6f9ad0d84ea73b4659c5d6d13275d2306
+1, -0
1@@ -0,0 +1 @@
2+ce6d62aaba r1
+1, -0
1@@ -0,0 +1 @@
2+/host.ninja
+154, -0
  1@@ -0,0 +1,154 @@
  2+/* #undef AC_APPLE_UNIVERSAL_BUILD */
  3+#define BUILTIN_ELF 1
  4+/* #undef BZLIBSUPPORT */
  5+#define ELFCORE 1
  6+#define HAVE_ASCTIME_R 1
  7+#define HAVE_ASPRINTF 1
  8+#define HAVE_BYTESWAP_H 1
  9+/* #undef HAVE_BZLIB_H */
 10+#define HAVE_CTIME_R 1
 11+#define HAVE_DAYLIGHT 1
 12+#define HAVE_DECL_DAYLIGHT 1
 13+#define HAVE_DECL_TZNAME 1
 14+#define HAVE_DLFCN_H 1
 15+#define HAVE_DPRINTF 1
 16+#define HAVE_ERR_H 1
 17+#define HAVE_FCNTL_H 1
 18+/* #undef HAVE_FMTCHECK */
 19+#define HAVE_FORK 1
 20+#define HAVE_FREELOCALE 1
 21+#define HAVE_FSEEKO 1
 22+#define HAVE_GETLINE 1
 23+#define HAVE_GETOPT_H 1
 24+#define HAVE_GETOPT_LONG 1
 25+#define HAVE_GETPAGESIZE 1
 26+#define HAVE_GMTIME_R 1
 27+#define HAVE_INTPTR_T 1
 28+#define HAVE_INTTYPES_H 1
 29+/* #undef HAVE_LIBBZ2 */
 30+/* #undef HAVE_LIBGNURX */
 31+/* #undef HAVE_LIBLZMA */
 32+/* #undef HAVE_LIBSECCOMP */
 33+#define HAVE_LIBZ 1
 34+#define HAVE_LOCALTIME_R 1
 35+/* #undef HAVE_LZMA_H */
 36+#define HAVE_MBRTOWC 1
 37+#define HAVE_MBSTATE_T 1
 38+#define HAVE_MEMMEM 1
 39+#define HAVE_MEMORY_H 1
 40+#define HAVE_MKOSTEMP 1
 41+#define HAVE_MKSTEMP 1
 42+#define HAVE_MMAP 1
 43+#define HAVE_NEWLOCALE 1
 44+#define HAVE_PIPE2 1
 45+#define HAVE_POSIX_SPAWNP 1
 46+#define HAVE_PREAD 1
 47+#define HAVE_SIG_T 1
 48+#define HAVE_SPAWN_H 1
 49+#define HAVE_STDINT_H 1
 50+#define HAVE_STDLIB_H 1
 51+#define HAVE_STRCASESTR 1
 52+#define HAVE_STRINGS_H 1
 53+#define HAVE_STRING_H 1
 54+#define HAVE_STRLCAT 1
 55+#define HAVE_STRLCPY 1
 56+#define HAVE_STRNDUP 1
 57+#define HAVE_STRTOF 1
 58+#define HAVE_STRUCT_OPTION 1
 59+#define HAVE_STRUCT_STAT_ST_RDEV 1
 60+#define HAVE_STRUCT_TM_TM_GMTOFF 1
 61+#define HAVE_STRUCT_TM_TM_ZONE 1
 62+/* #undef HAVE_SYS_BSWAP_H */
 63+#define HAVE_SYS_IOCTL_H 1
 64+#define HAVE_SYS_MMAN_H 1
 65+#define HAVE_SYS_PARAM_H 1
 66+#define HAVE_SYS_STAT_H 1
 67+#define HAVE_SYS_SYSMACROS_H 1
 68+#define HAVE_SYS_TIME_H 1
 69+#define HAVE_SYS_TYPES_H 1
 70+/* #undef HAVE_SYS_UTIME_H */
 71+#define HAVE_SYS_WAIT_H 1
 72+#define HAVE_TM_ISDST 1
 73+#define HAVE_TM_ZONE 1
 74+#define HAVE_TZNAME 1
 75+#define HAVE_UINTPTR_T 1
 76+#define HAVE_UNISTD_H 1
 77+#define HAVE_USELOCALE 1
 78+#define HAVE_UTIME 1
 79+#define HAVE_UTIMES 1
 80+#define HAVE_UTIME_H 1
 81+#define HAVE_VASPRINTF 1
 82+#define HAVE_VFORK 1
 83+/* #undef HAVE_VFORK_H */
 84+#define HAVE_VISIBILITY 1
 85+#define HAVE_WCHAR_H 1
 86+#define HAVE_WCTYPE_H 1
 87+#define HAVE_WCWIDTH 1
 88+#define HAVE_WORKING_FORK 1
 89+#define HAVE_WORKING_VFORK 1
 90+/* #undef HAVE_XLOCALE_H */
 91+#define HAVE_ZLIB_H 1
 92+#define LT_OBJDIR ".libs/"
 93+/* #undef MAJOR_IN_MKDEV */
 94+#define MAJOR_IN_SYSMACROS 1
 95+#define PACKAGE "file"
 96+#define PACKAGE_BUGREPORT "christos@astron.com"
 97+#define PACKAGE_NAME "file"
 98+#define PACKAGE_STRING "file 5.42"
 99+#define PACKAGE_TARNAME "file"
100+#define PACKAGE_URL ""
101+#define PACKAGE_VERSION "5.42"
102+#define STDC_HEADERS 1
103+/* #undef TM_IN_SYS_TIME */
104+#ifndef _ALL_SOURCE
105+# define _ALL_SOURCE 1
106+#endif
107+#ifndef _GNU_SOURCE
108+# define _GNU_SOURCE 1
109+#endif
110+#ifndef _POSIX_PTHREAD_SEMANTICS
111+# define _POSIX_PTHREAD_SEMANTICS 1
112+#endif
113+#ifndef _TANDEM_SOURCE
114+# define _TANDEM_SOURCE 1
115+#endif
116+#ifndef __EXTENSIONS__
117+# define __EXTENSIONS__ 1
118+#endif
119+#define VERSION "5.42"
120+#if defined AC_APPLE_UNIVERSAL_BUILD
121+# if defined __BIG_ENDIAN__
122+#  define WORDS_BIGENDIAN 1
123+# endif
124+#else
125+# ifndef WORDS_BIGENDIAN
126+/* #  undef WORDS_BIGENDIAN */
127+# endif
128+#endif
129+/* #undef XZLIBSUPPORT */
130+#define ZLIBSUPPORT 1
131+#ifndef _DARWIN_USE_64_BIT_INODE
132+# define _DARWIN_USE_64_BIT_INODE 1
133+#endif
134+/* #undef _FILE_OFFSET_BITS */
135+/* #undef _LARGEFILE_SOURCE */
136+/* #undef _LARGE_FILES */
137+/* #undef _MINIX */
138+/* #undef _POSIX_1_SOURCE */
139+/* #undef _POSIX_SOURCE */
140+/* #undef _UINT32_T */
141+/* #undef _UINT64_T */
142+/* #undef _UINT8_T */
143+/* #undef int32_t */
144+/* #undef int64_t */
145+/* #undef intptr_t */
146+/* #undef mbstate_t */
147+/* #undef off_t */
148+/* #undef pid_t */
149+/* #undef size_t */
150+/* #undef uint16_t */
151+/* #undef uint32_t */
152+/* #undef uint64_t */
153+/* #undef uint8_t */
154+/* #undef uintptr_t */
155+/* #undef vfork */
+64, -0
 1@@ -0,0 +1,64 @@
 2+local version = '5.42'
 3+cflags{
 4+	'-Wall',
 5+	'-Wno-maybe-uninitialized',  -- false positive in src/readelf.c
 6+	'-D HAVE_CONFIG_H',
 7+	([[-D 'MAGIC="%s/share/file/magic"']]):format(config.prefix),
 8+	'-D _GNU_SOURCE',
 9+	'-I $dir',
10+	'-I $outdir/include',
11+	'-isystem $builddir/pkg/zlib/include',
12+}
13+
14+build('sed', '$outdir/include/magic.h', '$srcdir/src/magic.h.in', {
15+	expr='s,X.YY,'..version:gsub('%.', '')..',',
16+})
17+
18+build('sed', '$outdir/file.1', '$srcdir/doc/file.man', {
19+	expr={
20+		'-e s,__CSECTION__,1,g',
21+		'-e s,__FSECTION__,5,g',
22+		'-e s,__VERSION__,'..version..',g',
23+		'-e s,__MAGIC__,/share/file/magic,g',
24+	},
25+})
26+
27+pkg.hdrs = {'$outdir/include/magic.h'}
28+pkg.deps = {'$gendir/headers', 'pkg/zlib/headers'}
29+
30+lib('libmagic.a', [[src/(
31+	buffer.c magic.c apprentice.c softmagic.c ascmagic.c
32+	encoding.c compress.c is_csv.c is_json.c is_tar.c readelf.c print.c
33+	fsmagic.c funcs.c apptype.c der.c
34+	cdf.c cdf_time.c readcdf.c
35+
36+	fmtcheck.c
37+)]])
38+
39+exe('file', {'src/file.c', 'src/seccomp.c', 'libmagic.a', '$builddir/pkg/zlib/libz.a'})
40+file('bin/file', '755', '$outdir/file')
41+man{'$outdir/file.1'}
42+
43+sub('host.ninja', function()
44+	toolchain(config.host)
45+	cflags{
46+		'-I $outdir/include',
47+		'-D HAVE_STDINT_H',
48+		'-D HAVE_INTTYPES_H',
49+		'-D HAVE_UNISTD_H',
50+		'-D COMPILE_ONLY',
51+		([[-D 'VERSION="%s"']]):format(version),
52+	}
53+	set('outdir', '$outdir/host')
54+	exe('magic', 'src/(magic.c apprentice.c encoding.c print.c funcs.c cdf_time.c strlcpy.c)')
55+end)
56+
57+rule('magic', 'cd $outdir && ./host/magic magic')
58+build('magic', '$outdir/magic.mgc', {'|',
59+	'$outdir/host/magic',
60+	copy('$outdir/magic', '$srcdir/magic/Magdir', lines('magic.txt')),
61+	copy('$outdir/magic', '$srcdir/magic', {'Header', 'Localstuff'}),
62+})
63+file('share/file/magic.mgc', '644', '$outdir/magic.mgc')
64+
65+fetch 'git'
+334, -0
  1@@ -0,0 +1,334 @@
  2+# 2,<cd src/magic/Magdir && printf '%s\n' *
  3+acorn
  4+adi
  5+adventure
  6+aes
  7+algol68
  8+allegro
  9+alliant
 10+amanda
 11+amigaos
 12+android
 13+animation
 14+aout
 15+apache
 16+apl
 17+apple
 18+application
 19+applix
 20+apt
 21+archive
 22+aria
 23+arm
 24+asf
 25+assembler
 26+asterix
 27+att3b
 28+audio
 29+avm
 30+basis
 31+beetle
 32+ber
 33+bflt
 34+bhl
 35+bioinformatics
 36+biosig
 37+blackberry
 38+blcr
 39+blender
 40+blit
 41+bm
 42+bout
 43+bsdi
 44+bsi
 45+btsnoop
 46+bytecode
 47+c-lang
 48+c64
 49+cad
 50+cafebabe
 51+cbor
 52+ccf
 53+cddb
 54+chord
 55+cisco
 56+citrus
 57+clarion
 58+claris
 59+clipper
 60+clojure
 61+coff
 62+commands
 63+communications
 64+compress
 65+console
 66+convex
 67+coverage
 68+cracklib
 69+crypto
 70+ctags
 71+ctf
 72+cubemap
 73+cups
 74+dact
 75+database
 76+dataone
 77+dbpf
 78+der
 79+diamond
 80+dif
 81+diff
 82+digital
 83+dolby
 84+dsf
 85+dump
 86+dyadic
 87+ebml
 88+edid
 89+editors
 90+efi
 91+elf
 92+encore
 93+epoc
 94+erlang
 95+espressif
 96+esri
 97+etf
 98+fcs
 99+filesystems
100+finger
101+flash
102+flif
103+fonts
104+forth
105+fortran
106+frame
107+freebsd
108+fsav
109+fusecompress
110+games
111+gcc
112+gconv
113+geo
114+geos
115+gimp
116+git
117+glibc
118+gnome
119+gnu
120+gnumeric
121+gpt
122+gpu
123+grace
124+graphviz
125+gringotts
126+hardware
127+hitachi-sh
128+hp
129+human68k
130+ibm370
131+ibm6000
132+icc
133+iff
134+images
135+inform
136+intel
137+interleaf
138+island
139+ispell
140+isz
141+java
142+javascript
143+jpeg
144+karma
145+kde
146+keepass
147+kerberos
148+kicad
149+kml
150+lammps
151+lecter
152+lex
153+lif
154+linux
155+lisp
156+llvm
157+locoscript
158+lua
159+luks
160+m4
161+mach
162+macintosh
163+macos
164+magic
165+mail.news
166+make
167+map
168+maple
169+marc21
170+mathcad
171+mathematica
172+matroska
173+mcrypt
174+measure
175+mercurial
176+metastore
177+meteorological
178+microfocus
179+mime
180+mips
181+mirage
182+misctools
183+mkid
184+mlssa
185+mmdf
186+modem
187+modulefile
188+motorola
189+mozilla
190+msdos
191+msooxml
192+msvc
193+msx
194+mup
195+music
196+nasa
197+natinst
198+ncr
199+netbsd
200+netscape
201+netware
202+news
203+nifty
204+nim-lang
205+nitpicker
206+numpy
207+oasis
208+ocaml
209+octave
210+ole2compounddocs
211+olf
212+openfst
213+opentimestamps
214+oric
215+os2
216+os400
217+os9
218+osf1
219+palm
220+parix
221+parrot
222+pascal
223+pbf
224+pbm
225+pc88
226+pc98
227+pci_ids
228+pcjr
229+pdf
230+pdp
231+perl
232+pgf
233+pgp
234+pgp-binary-keys
235+pkgadd
236+plan9
237+plus5
238+pmem
239+polyml
240+printer
241+project
242+psdbms
243+psl
244+pulsar
245+puzzle
246+pwsafe
247+pyramid
248+python
249+qt
250+revision
251+riff
252+rpi
253+rpm
254+rpmsg
255+rst
256+rtf
257+ruby
258+sc
259+sccs
260+scientific
261+securitycerts
262+selinux
263+sendmail
264+sequent
265+sereal
266+sgi
267+sgml
268+sharc
269+sinclair
270+sisu
271+sketch
272+smalltalk
273+smile
274+sniffer
275+softquad
276+sosi
277+spec
278+spectrum
279+sql
280+ssh
281+ssl
282+statistics
283+sun
284+sylk
285+symbos
286+sysex
287+tcl
288+teapot
289+terminfo
290+tex
291+tgif
292+ti-8x
293+timezone
294+tplink
295+troff
296+tuxedo
297+typeset
298+uf2
299+unicode
300+unisig
301+unknown
302+usd
303+uterus
304+uuencode
305+vacuum-cleaner
306+varied.out
307+varied.script
308+vax
309+vicar
310+virtual
311+virtutech
312+visx
313+vms
314+vmware
315+vorbis
316+vxl
317+warc
318+weak
319+web
320+webassembly
321+windows
322+wireless
323+wordprocessors
324+wsdl
325+x68000
326+xdelta
327+xenix
328+xilinx
329+xo65
330+xwindows
331+yara
332+zfs
333+zilog
334+zip
335+zyxel
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit a42b38690579de23403e0aff9b7b2f9cdf55f534
+1, -0
1@@ -0,0 +1 @@
2+5.42 r0
+2, -0
1@@ -0,0 +1,2 @@
2+/flex-2.6.4.tar.gz
3+/src
+83, -0
 1@@ -0,0 +1,83 @@
 2+/* #undef CRAY_STACKSEG_END */
 3+/* #undef C_ALLOCA */
 4+/* #undef ENABLE_NLS */
 5+#define HAVE_ALLOCA 1
 6+#define HAVE_ALLOCA_H 1
 7+/* #undef HAVE_AVAILABLE_ */
 8+/* #undef HAVE_BY */
 9+/* #undef HAVE_CFLOCALECOPYCURRENT */
10+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
11+/* #undef HAVE_DCGETTEXT */
12+#define HAVE_DLFCN_H 1
13+/* #undef HAVE_DNL */
14+#define HAVE_DUP2 1
15+/* #undef HAVE_ENABLED */
16+#define HAVE_FORK 1
17+/* #undef HAVE_FUNCTION_ */
18+/* #undef HAVE_GETTEXT */
19+/* #undef HAVE_HAVE */
20+/* #undef HAVE_ICONV */
21+/* #undef HAVE_IF */
22+#define HAVE_INTTYPES_H 1
23+/* #undef HAVE_IS */
24+#define HAVE_LIBINTL_H 1
25+#define HAVE_LIBM 1
26+#define HAVE_LIMITS_H 1
27+#define HAVE_LOCALE_H 1
28+#define HAVE_MALLOC 1
29+#define HAVE_MALLOC_H 1
30+#define HAVE_MEMORY_H 1
31+#define HAVE_MEMSET 1
32+/* #undef HAVE_NEEDED */
33+#define HAVE_NETINET_IN_H 1
34+/* #undef HAVE_NLS */
35+/* #undef HAVE_NOT */
36+/* #undef HAVE_ONLY */
37+/* #undef HAVE_OPENBSD */
38+#define HAVE_POW 1
39+#define HAVE_PTHREAD_H 1
40+#define HAVE_REALLOC 1
41+/* #undef HAVE_REALLOCARRAY */
42+#define HAVE_REGCOMP 1
43+#define HAVE_REGEX_H 1
44+/* #undef HAVE_REPLACEMENT */
45+#define HAVE_SETLOCALE 1
46+#define HAVE_STDBOOL_H 1
47+#define HAVE_STDINT_H 1
48+#define HAVE_STDLIB_H 1
49+#define HAVE_STRCASECMP 1
50+#define HAVE_STRCHR 1
51+#define HAVE_STRDUP 1
52+#define HAVE_STRINGS_H 1
53+#define HAVE_STRING_H 1
54+#define HAVE_STRTOL 1
55+#define HAVE_SYS_STAT_H 1
56+#define HAVE_SYS_TYPES_H 1
57+#define HAVE_SYS_WAIT_H 1
58+#define HAVE_UNISTD_H 1
59+/* #undef HAVE_USED */
60+#define HAVE_VFORK 1
61+/* #undef HAVE_VFORK_H */
62+/* #undef HAVE_WE */
63+#define HAVE_WORKING_FORK 1
64+#define HAVE_WORKING_VFORK 1
65+#define HAVE__BOOL 1
66+#define LT_OBJDIR ".libs/"
67+#define M4 "/bin/m4"
68+#define PACKAGE "flex"
69+#define PACKAGE_BUGREPORT "flex-help@lists.sourceforge.net"
70+#define PACKAGE_NAME "the fast lexical analyser generator"
71+#define PACKAGE_STRING "the fast lexical analyser generator 2.6.4"
72+#define PACKAGE_TARNAME "flex"
73+#define PACKAGE_URL ""
74+#define PACKAGE_VERSION "2.6.4"
75+/* #undef STACK_DIRECTION */
76+#define STDC_HEADERS 1
77+#define VERSION "2.6.4"
78+/* #undef YYTEXT_POINTER */
79+/* #undef const */
80+/* #undef malloc */
81+/* #undef pid_t */
82+/* #undef realloc */
83+/* #undef size_t */
84+/* #undef vfork */
+33, -0
 1@@ -0,0 +1,33 @@
 2+cflags{
 3+	'-D HAVE_CONFIG_H',
 4+	'-I $dir',
 5+}
 6+
 7+exe('flex', [[src/(
 8+	buf.c
 9+	ccl.c
10+	dfa.c
11+	ecs.c
12+	filter.c
13+	gen.c
14+	main.c
15+	misc.c
16+	nfa.c
17+	options.c
18+	parse.c
19+	regex.c
20+	scan.c
21+	scanflags.c
22+	scanopt.c
23+	skel.c
24+	sym.c
25+	tables.c
26+	tables_shared.c
27+	tblcmp.c
28+	yylex.c
29+)]])
30+file('bin/flex', '755', '$outdir/flex')
31+sym('bin/lex', 'flex')
32+man{'doc/flex.1'}
33+
34+fetch 'curl'
+1, -0
1@@ -0,0 +1 @@
2+e87aae032bf07c26f85ac0ed3250998c37621d95f8bd748b31f15b33c45ee995  flex-2.6.4.tar.gz
+1, -0
1@@ -0,0 +1 @@
2+url = "https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+2.6.4 r0
+1, -0
1@@ -0,0 +1 @@
2+/host.ninja
+28, -0
 1@@ -0,0 +1,28 @@
 2+cflags{
 3+	'-std=c99', '-Wall', '-Wpedantic', '-Wno-maybe-uninitialized',
 4+	'-isystem $builddir/pkg/b3sum/include',
 5+}
 6+
 7+sub('host.ninja', function()
 8+	set('outdir', '$outdir/host')
 9+	toolchain(config.host)
10+	cflags{'-isystem $builddir/pkg/b3sum/include'}
11+
12+	lib('libcommon.a', {'fatal.c', 'parse.c', 'reallocarray.c'})
13+	exe('fspec-hash', {'fspec-hash.c', 'libcommon.a', '$builddir/pkg/b3sum/host/libblake3.a'}, {'pkg/b3sum/headers'})
14+	exe('fspec-sort', {'fspec-sort.c', 'libcommon.a'})
15+	exe('fspec-tar', {'fspec-tar.c', 'libcommon.a'})
16+end)
17+
18+lib('libcommon.a', {'fatal.c', 'parse.c', 'reallocarray.c'})
19+
20+exe('fspec-hash', {'fspec-hash.c', 'libcommon.a', '$builddir/pkg/b3sum/libblake3.a'}, {'pkg/b3sum/headers'})
21+file('bin/fspec-hash', '755', '$outdir/fspec-hash')
22+
23+exe('fspec-sort', {'fspec-sort.c', 'libcommon.a'})
24+file('bin/fspec-sort', '755', '$outdir/fspec-sort')
25+
26+exe('fspec-tar', {'fspec-tar.c', 'libcommon.a'})
27+file('bin/fspec-tar', '755', '$outdir/fspec-tar')
28+
29+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit a79592936c865e001ac3003dddc5f60f0bada97e
+1, -0
1@@ -0,0 +1 @@
2+a79592936c r0
+52, -0
 1@@ -0,0 +1,52 @@
 2+subgen 'awk'
 3+subgen 'b3sum'
 4+subgen 'bc'
 5+subgen 'bearssl'
 6+subgen 'binutils'
 7+subgen 'byacc'
 8+subgen 'bzip2'
 9+subgen 'cacert'
10+subgen 'catgirl'
11+subgen 'curl'
12+subgen 'dosfstools'
13+subgen 'e2fsprogs'
14+subgen 'elftoolchain'
15+subgen 'file'
16+subgen 'flex'
17+subgen 'fspec-sync'
18+subgen 'git'
19+subgen 'iproute2'
20+subgen 'less'
21+subgen 'libcbor'
22+subgen 'libevent'
23+subgen 'libfido2'
24+subgen 'libnl'
25+subgen 'libtermkey'
26+subgen 'libtls-bearssl'
27+subgen 'libutp'
28+subgen 'linux-headers'
29+subgen 'lpeg'
30+subgen 'lua'
31+subgen 'make'
32+subgen 'man-pages-posix'
33+subgen 'mandoc'
34+subgen 'musl'
35+subgen 'netbsd-curses'
36+subgen 'oksh'
37+subgen 'openbsd'
38+subgen 'openssh'
39+subgen 'pigz'
40+subgen 'rc'
41+subgen 'samurai'
42+subgen 'sbase'
43+subgen 'sdhcp'
44+subgen 'skeleton'
45+subgen 'strace'
46+subgen 'transmission'
47+subgen 'tz'
48+subgen 'ubase'
49+subgen 'util-linux'
50+subgen 'vis'
51+subgen 'wpa_supplicant'
52+subgen 'xz'
53+subgen 'zlib'
+3, -0
1@@ -0,0 +1,3 @@
2+/git-manpages-2.42.0.tar.gz
3+/man
4+/man.ninja
+197, -0
  1@@ -0,0 +1,197 @@
  2+# 2,<cd src/Documentation && printf '%s\n' git*.txt
  3+git-add.txt
  4+git-am.txt
  5+git-annotate.txt
  6+git-apply.txt
  7+git-archimport.txt
  8+git-archive.txt
  9+git-bisect-lk2009.txt
 10+git-bisect.txt
 11+git-blame.txt
 12+git-branch.txt
 13+git-bugreport.txt
 14+git-bundle.txt
 15+git-cat-file.txt
 16+git-check-attr.txt
 17+git-check-ignore.txt
 18+git-check-mailmap.txt
 19+git-check-ref-format.txt
 20+git-checkout-index.txt
 21+git-checkout.txt
 22+git-cherry-pick.txt
 23+git-cherry.txt
 24+git-citool.txt
 25+git-clean.txt
 26+git-clone.txt
 27+git-column.txt
 28+git-commit-graph.txt
 29+git-commit-tree.txt
 30+git-commit.txt
 31+git-config.txt
 32+git-count-objects.txt
 33+git-credential-cache--daemon.txt
 34+git-credential-cache.txt
 35+git-credential-store.txt
 36+git-credential.txt
 37+git-cvsexportcommit.txt
 38+git-cvsimport.txt
 39+git-cvsserver.txt
 40+git-daemon.txt
 41+git-describe.txt
 42+git-diagnose.txt
 43+git-diff-files.txt
 44+git-diff-index.txt
 45+git-diff-tree.txt
 46+git-diff.txt
 47+git-difftool.txt
 48+git-fast-export.txt
 49+git-fast-import.txt
 50+git-fetch-pack.txt
 51+git-fetch.txt
 52+git-filter-branch.txt
 53+git-fmt-merge-msg.txt
 54+git-for-each-ref.txt
 55+git-for-each-repo.txt
 56+git-format-patch.txt
 57+git-fsck-objects.txt
 58+git-fsck.txt
 59+git-fsmonitor--daemon.txt
 60+git-gc.txt
 61+git-get-tar-commit-id.txt
 62+git-grep.txt
 63+git-gui.txt
 64+git-hash-object.txt
 65+git-help.txt
 66+git-hook.txt
 67+git-http-backend.txt
 68+git-http-fetch.txt
 69+git-http-push.txt
 70+git-imap-send.txt
 71+git-index-pack.txt
 72+git-init-db.txt
 73+git-init.txt
 74+git-instaweb.txt
 75+git-interpret-trailers.txt
 76+git-log.txt
 77+git-ls-files.txt
 78+git-ls-remote.txt
 79+git-ls-tree.txt
 80+git-mailinfo.txt
 81+git-mailsplit.txt
 82+git-maintenance.txt
 83+git-merge-base.txt
 84+git-merge-file.txt
 85+git-merge-index.txt
 86+git-merge-one-file.txt
 87+git-merge-tree.txt
 88+git-merge.txt
 89+git-mergetool--lib.txt
 90+git-mergetool.txt
 91+git-mktag.txt
 92+git-mktree.txt
 93+git-multi-pack-index.txt
 94+git-mv.txt
 95+git-name-rev.txt
 96+git-notes.txt
 97+git-p4.txt
 98+git-pack-objects.txt
 99+git-pack-redundant.txt
100+git-pack-refs.txt
101+git-patch-id.txt
102+git-prune-packed.txt
103+git-prune.txt
104+git-pull.txt
105+git-push.txt
106+git-quiltimport.txt
107+git-range-diff.txt
108+git-read-tree.txt
109+git-rebase.txt
110+git-receive-pack.txt
111+git-reflog.txt
112+git-remote-ext.txt
113+git-remote-fd.txt
114+git-remote.txt
115+git-repack.txt
116+git-replace.txt
117+git-request-pull.txt
118+git-rerere.txt
119+git-reset.txt
120+git-restore.txt
121+git-rev-list.txt
122+git-rev-parse.txt
123+git-revert.txt
124+git-rm.txt
125+git-send-email.txt
126+git-send-pack.txt
127+git-sh-i18n--envsubst.txt
128+git-sh-i18n.txt
129+git-sh-setup.txt
130+git-shell.txt
131+git-shortlog.txt
132+git-show-branch.txt
133+git-show-index.txt
134+git-show-ref.txt
135+git-show.txt
136+git-sparse-checkout.txt
137+git-stage.txt
138+git-stash.txt
139+git-status.txt
140+git-stripspace.txt
141+git-submodule.txt
142+git-svn.txt
143+git-switch.txt
144+git-symbolic-ref.txt
145+git-tag.txt
146+git-tools.txt
147+git-unpack-file.txt
148+git-unpack-objects.txt
149+git-update-index.txt
150+git-update-ref.txt
151+git-update-server-info.txt
152+git-upload-archive.txt
153+git-upload-pack.txt
154+git-var.txt
155+git-verify-commit.txt
156+git-verify-pack.txt
157+git-verify-tag.txt
158+git-version.txt
159+git-web--browse.txt
160+git-whatchanged.txt
161+git-worktree.txt
162+git-write-tree.txt
163+git.txt
164+gitattributes.txt
165+gitcli.txt
166+gitcore-tutorial.txt
167+gitcredentials.txt
168+gitcvs-migration.txt
169+gitdiffcore.txt
170+giteveryday.txt
171+gitfaq.txt
172+gitformat-bundle.txt
173+gitformat-chunk.txt
174+gitformat-commit-graph.txt
175+gitformat-index.txt
176+gitformat-pack.txt
177+gitformat-signature.txt
178+gitglossary.txt
179+githooks.txt
180+gitignore.txt
181+gitk.txt
182+gitmailmap.txt
183+gitmodules.txt
184+gitnamespaces.txt
185+gitprotocol-capabilities.txt
186+gitprotocol-common.txt
187+gitprotocol-http.txt
188+gitprotocol-pack.txt
189+gitprotocol-v2.txt
190+gitremote-helpers.txt
191+gitrepository-layout.txt
192+gitrevisions.txt
193+gitsubmodules.txt
194+gittutorial-2.txt
195+gittutorial.txt
196+gitweb.conf.txt
197+gitweb.txt
198+gitworkflows.txt
+36, -0
 1@@ -0,0 +1,36 @@
 2+#define DEFAULT_EDITOR "ed"
 3+#define DEFAULT_GIT_TEMPLATE_DIR "share/git-core/templates"
 4+#define DEFAULT_PAGER ""
 5+#define ETC_GITATTRIBUTES "/etc/gitattributes"
 6+#define ETC_GITCONFIG "/etc/gitconfig"
 7+#define GIT_BUILT_FROM_COMMIT "43c8a30d150ecede9709c1f2527c8fba92c65f40"
 8+#define GIT_EXEC_PATH "libexec/git-core"
 9+#define GIT_HOST_CPU "unknown"
10+#define GIT_HTML_PATH "share/doc/git-doc"
11+#define GIT_INFO_PATH "share/info"
12+#define GIT_LOCALE_PATH "/share/locale"
13+#define GIT_MAN_PATH "share/man"
14+#define GIT_USER_AGENT "git/" GIT_VERSION
15+#define GIT_VERSION "2.42.0"
16+#define HAVE_ALLOCA_H
17+#define HAVE_PATHS_H
18+#define HAVE_DEV_TTY
19+#define HAVE_CLOCK_GETTIME
20+#define HAVE_CLOCK_MONOTONIC
21+#define HAVE_SYNC_FILE_RANGE
22+#define HAVE_GETRANDOM
23+#define HAVE_GETDELIM
24+#define NO_GETTEXT
25+#define NO_OPENSSL
26+#define NO_SYS_POLL_H
27+#define SUPPORTS_SIMPLE_IPC
28+#define PAGER_ENV "LESS=FRX LV=-c"
29+#define USE_CURL_FOR_IMAP_SEND
30+
31+#define SHA1_DC
32+#define SHA1DC_NO_STANDARD_INCLUDES
33+#define SHA1DC_INIT_SAFE_HASH_DEFAULT 0
34+#define SHA1DC_CUSTOM_INCLUDE_SHA1_C "git-compat-util.h"
35+#define SHA1DC_CUSTOM_INCLUDE_UBC_CHECK_C "git-compat-util.h"
36+
37+#define SHA256_BLK
+92, -0
 1@@ -0,0 +1,92 @@
 2+# 2,<cd src/Documentation && printf '%s\n' *config.txt config/*.txt
 3+config.txt
 4+git-config.txt
 5+config/add.txt
 6+config/advice.txt
 7+config/alias.txt
 8+config/am.txt
 9+config/apply.txt
10+config/blame.txt
11+config/branch.txt
12+config/browser.txt
13+config/bundle.txt
14+config/checkout.txt
15+config/clean.txt
16+config/clone.txt
17+config/color.txt
18+config/column.txt
19+config/commit.txt
20+config/commitgraph.txt
21+config/completion.txt
22+config/core.txt
23+config/credential.txt
24+config/diff.txt
25+config/difftool.txt
26+config/extensions.txt
27+config/fastimport.txt
28+config/feature.txt
29+config/fetch.txt
30+config/filter.txt
31+config/fmt-merge-msg.txt
32+config/format.txt
33+config/fsck.txt
34+config/fsmonitor--daemon.txt
35+config/gc.txt
36+config/gitcvs.txt
37+config/gitweb.txt
38+config/gpg.txt
39+config/grep.txt
40+config/gui.txt
41+config/guitool.txt
42+config/help.txt
43+config/http.txt
44+config/i18n.txt
45+config/imap.txt
46+config/includeif.txt
47+config/index.txt
48+config/init.txt
49+config/instaweb.txt
50+config/interactive.txt
51+config/log.txt
52+config/lsrefs.txt
53+config/mailinfo.txt
54+config/mailmap.txt
55+config/maintenance.txt
56+config/man.txt
57+config/merge.txt
58+config/mergetool.txt
59+config/notes.txt
60+config/pack.txt
61+config/pager.txt
62+config/pretty.txt
63+config/protocol.txt
64+config/pull.txt
65+config/push.txt
66+config/rebase.txt
67+config/receive.txt
68+config/remote.txt
69+config/remotes.txt
70+config/repack.txt
71+config/rerere.txt
72+config/revert.txt
73+config/safe.txt
74+config/sendemail.txt
75+config/sequencer.txt
76+config/showbranch.txt
77+config/sparse.txt
78+config/splitindex.txt
79+config/ssh.txt
80+config/stash.txt
81+config/status.txt
82+config/submodule.txt
83+config/tag.txt
84+config/tar.txt
85+config/trace2.txt
86+config/transfer.txt
87+config/uploadarchive.txt
88+config/uploadpack.txt
89+config/url.txt
90+config/user.txt
91+config/versionsort.txt
92+config/web.txt
93+config/worktree.txt
+18, -0
 1@@ -0,0 +1,18 @@
 2+set -e
 3+
 4+sh scripts/fetch-git.sh "$@"
 5+
 6+cd "$1"
 7+shift
 8+
 9+if [ -e src/man ] ; then
10+	rm -rf src/man
11+fi
12+
13+if ! sh "$OLDPWD/scripts/checksum.sh" -c sha256 2>/dev/null ; then
14+	curl -L -O -K url
15+	sh "$OLDPWD/scripts/checksum.sh" -c sha256
16+fi
17+
18+read -r _ archive <sha256
19+sh "$OLDPWD/scripts/extract.sh" "$archive" -s ',^\.,src/man,'
+501, -0
  1@@ -0,0 +1,501 @@
  2+cflags{
  3+	'-include $dir/config.h',
  4+	'-I $srcdir',
  5+	'-I $srcdir/compat/regex',
  6+	'-I $outdir',
  7+	'-isystem $builddir/pkg/curl/include',
  8+	'-isystem $builddir/pkg/zlib/include',
  9+}
 10+
 11+pkg.deps = {
 12+	'$outdir/command-list.h',
 13+	'$outdir/config-list.h',
 14+	'$outdir/hook-list.h',
 15+	'pkg/curl/headers',
 16+	'pkg/zlib/headers',
 17+}
 18+
 19+rule('cmdlist', 'cd $srcdir && ./generate-cmdlist.sh $$OLDPWD/$in >$$OLDPWD/$out')
 20+build('cmdlist', '$outdir/command-list.h', {
 21+	'$srcdir/command-list.txt',
 22+	'|', '$srcdir/generate-cmdlist.sh', expand{'$srcdir/Documentation/', lines('commands.txt')},
 23+})
 24+
 25+rule('configlist', 'cd $srcdir && ./generate-configlist.sh >$$OLDPWD/$out')
 26+build('configlist', '$outdir/config-list.h', {
 27+	'|', '$srcdir/generate-configlist.sh', expand{'$srcdir/Documentation/', lines('configs.txt')},
 28+})
 29+
 30+rule('hooklist', 'cd $srcdir && ./generate-hooklist.sh >$$OLDPWD/$out')
 31+build('hooklist', '$outdir/hook-list.h', {
 32+	'|', '$srcdir/generate-hooklist.sh', '$srcdir/Documentation/githooks.txt'
 33+})
 34+
 35+cc('exec-cmd.c', nil, {cflags=string.format([[$cflags '-DFALLBACK_RUNTIME_PREFIX="%s"']], config.prefix)})
 36+cc('common-main.c')
 37+cc('http.c')
 38+cc('compat/regex/regex.c', nil, {cflags='$cflags -DGAWK -DNO_MBSUPPORT'})
 39+
 40+-- src/Makefile:/^LIB_OBJS.\+=
 41+lib('libgit.a', [[
 42+	abspath.c
 43+	add-interactive.c
 44+	add-patch.c
 45+	advice.c
 46+	alias.c
 47+	alloc.c
 48+	apply.c
 49+	archive-tar.c
 50+	archive-zip.c
 51+	archive.c
 52+	attr.c
 53+	base85.c
 54+	bisect.c
 55+	blame.c
 56+	blob.c
 57+	bloom.c
 58+	branch.c
 59+	bulk-checkin.c
 60+	bundle-uri.c
 61+	bundle.c
 62+	cache-tree.c
 63+	cbtree.c
 64+	chdir-notify.c
 65+	checkout.c
 66+	chunk-format.c
 67+	color.c
 68+	column.c
 69+	combine-diff.c
 70+	commit-graph.c
 71+	commit-reach.c
 72+	commit.c
 73+	compat/nonblock.c
 74+	compat/obstack.c
 75+	compat/qsort_s.c
 76+	compat/regex/regex.c.o
 77+	compat/terminal.c
 78+	compat/zlib-uncompress2.c
 79+	config.c
 80+	connect.c
 81+	connected.c
 82+	convert.c
 83+	copy.c
 84+	credential.c
 85+	csum-file.c
 86+	ctype.c
 87+	date.c
 88+	decorate.c
 89+	delta-islands.c
 90+	diagnose.c
 91+	diff-delta.c
 92+	diff-merges.c
 93+	diff-lib.c
 94+	diff-no-index.c
 95+	diff.c
 96+	diffcore-break.c
 97+	diffcore-delta.c
 98+	diffcore-order.c
 99+	diffcore-pickaxe.c
100+	diffcore-rename.c
101+	diffcore-rotate.c
102+	dir-iterator.c
103+	dir.c
104+	editor.c
105+	entry.c
106+	environment.c
107+	ewah/bitmap.c
108+	ewah/ewah_bitmap.c
109+	ewah/ewah_io.c
110+	ewah/ewah_rlw.c
111+	exec-cmd.c.o
112+	fetch-negotiator.c
113+	fetch-pack.c
114+	fmt-merge-msg.c
115+	fsck.c
116+	fsmonitor.c
117+	fsmonitor-ipc.c
118+	fsmonitor-settings.c
119+	gettext.c
120+	git-zlib.c
121+	gpg-interface.c
122+	graph.c
123+	grep.c
124+	hash-lookup.c
125+	hashmap.c
126+	help.c
127+	hex.c
128+	hook.c
129+	ident.c
130+	json-writer.c
131+	kwset.c
132+	levenshtein.c
133+	line-log.c
134+	line-range.c
135+	linear-assignment.c
136+	list-objects-filter-options.c
137+	list-objects-filter.c
138+	list-objects.c
139+	lockfile.c
140+	log-tree.c
141+	ls-refs.c
142+	mailinfo.c
143+	mailmap.c
144+	match-trees.c
145+	mem-pool.c
146+	merge-blobs.c
147+	merge-ll.c
148+	merge-ort.c
149+	merge-ort-wrappers.c
150+	merge-recursive.c
151+	merge.c
152+	midx.c
153+	name-hash.c
154+	negotiator/default.c
155+	negotiator/noop.c
156+	negotiator/skipping.c
157+	notes-cache.c
158+	notes-merge.c
159+	notes-utils.c
160+	notes.c
161+	object-file.c
162+	object-name.c
163+	object.c
164+	oid-array.c
165+	oidmap.c
166+	oidset.c
167+	oidtree.c
168+	pack-bitmap-write.c
169+	pack-bitmap.c
170+	pack-check.c
171+	pack-mtimes.c
172+	pack-objects.c
173+	pack-revindex.c
174+	pack-write.c
175+	packfile.c
176+	pager.c
177+	parallel-checkout.c
178+	parse-options-cb.c
179+	parse-options.c
180+	patch-delta.c
181+	patch-ids.c
182+	path.c
183+	pathspec.c
184+	pkt-line.c
185+	preload-index.c
186+	pretty.c
187+	prio-queue.c
188+	progress.c
189+	promisor-remote.c
190+	prompt.c
191+	protocol.c
192+	protocol-caps.c
193+	prune-packed.c
194+	quote.c
195+	range-diff.c
196+	reachable.c
197+	read-cache.c
198+	rebase-interactive.c
199+	rebase.c
200+	ref-filter.c
201+	reflog-walk.c
202+	reflog.c
203+	refs.c
204+	refs/debug.c
205+	refs/files-backend.c
206+	refs/iterator.c
207+	refs/packed-backend.c
208+	refs/ref-cache.c
209+	refspec.c
210+	remote.c
211+	replace-object.c
212+	repo-settings.c
213+	repository.c
214+	rerere.c
215+	reset.c
216+	resolve-undo.c
217+	revision.c
218+	run-command.c
219+	send-pack.c
220+	sequencer.c
221+	serve.c
222+	server-info.c
223+	setup.c
224+	shallow.c
225+	sideband.c
226+	sigchain.c
227+	sparse-index.c
228+	split-index.c
229+	stable-qsort.c
230+	statinfo.c
231+	strbuf.c
232+	streaming.c
233+	string-list.c
234+	strmap.c
235+	strvec.c
236+	sub-process.c
237+	submodule-config.c
238+	submodule.c
239+	symlinks.c
240+	tag.c
241+	tempfile.c
242+	thread-utils.c
243+	tmp-objdir.c
244+	trace.c
245+	trace2.c
246+	trace2/(
247+		tr2_cfg.c
248+		tr2_cmd_name.c
249+		tr2_ctr.c
250+		tr2_dst.c
251+		tr2_sid.c
252+		tr2_sysenv.c
253+		tr2_tbuf.c
254+		tr2_tgt_event.c
255+		tr2_tgt_normal.c
256+		tr2_tgt_perf.c
257+		tr2_tls.c
258+		tr2_tmr.c
259+	)
260+	trailer.c
261+	transport-helper.c
262+	transport.c
263+	tree-diff.c
264+	tree-walk.c
265+	tree.c
266+	unpack-trees.c
267+	upload-pack.c
268+	url.c
269+	urlmatch.c
270+	usage.c
271+	userdiff.c
272+	utf8.c
273+	varint.c
274+	version.c
275+	versioncmp.c
276+	walker.c
277+	wildmatch.c
278+	worktree.c
279+	wrapper.c
280+	write-or-die.c
281+	ws.c
282+	wt-status.c
283+	xdiff-interface.c
284+
285+	unix-socket.c
286+	unix-stream-server.c
287+
288+	compat/simple-ipc/(ipc-shared.c ipc-unix-socket.c)
289+
290+	sha1dc_git.c
291+	sha1dc/sha1.c
292+	sha1dc/ubc_check.c
293+
294+	sha256/block/sha256.c
295+
296+	compat/linux/procinfo.c
297+
298+	libxdiff.a
299+	$builddir/pkg/zlib/libz.a
300+]])
301+
302+-- src/Makefile:/^XDIFF_OBJS.\+=
303+lib('libxdiff.a', [[xdiff/(
304+	xdiffi.c
305+	xemit.c
306+	xhistogram.c
307+	xmerge.c
308+	xpatience.c
309+	xprepare.c
310+	xutils.c
311+)]])
312+
313+-- src/Makefile:/^BUILTIN_OBJS.\+=
314+local builtins = {
315+	'add',
316+	'am',
317+	'annotate',
318+	'apply',
319+	'archive',
320+	'bisect',
321+	'blame',
322+	'branch',
323+	'bugreport',
324+	'bundle',
325+	'cat-file',
326+	'check-attr',
327+	'check-ignore',
328+	'check-mailmap',
329+	'check-ref-format',
330+	'checkout--worker',
331+	'checkout-index',
332+	'checkout',
333+	'clean',
334+	'clone',
335+	'column',
336+	'commit-graph',
337+	'commit-tree',
338+	'commit',
339+	'config',
340+	'count-objects',
341+	'credential-cache--daemon',
342+	'credential-cache',
343+	'credential-store',
344+	'credential',
345+	'describe',
346+	'diagnose',
347+	'diff-files',
348+	'diff-index',
349+	'diff-tree',
350+	'diff',
351+	'difftool',
352+	'fast-export',
353+	'fast-import',
354+	'fetch-pack',
355+	'fetch',
356+	'fmt-merge-msg',
357+	'for-each-ref',
358+	'for-each-repo',
359+	'fsck',
360+	'fsmonitor--daemon',
361+	'gc',
362+	'get-tar-commit-id',
363+	'grep',
364+	'hash-object',
365+	'help',
366+	'hook',
367+	'index-pack',
368+	'init-db',
369+	'interpret-trailers',
370+	'log',
371+	'ls-files',
372+	'ls-remote',
373+	'ls-tree',
374+	'mailinfo',
375+	'mailsplit',
376+	'merge-base',
377+	'merge-file',
378+	'merge-index',
379+	'merge-ours',
380+	'merge-recursive',
381+	'merge-tree',
382+	'merge',
383+	'mktag',
384+	'mktree',
385+	'multi-pack-index',
386+	'mv',
387+	'name-rev',
388+	'notes',
389+	'pack-objects',
390+	'pack-redundant',
391+	'pack-refs',
392+	'patch-id',
393+	'prune-packed',
394+	'prune',
395+	'pull',
396+	'push',
397+	'range-diff',
398+	'read-tree',
399+	'rebase',
400+	'receive-pack',
401+	'reflog',
402+	'remote-ext',
403+	'remote-fd',
404+	'remote',
405+	'repack',
406+	'replace',
407+	'rerere',
408+	'reset',
409+	'rev-list',
410+	'rev-parse',
411+	'revert',
412+	'rm',
413+	'send-pack',
414+	'shortlog',
415+	'show-branch',
416+	'show-index',
417+	'show-ref',
418+	'sparse-checkout',
419+	'stash',
420+	'stripspace',
421+	'submodule--helper',
422+	'symbolic-ref',
423+	'tag',
424+	'unpack-file',
425+	'unpack-objects',
426+	'update-index',
427+	'update-ref',
428+	'update-server-info',
429+	'upload-archive',
430+	'upload-pack',
431+	'var',
432+	'verify-commit',
433+	'verify-pack',
434+	'verify-tag',
435+	'worktree',
436+	'write-tree',
437+}
438+exe('git', {'git.c', 'common-main.c.o', expand{'builtin/', builtins, '.c'}, 'libgit.a.d'})
439+file('bin/git', '755', '$outdir/git')
440+
441+local programs = {
442+	-- src/Makefile:/^PROGRAM_OBJS./+=
443+	{'daemon'},
444+	{'http-backend'},
445+	{'imap-send', {'imap-send.c', 'http.c.o', '$builddir/pkg/curl/libcurl.a.d'}},
446+	{'sh-i18n--envsubst'},
447+	{'shell'},
448+
449+	{'remote-http', {'remote-curl.c', 'http.c.o', 'http-walker.c', '$builddir/pkg/curl/libcurl.a.d'}},
450+}
451+
452+for _, prog in ipairs(programs) do
453+	local name, srcs = prog[1], prog[2]
454+	exe('git-'..name, {srcs or name..'.c', 'common-main.c.o', 'libgit.a.d'})
455+	file('libexec/git-core/git-'..name, '755', '$outdir/git-'..name)
456+end
457+
458+for _, remote in ipairs{'https', 'ftp', 'ftps'} do
459+	sym('libexec/git-core/git-remote-'..remote, 'git-remote-http')
460+end
461+
462+local scripts = {
463+	-- src/Makefile:/^SCRIPT_SH.\+=
464+	{'difftool--helper', '755'},
465+	{'filter-branch', '755'},
466+	{'merge-octopus', '755'},
467+	{'merge-one-file', '755'},
468+	{'merge-resolve', '755'},
469+	{'mergetool', '755'},
470+	{'quiltimport', '755'},
471+	{'request-pull', '755'},
472+	{'submodule', '755'},
473+	{'web--browse', '755'},
474+
475+	-- src/Makefile:/^SCRIPT_LIB.\+=
476+	{'mergetool--lib', '644'},
477+	{'sh-i18n', '644'},
478+	{'sh-setup', '644'},
479+}
480+
481+rule('sh_gen', 'sed -f $dir/sh_gen.sed $in >$out')
482+for _, script in ipairs(scripts) do
483+	local name, mode = script[1], script[2]
484+	build('sh_gen', '$outdir/git-'..name, {'$srcdir/git-'..name..'.sh', '|', '$dir/sh_gen.sed'})
485+	file('libexec/git-core/git-'..name, mode, '$outdir/git-'..name)
486+end
487+
488+sym('bin/git-shell', '../libexec/git-core/git-shell')
489+for _, name in ipairs{'git-receive-pack', 'git-upload-archive', 'git-upload-pack'} do
490+	sym('bin/'..name, 'git')
491+end
492+
493+-- templates
494+dir('share/git-core/templates/branches', '755')
495+file('share/git-core/templates/description', '644', '$srcdir/templates/this--description')
496+file('share/git-core/templates/info/exclude', '644', '$srcdir/templates/info--exclude')
497+-- Skip the sample hooks and install an empty directory instead.
498+dir('share/git-core/templates/hooks', '755')
499+
500+man(expand{'man/', lines('man.txt')})
501+
502+fetch 'local'
+196, -0
  1@@ -0,0 +1,196 @@
  2+# 2,<cd src/man && find man* -name '*.[1-9]' | sort
  3+man1/git-add.1
  4+man1/git-am.1
  5+man1/git-annotate.1
  6+man1/git-apply.1
  7+man1/git-archimport.1
  8+man1/git-archive.1
  9+man1/git-bisect.1
 10+man1/git-blame.1
 11+man1/git-branch.1
 12+man1/git-bugreport.1
 13+man1/git-bundle.1
 14+man1/git-cat-file.1
 15+man1/git-check-attr.1
 16+man1/git-check-ignore.1
 17+man1/git-check-mailmap.1
 18+man1/git-check-ref-format.1
 19+man1/git-checkout-index.1
 20+man1/git-checkout.1
 21+man1/git-cherry-pick.1
 22+man1/git-cherry.1
 23+man1/git-citool.1
 24+man1/git-clean.1
 25+man1/git-clone.1
 26+man1/git-column.1
 27+man1/git-commit-graph.1
 28+man1/git-commit-tree.1
 29+man1/git-commit.1
 30+man1/git-config.1
 31+man1/git-count-objects.1
 32+man1/git-credential-cache--daemon.1
 33+man1/git-credential-cache.1
 34+man1/git-credential-store.1
 35+man1/git-credential.1
 36+man1/git-cvsexportcommit.1
 37+man1/git-cvsimport.1
 38+man1/git-cvsserver.1
 39+man1/git-daemon.1
 40+man1/git-describe.1
 41+man1/git-diagnose.1
 42+man1/git-diff-files.1
 43+man1/git-diff-index.1
 44+man1/git-diff-tree.1
 45+man1/git-diff.1
 46+man1/git-difftool.1
 47+man1/git-fast-export.1
 48+man1/git-fast-import.1
 49+man1/git-fetch-pack.1
 50+man1/git-fetch.1
 51+man1/git-filter-branch.1
 52+man1/git-fmt-merge-msg.1
 53+man1/git-for-each-ref.1
 54+man1/git-for-each-repo.1
 55+man1/git-format-patch.1
 56+man1/git-fsck-objects.1
 57+man1/git-fsck.1
 58+man1/git-fsmonitor--daemon.1
 59+man1/git-gc.1
 60+man1/git-get-tar-commit-id.1
 61+man1/git-grep.1
 62+man1/git-gui.1
 63+man1/git-hash-object.1
 64+man1/git-help.1
 65+man1/git-hook.1
 66+man1/git-http-backend.1
 67+man1/git-http-fetch.1
 68+man1/git-http-push.1
 69+man1/git-imap-send.1
 70+man1/git-index-pack.1
 71+man1/git-init-db.1
 72+man1/git-init.1
 73+man1/git-instaweb.1
 74+man1/git-interpret-trailers.1
 75+man1/git-log.1
 76+man1/git-ls-files.1
 77+man1/git-ls-remote.1
 78+man1/git-ls-tree.1
 79+man1/git-mailinfo.1
 80+man1/git-mailsplit.1
 81+man1/git-maintenance.1
 82+man1/git-merge-base.1
 83+man1/git-merge-file.1
 84+man1/git-merge-index.1
 85+man1/git-merge-one-file.1
 86+man1/git-merge-tree.1
 87+man1/git-merge.1
 88+man1/git-mergetool--lib.1
 89+man1/git-mergetool.1
 90+man1/git-mktag.1
 91+man1/git-mktree.1
 92+man1/git-multi-pack-index.1
 93+man1/git-mv.1
 94+man1/git-name-rev.1
 95+man1/git-notes.1
 96+man1/git-p4.1
 97+man1/git-pack-objects.1
 98+man1/git-pack-redundant.1
 99+man1/git-pack-refs.1
100+man1/git-patch-id.1
101+man1/git-prune-packed.1
102+man1/git-prune.1
103+man1/git-pull.1
104+man1/git-push.1
105+man1/git-quiltimport.1
106+man1/git-range-diff.1
107+man1/git-read-tree.1
108+man1/git-rebase.1
109+man1/git-receive-pack.1
110+man1/git-reflog.1
111+man1/git-remote-ext.1
112+man1/git-remote-fd.1
113+man1/git-remote.1
114+man1/git-repack.1
115+man1/git-replace.1
116+man1/git-request-pull.1
117+man1/git-rerere.1
118+man1/git-reset.1
119+man1/git-restore.1
120+man1/git-rev-list.1
121+man1/git-rev-parse.1
122+man1/git-revert.1
123+man1/git-rm.1
124+man1/git-send-email.1
125+man1/git-send-pack.1
126+man1/git-sh-i18n--envsubst.1
127+man1/git-sh-i18n.1
128+man1/git-sh-setup.1
129+man1/git-shell.1
130+man1/git-shortlog.1
131+man1/git-show-branch.1
132+man1/git-show-index.1
133+man1/git-show-ref.1
134+man1/git-show.1
135+man1/git-sparse-checkout.1
136+man1/git-stage.1
137+man1/git-stash.1
138+man1/git-status.1
139+man1/git-stripspace.1
140+man1/git-submodule.1
141+man1/git-svn.1
142+man1/git-switch.1
143+man1/git-symbolic-ref.1
144+man1/git-tag.1
145+man1/git-unpack-file.1
146+man1/git-unpack-objects.1
147+man1/git-update-index.1
148+man1/git-update-ref.1
149+man1/git-update-server-info.1
150+man1/git-upload-archive.1
151+man1/git-upload-pack.1
152+man1/git-var.1
153+man1/git-verify-commit.1
154+man1/git-verify-pack.1
155+man1/git-verify-tag.1
156+man1/git-version.1
157+man1/git-web--browse.1
158+man1/git-whatchanged.1
159+man1/git-worktree.1
160+man1/git-write-tree.1
161+man1/git.1
162+man1/gitk.1
163+man1/gitweb.1
164+man1/scalar.1
165+man5/gitattributes.5
166+man5/gitformat-bundle.5
167+man5/gitformat-chunk.5
168+man5/gitformat-commit-graph.5
169+man5/gitformat-index.5
170+man5/gitformat-pack.5
171+man5/gitformat-signature.5
172+man5/githooks.5
173+man5/gitignore.5
174+man5/gitmailmap.5
175+man5/gitmodules.5
176+man5/gitprotocol-capabilities.5
177+man5/gitprotocol-common.5
178+man5/gitprotocol-http.5
179+man5/gitprotocol-pack.5
180+man5/gitprotocol-v2.5
181+man5/gitrepository-layout.5
182+man5/gitweb.conf.5
183+man7/gitcli.7
184+man7/gitcore-tutorial.7
185+man7/gitcredentials.7
186+man7/gitcvs-migration.7
187+man7/gitdiffcore.7
188+man7/giteveryday.7
189+man7/gitfaq.7
190+man7/gitglossary.7
191+man7/gitnamespaces.7
192+man7/gitremote-helpers.7
193+man7/gitrevisions.7
194+man7/gitsubmodules.7
195+man7/gittutorial-2.7
196+man7/gittutorial.7
197+man7/gitworkflows.7
+84, -0
 1@@ -0,0 +1,84 @@
 2+From 1b87b640fac0fa52de5da8d2c57d038cc0cef5b1 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 16 Mar 2021 17:21:31 -0700
 5+Subject: [PATCH] request-pull: use awk instead of perl to parse ls-remote
 6+ output
 7+
 8+---
 9+ git-request-pull.sh | 48 +++++++++++++++++++++++++++------------------
10+ 1 file changed, 29 insertions(+), 19 deletions(-)
11+
12+diff --git a/git-request-pull.sh b/git-request-pull.sh
13+index 2d0e44656c..0e3cf644e0 100755
14+--- a/git-request-pull.sh
15++++ b/git-request-pull.sh
16+@@ -82,37 +82,47 @@ die "fatal: No commits in common between $base and $head"
17+ # Find a ref with the same name as $head that exists at the remote
18+ # and points to the same commit as the local object.
19+ find_matching_ref='
20+-	my ($head,$headrev) = (@ARGV);
21+-	my $pattern = qr{/\Q$head\E$};
22+-	my ($remote_sha1, $found);
23++	function endswith(s, t) {
24++		n = length(s)
25++		m = length(t)
26++		return m <= n && substr(s, n - m + 1) == t
27++	}
28+ 
29+-	while (<STDIN>) {
30+-		chomp;
31+-		my ($sha1, $ref, $deref) = /^(\S+)\s+([^^]+)(\S*)$/;
32++	{
33++		sha1 = $1
34++		ref = $2
35+ 
36+-		if ($sha1 eq $head) {
37+-			$found = $remote_sha1 = $sha1;
38+-			break;
39++		if (sha1 == head) {
40++			found = remote_sha1 = sha1
41++			exit
42+ 		}
43+ 
44+-		if ($ref eq $head || $ref =~ $pattern) {
45+-			if ($deref eq "") {
46++		deref = index(ref, "^")
47++		if (deref)
48++			ref = substr(ref, 1, deref - 1)
49++
50++		if (ref == head || endswith(ref, "/" head)) {
51++			if (!deref) {
52+ 				# Remember the matching object on the remote side
53+-				$remote_sha1 = $sha1;
54++				remote_sha1 = sha1
55+ 			}
56+-			if ($sha1 eq $headrev) {
57+-				$found = $ref;
58+-				break;
59++			if (sha1 == headrev) {
60++				found = ref
61++				exit
62+ 			}
63+ 		}
64+ 	}
65+-	if ($found) {
66+-		$remote_sha1 = $headrev if ! defined $remote_sha1;
67+-		print "$remote_sha1 $found\n";
68++
69++	END {
70++		if (found) {
71++			if (!remote_sha1)
72++				remote_sha1 = headrev
73++			print remote_sha1 " " found
74++		}
75+ 	}
76+ '
77+ 
78+-set fnord $(git ls-remote "$url" | @@PERL@@ -e "$find_matching_ref" "${remote:-HEAD}" "$headrev")
79++set fnord $(git ls-remote "$url" | awk -v "head=${remote:-HEAD}" -v "headrev=$headrev" "$find_matching_ref")
80+ remote_sha1=$2
81+ ref=$3
82+ 
83+-- 
84+2.34.0
85+
+8, -0
1@@ -0,0 +1,8 @@
2+s|@SHELL_PATH@|/bin/sh|
3+s|@@DIFF@@|diff|
4+s|@@LOCALEDIR@@|/share/locale|g
5+s|@@USE_GETTEXT_SCHEME@@||g
6+/^\# @@BROKEN_PATH_FIX@@$/d
7+s|@@GITWEBDIR@@|/share/gitweb|g
8+s|@@PERL@@|/bin/perl|g
9+s|@@PAGER_ENV@@|LESS=FRX LV=-c|g
+1, -0
1@@ -0,0 +1 @@
2+51643c53d70ce15dde83b6da2bad76ba0c7bbcd4f944d7c378f03a15b9f2e1de  git-manpages-2.42.0.tar.gz
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 43c8a30d150ecede9709c1f2527c8fba92c65f40
+1, -0
1@@ -0,0 +1 @@
2+url = "https://www.kernel.org/pub/software/scm/git/git-manpages-2.42.0.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+2.42.0 r0
+79, -0
 1@@ -0,0 +1,79 @@
 2+cflags{
 3+	'-Wall', '-Wformat=2', '-Wmissing-declarations', '-Wmissing-prototypes',
 4+	'-Wold-style-definition', '-Wstrict-prototypes', '-Wno-maybe-uninitialized',
 5+	'-Wno-format-truncation',
 6+	'-Wno-cpp',  -- we don't have libmnl
 7+	'-D _GNU_SOURCE',
 8+	'-D HAVE_SETNS',
 9+	'-D HAVE_HANDLE_AT',
10+	[[-D 'NETNS_RUN_DIR="/run/netns"']],
11+	'-I $srcdir/include',
12+	'-I $srcdir/include/uapi',
13+	'-I $srcdir/misc',
14+	'-isystem $builddir/pkg/linux-headers/include',
15+}
16+
17+pkg.deps = {
18+	'pkg/linux-headers/headers',
19+}
20+
21+lib('libnetlink.a', [[lib/(
22+	libgenl.c libnetlink.c
23+
24+	utils.c utils_math.c rt_names.c ll_map.c ll_types.c ll_proto.c ll_addr.c
25+	inet_proto.c namespace.c json_writer.c json_print.c json_print_math.c
26+	names.c color.c bpf_legacy.c bpf_glue.c exec.c fs.c cg_map.c
27+	ax25_ntop.c
28+	rose_ntop.c
29+	mpls_ntop.c mpls_pton.c
30+	netrom_ntop.c
31+)]])
32+
33+exe('bin/ip', [[ip/(
34+	ip.c ipaddress.c ipaddrlabel.c iproute.c iprule.c ipnetns.c
35+	rtm_map.c iptunnel.c ip6tunnel.c tunnel.c ipneigh.c ipntable.c iplink.c
36+	ipmaddr.c ipmonitor.c ipmroute.c ipprefix.c iptuntap.c iptoken.c
37+	ipxfrm.c xfrm_state.c xfrm_policy.c xfrm_monitor.c iplink_dummy.c
38+	iplink_ifb.c iplink_nlmon.c iplink_team.c iplink_vcan.c iplink_vxcan.c
39+	iplink_vlan.c link_veth.c link_gre.c iplink_can.c iplink_xdp.c
40+	iplink_macvlan.c ipl2tp.c link_vti.c link_vti6.c link_xfrm.c
41+	iplink_vxlan.c tcp_metrics.c iplink_ipoib.c ipnetconf.c link_ip6tnl.c
42+	link_iptnl.c link_gre6.c iplink_bond.c iplink_bond_slave.c iplink_hsr.c
43+	iplink_bridge.c iplink_bridge_slave.c ipfou.c iplink_ipvlan.c
44+	iplink_geneve.c iplink_vrf.c iproute_lwtunnel.c ipmacsec.c ipila.c
45+	ipvrf.c iplink_xstats.c ipseg6.c iplink_netdevsim.c iplink_rmnet.c
46+	ipnexthop.c ipmptcp.c iplink_bareudp.c iplink_wwan.c ipioam6.c
47+	iplink_amt.c
48+) libnetlink.a]])
49+file('bin/ip', '755', '$outdir/bin/ip')
50+
51+exe('bin/bridge', [[
52+	bridge/(bridge.c fdb.c monitor.c link.c mdb.c vlan.c)
53+	libnetlink.a
54+]])
55+file('bin/bridge', '755', '$outdir/bin/bridge')
56+
57+yacc('ssfilter', '$srcdir/misc/ssfilter.y')
58+exe('bin/ss', {'misc/ss.c', 'misc/ssfilter_check.c', '$outdir/ssfilter.tab.c', 'libnetlink.a'})
59+file('bin/ss', '755', '$outdir/bin/ss')
60+
61+man(paths[[man/man8/(
62+	bridge ip ss
63+	ip-(
64+		addrlabel fou gue l2tp macsec maddress monitor mroute neighbour
65+		netconf ntable rule sr tcp_metrics token tunnel vrf xfrm
66+	)
67+).8]])
68+for _, name in ipairs{'ip-address', 'ip-link', 'ip-netns', 'ip-route'} do
69+	local out = '$outdir/'..name..'.8'
70+	build('sed', out, '$srcdir/man/man8/'..name..'.8.in', {
71+		expr={
72+			'-e s,@SYSCONFDIR@,/etc,g',
73+			'-e s,@NETNS_ETC_DIR@,/etc/netns,g',
74+			'-e s,@NETNS_RUN_DIR@,/run/netns,g',
75+		},
76+	})
77+	man{out}
78+end
79+
80+fetch 'git'
+215, -0
  1@@ -0,0 +1,215 @@
  2+From fd0745e3e85d892520ca9d7ba42bb2603c969900 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sat, 25 Apr 2015 17:37:46 +0000
  5+Subject: [PATCH] Fix includes for musl libc
  6+
  7+---
  8+ bridge/fdb.c                    | 1 -
  9+ bridge/mdb.c                    | 1 -
 10+ bridge/vlan.c                   | 1 -
 11+ include/uapi/linux/if_bridge.h  | 3 ++-
 12+ include/uapi/linux/if_tunnel.h  | 3 ++-
 13+ include/uapi/linux/ip6_tunnel.h | 3 ++-
 14+ include/uapi/linux/netdevice.h  | 3 ++-
 15+ ip/ip6tunnel.c                  | 2 +-
 16+ ip/ipl2tp.c                     | 2 +-
 17+ ip/iplink_hsr.c                 | 2 +-
 18+ ip/ipmaddr.c                    | 2 +-
 19+ ip/ipmroute.c                   | 2 +-
 20+ ip/iptuntap.c                   | 1 -
 21+ ip/tunnel.c                     | 2 +-
 22+ 14 files changed, 14 insertions(+), 14 deletions(-)
 23+
 24+diff --git a/bridge/fdb.c b/bridge/fdb.c
 25+index 8912f092..78f69cec 100644
 26+--- a/bridge/fdb.c
 27++++ b/bridge/fdb.c
 28+@@ -18,7 +18,6 @@
 29+ #include <net/if.h>
 30+ #include <netinet/in.h>
 31+ #include <linux/if_bridge.h>
 32+-#include <linux/if_ether.h>
 33+ #include <linux/neighbour.h>
 34+ #include <string.h>
 35+ #include <limits.h>
 36+diff --git a/bridge/mdb.c b/bridge/mdb.c
 37+index 7b5863d3..e62bfce3 100644
 38+--- a/bridge/mdb.c
 39++++ b/bridge/mdb.c
 40+@@ -11,7 +11,6 @@
 41+ #include <net/if.h>
 42+ #include <netinet/in.h>
 43+ #include <linux/if_bridge.h>
 44+-#include <linux/if_ether.h>
 45+ #include <string.h>
 46+ #include <arpa/inet.h>
 47+ 
 48+diff --git a/bridge/vlan.c b/bridge/vlan.c
 49+index 8300f353..793d95d1 100644
 50+--- a/bridge/vlan.c
 51++++ b/bridge/vlan.c
 52+@@ -7,7 +7,6 @@
 53+ #include <net/if.h>
 54+ #include <netinet/in.h>
 55+ #include <linux/if_bridge.h>
 56+-#include <linux/if_ether.h>
 57+ #include <string.h>
 58+ #include <errno.h>
 59+ 
 60+diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h
 61+index d1b5fdee..b5a9217d 100644
 62+--- a/include/uapi/linux/if_bridge.h
 63++++ b/include/uapi/linux/if_bridge.h
 64+@@ -14,8 +14,9 @@
 65+ #ifndef _LINUX_IF_BRIDGE_H
 66+ #define _LINUX_IF_BRIDGE_H
 67+ 
 68++#include <netinet/if_ether.h>
 69++
 70+ #include <linux/types.h>
 71+-#include <linux/if_ether.h>
 72+ #include <linux/in6.h>
 73+ 
 74+ #define SYSFS_BRIDGE_ATTR	"bridge"
 75+diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
 76+index c7f0a5e6..4cfcf216 100644
 77+--- a/include/uapi/linux/if_tunnel.h
 78++++ b/include/uapi/linux/if_tunnel.h
 79+@@ -2,8 +2,9 @@
 80+ #ifndef _IF_TUNNEL_H_
 81+ #define _IF_TUNNEL_H_
 82+ 
 83++#include <net/if.h>
 84++
 85+ #include <linux/types.h>
 86+-#include <linux/if.h>
 87+ #include <linux/ip.h>
 88+ #include <linux/in6.h>
 89+ #include <asm/byteorder.h>
 90+diff --git a/include/uapi/linux/ip6_tunnel.h b/include/uapi/linux/ip6_tunnel.h
 91+index 0245269b..08c23180 100644
 92+--- a/include/uapi/linux/ip6_tunnel.h
 93++++ b/include/uapi/linux/ip6_tunnel.h
 94+@@ -2,8 +2,9 @@
 95+ #ifndef _IP6_TUNNEL_H
 96+ #define _IP6_TUNNEL_H
 97+ 
 98++#include <net/if.h>		/* For IFNAMSIZ. */
 99++
100+ #include <linux/types.h>
101+-#include <linux/if.h>		/* For IFNAMSIZ. */
102+ #include <linux/in6.h>		/* For struct in6_addr. */
103+ 
104+ #define IPV6_TLV_TNL_ENCAP_LIMIT 4
105+diff --git a/include/uapi/linux/netdevice.h b/include/uapi/linux/netdevice.h
106+index 86d961c9..cbe835e4 100644
107+--- a/include/uapi/linux/netdevice.h
108++++ b/include/uapi/linux/netdevice.h
109+@@ -26,7 +26,8 @@
110+ #ifndef _LINUX_NETDEVICE_H
111+ #define _LINUX_NETDEVICE_H
112+ 
113+-#include <linux/if.h>
114++#include <net/if.h>
115++
116+ #include <linux/if_ether.h>
117+ #include <linux/if_packet.h>
118+ #include <linux/if_link.h>
119+diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
120+index 5399f91d..c712d664 100644
121+--- a/ip/ip6tunnel.c
122++++ b/ip/ip6tunnel.c
123+@@ -27,8 +27,8 @@
124+ #include <sys/socket.h>
125+ #include <arpa/inet.h>
126+ #include <sys/ioctl.h>
127++#include <net/if.h>
128+ #include <linux/ip.h>
129+-#include <linux/if.h>
130+ #include <linux/if_arp.h>
131+ #include <linux/if_tunnel.h>
132+ #include <linux/ip6_tunnel.h>
133+diff --git a/ip/ipl2tp.c b/ip/ipl2tp.c
134+index 77bc3249..f090390f 100644
135+--- a/ip/ipl2tp.c
136++++ b/ip/ipl2tp.c
137+@@ -19,7 +19,7 @@
138+ #include <sys/socket.h>
139+ #include <arpa/inet.h>
140+ #include <sys/ioctl.h>
141+-#include <linux/if.h>
142++#include <net/if.h>
143+ #include <linux/if_arp.h>
144+ #include <linux/ip.h>
145+ 
146+diff --git a/ip/iplink_hsr.c b/ip/iplink_hsr.c
147+index da2d03d4..8c63293a 100644
148+--- a/ip/iplink_hsr.c
149++++ b/ip/iplink_hsr.c
150+@@ -15,7 +15,7 @@
151+ #include <stdlib.h>
152+ #include <string.h>
153+ #include <sys/socket.h>  /* Needed by linux/if.h for some reason */
154+-#include <linux/if.h>
155++#include <net/if.h>
156+ #include <linux/if_arp.h>
157+ #include "rt_names.h"
158+ #include "utils.h"
159+diff --git a/ip/ipmaddr.c b/ip/ipmaddr.c
160+index d41ac63a..b7600424 100644
161+--- a/ip/ipmaddr.c
162++++ b/ip/ipmaddr.c
163+@@ -19,9 +19,9 @@
164+ #include <netinet/in.h>
165+ #include <arpa/inet.h>
166+ #include <string.h>
167++#include <net/if.h>
168+ 
169+ #include <linux/netdevice.h>
170+-#include <linux/if.h>
171+ #include <linux/if_arp.h>
172+ #include <linux/sockios.h>
173+ 
174+diff --git a/ip/ipmroute.c b/ip/ipmroute.c
175+index 981baf2a..2dfa83f8 100644
176+--- a/ip/ipmroute.c
177++++ b/ip/ipmroute.c
178+@@ -20,9 +20,9 @@
179+ #include <netinet/in.h>
180+ #include <arpa/inet.h>
181+ #include <string.h>
182++#include <net/if.h>
183+ 
184+ #include <linux/netdevice.h>
185+-#include <linux/if.h>
186+ #include <linux/if_arp.h>
187+ #include <linux/sockios.h>
188+ 
189+diff --git a/ip/iptuntap.c b/ip/iptuntap.c
190+index 385d2bd8..9837b37e 100644
191+--- a/ip/iptuntap.c
192++++ b/ip/iptuntap.c
193+@@ -18,7 +18,6 @@
194+ #include <sys/socket.h>
195+ #include <arpa/inet.h>
196+ #include <sys/ioctl.h>
197+-#include <linux/if.h>
198+ #include <linux/if_tun.h>
199+ #include <linux/if_arp.h>
200+ #include <pwd.h>
201+diff --git a/ip/tunnel.c b/ip/tunnel.c
202+index 88585cf3..f77ecde7 100644
203+--- a/ip/tunnel.c
204++++ b/ip/tunnel.c
205+@@ -30,7 +30,7 @@
206+ #include <sys/socket.h>
207+ #include <sys/ioctl.h>
208+ #include <netinet/in.h>
209+-#include <linux/if.h>
210++#include <net/if.h>
211+ #include <linux/ip.h>
212+ #include <linux/if_tunnel.h>
213+ #include <linux/if_arp.h>
214+-- 
215+2.34.1
216+
+232, -0
  1@@ -0,0 +1,232 @@
  2+From f322d5077bb45dffaa384be4c78e4cf218767bf5 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Tue, 12 Mar 2019 19:12:31 -0700
  5+Subject: [PATCH] Avoid pointer arithmetic on `void *`
  6+
  7+---
  8+ include/libnetlink.h |  4 ++--
  9+ ip/ipfou.c           |  2 +-
 10+ ip/ipila.c           |  2 +-
 11+ ip/ipioam6.c         |  3 ++-
 12+ ip/ipl2tp.c          |  2 +-
 13+ ip/ipmacsec.c        |  2 +-
 14+ ip/ipmptcp.c         |  6 +++---
 15+ ip/ipseg6.c          |  2 +-
 16+ ip/tcp_metrics.c     |  2 +-
 17+ lib/libnetlink.c     | 12 ++++++------
 18+ lib/utils.c          |  2 +-
 19+ 11 files changed, 20 insertions(+), 19 deletions(-)
 20+
 21+diff --git a/include/libnetlink.h b/include/libnetlink.h
 22+index 9e4cc101..6925de43 100644
 23+--- a/include/libnetlink.h
 24++++ b/include/libnetlink.h
 25+@@ -206,7 +206,7 @@ struct rtattr *rta_nest(struct rtattr *rta, int maxlen, int type);
 26+ int rta_nest_end(struct rtattr *rta, struct rtattr *nest);
 27+ 
 28+ #define RTA_TAIL(rta) \
 29+-		((struct rtattr *) (((void *) (rta)) + \
 30++		((struct rtattr *) (((char *) (rta)) + \
 31+ 				    RTA_ALIGN((rta)->rta_len)))
 32+ 
 33+ #define parse_rtattr_nested(tb, max, rta) \
 34+@@ -270,7 +270,7 @@ int rtnl_from_file(FILE *, rtnl_listen_filter_t handler,
 35+ 		   void *jarg);
 36+ 
 37+ #define NLMSG_TAIL(nmsg) \
 38+-	((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
 39++	((struct rtattr *) (((char *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
 40+ 
 41+ #ifndef IFA_RTA
 42+ #define IFA_RTA(r) \
 43+diff --git a/ip/ipfou.c b/ip/ipfou.c
 44+index 9c697770..539e7ab7 100644
 45+--- a/ip/ipfou.c
 46++++ b/ip/ipfou.c
 47+@@ -232,7 +232,7 @@ static int print_fou_mapping(struct nlmsghdr *n, void *arg)
 48+ 		return -1;
 49+ 
 50+ 	ghdr = NLMSG_DATA(n);
 51+-	parse_rtattr(tb, FOU_ATTR_MAX, (void *) ghdr + GENL_HDRLEN, len);
 52++	parse_rtattr(tb, FOU_ATTR_MAX, (struct rtattr *)((char *)ghdr + GENL_HDRLEN), len);
 53+ 
 54+ 	open_json_object(NULL);
 55+ 	if (tb[FOU_ATTR_PORT])
 56+diff --git a/ip/ipila.c b/ip/ipila.c
 57+index 475c35b5..0540d1d9 100644
 58+--- a/ip/ipila.c
 59++++ b/ip/ipila.c
 60+@@ -96,7 +96,7 @@ static int print_ila_mapping(struct nlmsghdr *n, void *arg)
 61+ 		return -1;
 62+ 
 63+ 	ghdr = NLMSG_DATA(n);
 64+-	parse_rtattr(tb, ILA_ATTR_MAX, (void *) ghdr + GENL_HDRLEN, len);
 65++	parse_rtattr(tb, ILA_ATTR_MAX, (struct rtattr *)((char *)ghdr + GENL_HDRLEN), len);
 66+ 
 67+ 	open_json_object(NULL);
 68+ 	print_ila_locid("locator_match", ILA_ATTR_LOCATOR_MATCH, tb);
 69+diff --git a/ip/ipioam6.c b/ip/ipioam6.c
 70+index b63d7d5c..c7c9aceb 100644
 71+--- a/ip/ipioam6.c
 72++++ b/ip/ipioam6.c
 73+@@ -110,7 +110,8 @@ static int process_msg(struct nlmsghdr *n, void *arg)
 74+ 		return -1;
 75+ 
 76+ 	ghdr = NLMSG_DATA(n);
 77+-	parse_rtattr(attrs, IOAM6_ATTR_MAX, (void *)ghdr + GENL_HDRLEN, len);
 78++	parse_rtattr(attrs, IOAM6_ATTR_MAX,
 79++		     (struct rtattr *)((char *)ghdr + GENL_HDRLEN), len);
 80+ 
 81+ 	open_json_object(NULL);
 82+ 	switch (ghdr->cmd) {
 83+diff --git a/ip/ipl2tp.c b/ip/ipl2tp.c
 84+index f090390f..edbe0f2f 100644
 85+--- a/ip/ipl2tp.c
 86++++ b/ip/ipl2tp.c
 87+@@ -345,7 +345,7 @@ static int get_response(struct nlmsghdr *n, void *arg)
 88+ 	if (len < 0)
 89+ 		return -1;
 90+ 
 91+-	parse_rtattr(attrs, L2TP_ATTR_MAX, (void *)ghdr + GENL_HDRLEN, len);
 92++	parse_rtattr(attrs, L2TP_ATTR_MAX, (struct rtattr *)((char *)ghdr + GENL_HDRLEN), len);
 93+ 
 94+ 	if (attrs[L2TP_ATTR_PW_TYPE])
 95+ 		p->pw_type = rta_getattr_u16(attrs[L2TP_ATTR_PW_TYPE]);
 96+diff --git a/ip/ipmacsec.c b/ip/ipmacsec.c
 97+index bf48e8b5..eecb7e48 100644
 98+--- a/ip/ipmacsec.c
 99++++ b/ip/ipmacsec.c
100+@@ -1001,7 +1001,7 @@ static int process(struct nlmsghdr *n, void *arg)
101+ 	if (ghdr->cmd != MACSEC_CMD_GET_TXSC)
102+ 		return 0;
103+ 
104+-	parse_rtattr(attrs, MACSEC_ATTR_MAX, (void *) ghdr + GENL_HDRLEN, len);
105++	parse_rtattr(attrs, MACSEC_ATTR_MAX, (struct rtattr *)((char *)ghdr + GENL_HDRLEN), len);
106+ 	if (!validate_dump(attrs)) {
107+ 		fprintf(stderr, "incomplete dump message\n");
108+ 		return -1;
109+diff --git a/ip/ipmptcp.c b/ip/ipmptcp.c
110+index 85700444..bbdd06e7 100644
111+--- a/ip/ipmptcp.c
112++++ b/ip/ipmptcp.c
113+@@ -256,7 +256,7 @@ static int print_mptcp_addr(struct nlmsghdr *n, void *arg)
114+ 		return -1;
115+ 
116+ 	ghdr = NLMSG_DATA(n);
117+-	parse_rtattr_flags(tb, MPTCP_PM_ATTR_MAX, (void *) ghdr + GENL_HDRLEN,
118++	parse_rtattr_flags(tb, MPTCP_PM_ATTR_MAX, (struct rtattr *)((char *)ghdr + GENL_HDRLEN),
119+ 			   len, NLA_F_NESTED);
120+ 	addrinfo = tb[MPTCP_PM_ATTR_ADDR];
121+ 	if (!addrinfo)
122+@@ -371,7 +371,7 @@ static int print_mptcp_limit(struct nlmsghdr *n, void *arg)
123+ 		return -1;
124+ 
125+ 	ghdr = NLMSG_DATA(n);
126+-	parse_rtattr(tb, MPTCP_PM_ATTR_MAX, (void *) ghdr + GENL_HDRLEN, len);
127++	parse_rtattr(tb, MPTCP_PM_ATTR_MAX, (struct rtattr *)((char *)ghdr + GENL_HDRLEN), len);
128+ 
129+ 	open_json_object(NULL);
130+ 	if (tb[MPTCP_PM_ATTR_RCV_ADD_ADDRS]) {
131+@@ -460,7 +460,7 @@ static int mptcp_monitor_msg(struct rtnl_ctrl_data *ctrl,
132+ 
133+ 	printf("[%14s]", event_to_str[ghdr->cmd]);
134+ 
135+-	parse_rtattr(tb, MPTCP_ATTR_MAX, (void *) ghdr + GENL_HDRLEN, len);
136++	parse_rtattr(tb, MPTCP_ATTR_MAX, (struct rtattr *) ((char *) ghdr + GENL_HDRLEN), len);
137+ 
138+ 	printf(" token=%08x", rta_getattr_u32(tb[MPTCP_ATTR_TOKEN]));
139+ 
140+diff --git a/ip/ipseg6.c b/ip/ipseg6.c
141+index 4f541ae4..b9baf38c 100644
142+--- a/ip/ipseg6.c
143++++ b/ip/ipseg6.c
144+@@ -115,7 +115,7 @@ static int process_msg(struct nlmsghdr *n, void *arg)
145+ 
146+ 	ghdr = NLMSG_DATA(n);
147+ 
148+-	parse_rtattr(attrs, SEG6_ATTR_MAX, (void *)ghdr + GENL_HDRLEN, len);
149++	parse_rtattr(attrs, SEG6_ATTR_MAX, (struct rtattr *)((char *)ghdr + GENL_HDRLEN), len);
150+ 
151+ 	open_json_object(NULL);
152+ 	switch (ghdr->cmd) {
153+diff --git a/ip/tcp_metrics.c b/ip/tcp_metrics.c
154+index acbd745a..051ddc63 100644
155+--- a/ip/tcp_metrics.c
156++++ b/ip/tcp_metrics.c
157+@@ -178,7 +178,7 @@ static int process_msg(struct nlmsghdr *n, void *arg)
158+ 	if (ghdr->cmd != TCP_METRICS_CMD_GET)
159+ 		return 0;
160+ 
161+-	parse_rtattr(attrs, TCP_METRICS_ATTR_MAX, (void *) ghdr + GENL_HDRLEN,
162++	parse_rtattr(attrs, TCP_METRICS_ATTR_MAX, (struct rtattr *)((char *)ghdr + GENL_HDRLEN),
163+ 		     len);
164+ 
165+ 	if (attrs[TCP_METRICS_ATTR_ADDR_IPV4]) {
166+diff --git a/lib/libnetlink.c b/lib/libnetlink.c
167+index 7e977a67..7068750f 100644
168+--- a/lib/libnetlink.c
169++++ b/lib/libnetlink.c
170+@@ -1365,7 +1365,7 @@ int addraw_l(struct nlmsghdr *n, int maxlen, const void *data, int len)
171+ 	}
172+ 
173+ 	memcpy(NLMSG_TAIL(n), data, len);
174+-	memset((void *) NLMSG_TAIL(n) + len, 0, NLMSG_ALIGN(len) - len);
175++	memset((char *) NLMSG_TAIL(n) + len, 0, NLMSG_ALIGN(len) - len);
176+ 	n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len);
177+ 	return 0;
178+ }
179+@@ -1380,7 +1380,7 @@ struct rtattr *addattr_nest(struct nlmsghdr *n, int maxlen, int type)
180+ 
181+ int addattr_nest_end(struct nlmsghdr *n, struct rtattr *nest)
182+ {
183+-	nest->rta_len = (void *)NLMSG_TAIL(n) - (void *)nest;
184++	nest->rta_len = (char *)NLMSG_TAIL(n) - (char *)nest;
185+ 	return n->nlmsg_len;
186+ }
187+ 
188+@@ -1396,9 +1396,9 @@ struct rtattr *addattr_nest_compat(struct nlmsghdr *n, int maxlen, int type,
189+ 
190+ int addattr_nest_compat_end(struct nlmsghdr *n, struct rtattr *start)
191+ {
192+-	struct rtattr *nest = (void *)start + NLMSG_ALIGN(start->rta_len);
193++	struct rtattr *nest = (struct rtattr *)((char *)start + NLMSG_ALIGN(start->rta_len));
194+ 
195+-	start->rta_len = (void *)NLMSG_TAIL(n) - (void *)start;
196++	start->rta_len = (char *)NLMSG_TAIL(n) - (char *)start;
197+ 	addattr_nest_end(n, nest);
198+ 	return n->nlmsg_len;
199+ }
200+@@ -1470,7 +1470,7 @@ struct rtattr *rta_nest(struct rtattr *rta, int maxlen, int type)
201+ 
202+ int rta_nest_end(struct rtattr *rta, struct rtattr *nest)
203+ {
204+-	nest->rta_len = (void *)RTA_TAIL(rta) - (void *)nest;
205++	nest->rta_len = (char *)RTA_TAIL(rta) - (char *)nest;
206+ 
207+ 	return rta->rta_len;
208+ }
209+@@ -1519,7 +1519,7 @@ int __parse_rtattr_nested_compat(struct rtattr *tb[], int max,
210+ 	if (RTA_PAYLOAD(rta) < len)
211+ 		return -1;
212+ 	if (RTA_PAYLOAD(rta) >= RTA_ALIGN(len) + sizeof(struct rtattr)) {
213+-		rta = RTA_DATA(rta) + RTA_ALIGN(len);
214++		rta = (struct rtattr *)((char *)RTA_DATA(rta) + RTA_ALIGN(len));
215+ 		return parse_rtattr_nested(tb, max, rta);
216+ 	}
217+ 	memset(tb, 0, sizeof(struct rtattr *) * (max + 1));
218+diff --git a/lib/utils.c b/lib/utils.c
219+index 53d31006..0f683f9c 100644
220+--- a/lib/utils.c
221++++ b/lib/utils.c
222+@@ -1514,7 +1514,7 @@ int get_rtnl_link_stats_rta(struct rtnl_link_stats64 *stats64,
223+ 
224+ 	len = RTA_PAYLOAD(rta);
225+ 	if (len < size)
226+-		memset(s + len, 0, size - len);
227++		memset((char *)s + len, 0, size - len);
228+ 	else
229+ 		len = size;
230+ 
231+-- 
232+2.34.1
233+
+45, -0
 1@@ -0,0 +1,45 @@
 2+From 73e1cde9f80294c730b02c1eb217a4bc82d0168b Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 16 Jun 2019 12:14:23 -0700
 5+Subject: [PATCH] Don't return expression in function returning void
 6+
 7+---
 8+ ip/iplink_xdp.c | 8 +++++---
 9+ ip/ipxfrm.c     | 2 +-
10+ 2 files changed, 6 insertions(+), 4 deletions(-)
11+
12+diff --git a/ip/iplink_xdp.c b/ip/iplink_xdp.c
13+index 4a490bc8..0d52bfac 100644
14+--- a/ip/iplink_xdp.c
15++++ b/ip/iplink_xdp.c
16+@@ -168,9 +168,11 @@ void xdp_dump(FILE *fp, struct rtattr *xdp, bool link, bool details)
17+ 	mode = rta_getattr_u8(tb[IFLA_XDP_ATTACHED]);
18+ 	if (mode == XDP_ATTACHED_NONE)
19+ 		return;
20+-	else if (is_json_context())
21+-		return details ? (void)0 : xdp_dump_json(tb);
22+-	else if (details && link)
23++	else if (is_json_context()) {
24++		if (details)
25++			xdp_dump_json(tb);
26++		return;
27++	} else if (details && link)
28+ 		/* don't print mode */;
29+ 	else if (mode == XDP_ATTACHED_DRV)
30+ 		fprintf(fp, "xdp");
31+diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
32+index fec206ab..92afb7f8 100644
33+--- a/ip/ipxfrm.c
34++++ b/ip/ipxfrm.c
35+@@ -542,7 +542,7 @@ static void __xfrm_algo_print(struct xfrm_algo *algo, int type, int len,
36+ static inline void xfrm_algo_print(struct xfrm_algo *algo, int type, int len,
37+ 				   FILE *fp, const char *prefix, bool nokeys)
38+ {
39+-	return __xfrm_algo_print(algo, type, len, fp, prefix, 1, nokeys);
40++	__xfrm_algo_print(algo, type, len, fp, prefix, 1, nokeys);
41+ }
42+ 
43+ static void xfrm_aead_print(struct xfrm_algo_aead *algo, int len,
44+-- 
45+2.26.0
46+
+31, -0
 1@@ -0,0 +1,31 @@
 2+From d1f061dee88d2ea01601d6d2742635c66985ca61 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 16 Jun 2019 12:16:18 -0700
 5+Subject: [PATCH] Don't use statement expressions on non-GNU compilers
 6+
 7+---
 8+ include/list.h | 5 +++++
 9+ 1 file changed, 5 insertions(+)
10+
11+diff --git a/include/list.h b/include/list.h
12+index 5d86b131..7108cea7 100644
13+--- a/include/list.h
14++++ b/include/list.h
15+@@ -5,9 +5,14 @@
16+ 
17+ #include <stddef.h>
18+ 
19++#ifdef __GNUC__
20+ #define container_of(ptr, type, member) ({			\
21+ 	const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
22+ 	(type *)( (char *)__mptr - offsetof(type,member) );})
23++#else
24++#define container_of(ptr, type, member) (			\
25++	(type *)( (char *)(ptr) - offsetof(type,member) ))
26++#endif
27+ 
28+ struct list_head {
29+ 	struct list_head *next, *prev;
30+-- 
31+2.20.1
32+
+2540, -0
   1@@ -0,0 +1,2540 @@
   2+From 4ec571346e57d7c0259a48b561a1742d028d5fb2 Mon Sep 17 00:00:00 2001
   3+From: Michael Forney <mforney@mforney.org>
   4+Date: Thu, 17 Feb 2022 22:51:00 -0800
   5+Subject: [PATCH] Don't use empty initializer lists
   6+
   7+---
   8+ bridge/mdb.c      |  2 +-
   9+ bridge/vlan.c     |  6 +--
  10+ devlink/devlink.c | 94 +++++++++++++++++++++++------------------------
  11+ devlink/mnlg.c    |  4 +-
  12+ ip/ip6tunnel.c    |  2 +-
  13+ ip/ipaddress.c    |  8 ++--
  14+ ip/ipaddrlabel.c  |  2 +-
  15+ ip/iplink.c       |  2 +-
  16+ ip/iplink_can.c   |  2 +-
  17+ ip/ipmaddr.c      |  2 +-
  18+ ip/ipntable.c     |  4 +-
  19+ ip/iptunnel.c     | 10 ++---
  20+ ip/iptuntap.c     |  2 +-
  21+ ip/ipxfrm.c       | 14 +++----
  22+ ip/xfrm_policy.c  | 12 +++---
  23+ ip/xfrm_state.c   | 12 +++---
  24+ lib/bpf_legacy.c  | 40 ++++++++++----------
  25+ lib/libnetlink.c  |  8 ++--
  26+ lib/ll_map.c      |  2 +-
  27+ lib/rt_names.c    |  3 +-
  28+ misc/arpd.c       |  4 +-
  29+ misc/ss.c         | 38 +++++++++----------
  30+ rdma/dev.c        |  2 +-
  31+ rdma/link.c       |  2 +-
  32+ rdma/rdma.c       |  2 +-
  33+ rdma/res-cmid.c   |  6 +--
  34+ rdma/res-cq.c     |  6 +--
  35+ rdma/res-mr.c     |  6 +--
  36+ rdma/res-pd.c     |  6 +--
  37+ rdma/res-qp.c     |  6 +--
  38+ rdma/res.c        |  4 +-
  39+ rdma/utils.c      |  2 +-
  40+ tc/e_bpf.c        |  4 +-
  41+ tc/em_cmp.c       |  2 +-
  42+ tc/em_ipset.c     |  2 +-
  43+ tc/em_meta.c      |  2 +-
  44+ tc/em_nbyte.c     |  2 +-
  45+ tc/em_u32.c       |  2 +-
  46+ tc/f_bpf.c        |  2 +-
  47+ tc/f_fw.c         |  2 +-
  48+ tc/f_rsvp.c       |  2 +-
  49+ tc/f_u32.c        |  6 +--
  50+ tc/m_bpf.c        |  4 +-
  51+ tc/m_connmark.c   |  2 +-
  52+ tc/m_csum.c       |  2 +-
  53+ tc/m_mirred.c     |  4 +-
  54+ tc/m_nat.c        |  2 +-
  55+ tc/m_pedit.c      |  4 +-
  56+ tc/m_simple.c     |  2 +-
  57+ tc/m_tunnel_key.c |  2 +-
  58+ tc/m_vlan.c       |  2 +-
  59+ tc/m_xt.c         |  2 +-
  60+ tc/q_atm.c        |  2 +-
  61+ tc/q_cbq.c        | 12 +++---
  62+ tc/q_cbs.c        |  2 +-
  63+ tc/q_choke.c      |  2 +-
  64+ tc/q_codel.c      |  2 +-
  65+ tc/q_fifo.c       |  2 +-
  66+ tc/q_fq_codel.c   |  2 +-
  67+ tc/q_gred.c       |  6 +--
  68+ tc/q_hfsc.c       |  4 +-
  69+ tc/q_htb.c        |  2 +-
  70+ tc/q_multiq.c     |  2 +-
  71+ tc/q_netem.c      | 12 +++---
  72+ tc/q_red.c        |  2 +-
  73+ tc/q_sfq.c        |  2 +-
  74+ tc/q_skbprio.c    |  2 +-
  75+ tc/q_tbf.c        |  2 +-
  76+ tc/tc_class.c     | 18 ++++-----
  77+ tc/tc_exec.c      |  2 +-
  78+ tc/tc_filter.c    | 12 +++---
  79+ tc/tc_qdisc.c     | 10 ++---
  80+ tc/tc_stab.c      |  2 +-
  81+ tc/tc_util.c      |  6 +--
  82+ tipc/bearer.c     | 22 +++++------
  83+ tipc/link.c       | 34 ++++++++---------
  84+ tipc/media.c      | 10 ++---
  85+ tipc/misc.c       |  2 +-
  86+ tipc/nametable.c  |  6 +--
  87+ tipc/node.c       | 14 +++----
  88+ tipc/socket.c     | 10 ++---
  89+ 81 files changed, 286 insertions(+), 287 deletions(-)
  90+
  91+diff --git a/bridge/mdb.c b/bridge/mdb.c
  92+index e62bfce3..f28783a1 100644
  93+--- a/bridge/mdb.c
  94++++ b/bridge/mdb.c
  95+@@ -484,7 +484,7 @@ static int mdb_modify(int cmd, int flags, int argc, char **argv)
  96+ 		.bpm.family = PF_BRIDGE,
  97+ 	};
  98+ 	char *d = NULL, *p = NULL, *grp = NULL, *src = NULL;
  99+-	struct br_mdb_entry entry = {};
 100++	struct br_mdb_entry entry = {0};
 101+ 	short vid = 0;
 102+ 
 103+ 	while (argc > 0) {
 104+diff --git a/bridge/vlan.c b/bridge/vlan.c
 105+index 793d95d1..4b857daa 100644
 106+--- a/bridge/vlan.c
 107++++ b/bridge/vlan.c
 108+@@ -125,7 +125,7 @@ static int add_tunnel_info_range(struct nlmsghdr *n, int reqsize,
 109+ static int add_vlan_info_range(struct nlmsghdr *n, int reqsize, __u16 vid_start,
 110+ 			       int16_t vid_end, __u16 flags)
 111+ {
 112+-	struct bridge_vlan_info vinfo = {};
 113++	struct bridge_vlan_info vinfo = {0};
 114+ 
 115+ 	vinfo.flags = flags;
 116+ 	vinfo.vid = vid_start;
 117+@@ -164,7 +164,7 @@ static int vlan_modify(int cmd, int argc, char **argv)
 118+ 	short vid = -1;
 119+ 	short vid_end = -1;
 120+ 	struct rtattr *afspec;
 121+-	struct bridge_vlan_info vinfo = {};
 122++	struct bridge_vlan_info vinfo = {0};
 123+ 	bool tunnel_info_set = false;
 124+ 	unsigned short flags = 0;
 125+ 	__u32 tun_id_start = 0;
 126+@@ -270,7 +270,7 @@ static int vlan_option_set(int argc, char **argv)
 127+ 		.n.nlmsg_type = RTM_NEWVLAN,
 128+ 		.bvm.family = PF_BRIDGE,
 129+ 	};
 130+-	struct bridge_vlan_info vinfo = {};
 131++	struct bridge_vlan_info vinfo = {0};
 132+ 	struct rtattr *afspec;
 133+ 	char *d = NULL;
 134+ 	short vid = -1;
 135+diff --git a/devlink/devlink.c b/devlink/devlink.c
 136+index d39792ec..d56f2706 100644
 137+--- a/devlink/devlink.c
 138++++ b/devlink/devlink.c
 139+@@ -763,7 +763,7 @@ static int function_attr_cb(const struct nlattr *attr, void *data)
 140+ 
 141+ static int ifname_map_cb(const struct nlmsghdr *nlh, void *data)
 142+ {
 143+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 144++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 145+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 146+ 	struct dl *dl = data;
 147+ 	struct ifname_map *ifname_map;
 148+@@ -2719,7 +2719,7 @@ static void pr_out_eswitch(struct dl *dl, struct nlattr **tb)
 149+ static int cmd_dev_eswitch_show_cb(const struct nlmsghdr *nlh, void *data)
 150+ {
 151+ 	struct dl *dl = data;
 152+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 153++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 154+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 155+ 
 156+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 157+@@ -2887,7 +2887,7 @@ static const struct param_val_conv param_val_conv[] = {
 158+ static void pr_out_param_value(struct dl *dl, const char *nla_name,
 159+ 			       int nla_type, struct nlattr *nl)
 160+ {
 161+-	struct nlattr *nla_value[DEVLINK_ATTR_MAX + 1] = {};
 162++	struct nlattr *nla_value[DEVLINK_ATTR_MAX + 1] = {0};
 163+ 	struct nlattr *val_attr;
 164+ 	const char *vstr;
 165+ 	bool conv_exists;
 166+@@ -2970,7 +2970,7 @@ static void pr_out_param_value(struct dl *dl, const char *nla_name,
 167+ static void pr_out_param(struct dl *dl, struct nlattr **tb, bool array,
 168+ 			 bool is_port_param)
 169+ {
 170+-	struct nlattr *nla_param[DEVLINK_ATTR_MAX + 1] = {};
 171++	struct nlattr *nla_param[DEVLINK_ATTR_MAX + 1] = {0};
 172+ 	struct nlattr *param_value_attr;
 173+ 	const char *nla_name;
 174+ 	int nla_type;
 175+@@ -3022,7 +3022,7 @@ static void pr_out_param(struct dl *dl, struct nlattr **tb, bool array,
 176+ static int cmd_dev_param_show_cb(const struct nlmsghdr *nlh, void *data)
 177+ {
 178+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 179+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 180++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 181+ 	struct dl *dl = data;
 182+ 
 183+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 184+@@ -3049,8 +3049,8 @@ struct param_ctx {
 185+ static int cmd_dev_param_set_cb(const struct nlmsghdr *nlh, void *data)
 186+ {
 187+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 188+-	struct nlattr *nla_param[DEVLINK_ATTR_MAX + 1] = {};
 189+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 190++	struct nlattr *nla_param[DEVLINK_ATTR_MAX + 1] = {0};
 191++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 192+ 	struct nlattr *param_value_attr;
 193+ 	enum devlink_param_cmode cmode;
 194+ 	struct param_ctx *ctx = data;
 195+@@ -3074,7 +3074,7 @@ static int cmd_dev_param_set_cb(const struct nlmsghdr *nlh, void *data)
 196+ 	nla_type = mnl_attr_get_u8(nla_param[DEVLINK_ATTR_PARAM_TYPE]);
 197+ 	mnl_attr_for_each_nested(param_value_attr,
 198+ 				 nla_param[DEVLINK_ATTR_PARAM_VALUES_LIST]) {
 199+-		struct nlattr *nla_value[DEVLINK_ATTR_MAX + 1] = {};
 200++		struct nlattr *nla_value[DEVLINK_ATTR_MAX + 1] = {0};
 201+ 		struct nlattr *val_attr;
 202+ 
 203+ 		err = mnl_attr_parse_nested(param_value_attr,
 204+@@ -3117,7 +3117,7 @@ static int cmd_dev_param_set_cb(const struct nlmsghdr *nlh, void *data)
 205+ 
 206+ static int cmd_dev_param_set(struct dl *dl)
 207+ {
 208+-	struct param_ctx ctx = {};
 209++	struct param_ctx ctx = {0};
 210+ 	struct nlmsghdr *nlh;
 211+ 	bool conv_exists;
 212+ 	uint32_t val_u32 = 0;
 213+@@ -3291,7 +3291,7 @@ static int cmd_dev_param(struct dl *dl)
 214+ 
 215+ static void pr_out_action_stats(struct dl *dl, struct nlattr *action_stats)
 216+ {
 217+-	struct nlattr *tb_stats_entry[DEVLINK_ATTR_MAX + 1] = {};
 218++	struct nlattr *tb_stats_entry[DEVLINK_ATTR_MAX + 1] = {0};
 219+ 	struct nlattr *nla_reload_stats_entry, *nla_limit, *nla_value;
 220+ 	enum devlink_reload_limit limit;
 221+ 	uint32_t value;
 222+@@ -3506,7 +3506,7 @@ static void pr_out_versions_single(struct dl *dl, const struct nlmsghdr *nlh,
 223+ 	struct nlattr *version;
 224+ 
 225+ 	mnl_attr_for_each(version, nlh, sizeof(struct genlmsghdr)) {
 226+-		struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 227++		struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 228+ 		const char *ver_value;
 229+ 		const char *ver_name;
 230+ 		int err;
 231+@@ -3596,7 +3596,7 @@ static void pr_out_info(struct dl *dl, const struct nlmsghdr *nlh,
 232+ static int cmd_versions_show_cb(const struct nlmsghdr *nlh, void *data)
 233+ {
 234+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 235+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 236++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 237+ 	bool has_versions, has_info;
 238+ 	struct dl *dl = data;
 239+ 
 240+@@ -4182,7 +4182,7 @@ static void pr_out_port(struct dl *dl, struct nlattr **tb)
 241+ static int cmd_port_show_cb(const struct nlmsghdr *nlh, void *data)
 242+ {
 243+ 	struct dl *dl = data;
 244+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 245++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 246+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 247+ 
 248+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 249+@@ -4945,7 +4945,7 @@ static void pr_out_sb(struct dl *dl, struct nlattr **tb)
 250+ static int cmd_sb_show_cb(const struct nlmsghdr *nlh, void *data)
 251+ {
 252+ 	struct dl *dl = data;
 253+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 254++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 255+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 256+ 
 257+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 258+@@ -5024,7 +5024,7 @@ static void pr_out_sb_pool(struct dl *dl, struct nlattr **tb)
 259+ static int cmd_sb_pool_show_cb(const struct nlmsghdr *nlh, void *data)
 260+ {
 261+ 	struct dl *dl = data;
 262+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 263++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 264+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 265+ 
 266+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 267+@@ -5110,7 +5110,7 @@ static void pr_out_sb_port_pool(struct dl *dl, struct nlattr **tb)
 268+ static int cmd_sb_port_pool_show_cb(const struct nlmsghdr *nlh, void *data)
 269+ {
 270+ 	struct dl *dl = data;
 271+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 272++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 273+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 274+ 
 275+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 276+@@ -5213,7 +5213,7 @@ static void pr_out_sb_tc_bind(struct dl *dl, struct nlattr **tb)
 277+ static int cmd_sb_tc_bind_show_cb(const struct nlmsghdr *nlh, void *data)
 278+ {
 279+ 	struct dl *dl = data;
 280+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 281++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 282+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 283+ 
 284+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 285+@@ -5501,7 +5501,7 @@ static void cmd_sb_occ_port_pool_process(struct occ_show *occ_show,
 286+ static int cmd_sb_occ_port_pool_process_cb(const struct nlmsghdr *nlh, void *data)
 287+ {
 288+ 	struct occ_show *occ_show = data;
 289+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 290++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 291+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 292+ 
 293+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 294+@@ -5552,7 +5552,7 @@ static void cmd_sb_occ_tc_pool_process(struct occ_show *occ_show,
 295+ static int cmd_sb_occ_tc_pool_process_cb(const struct nlmsghdr *nlh, void *data)
 296+ {
 297+ 	struct occ_show *occ_show = data;
 298+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 299++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 300+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 301+ 
 302+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 303+@@ -5847,7 +5847,7 @@ static void pr_out_trap_policer(struct dl *dl, struct nlattr **tb, bool array);
 304+ static int cmd_mon_show_cb(const struct nlmsghdr *nlh, void *data)
 305+ {
 306+ 	struct dl *dl = data;
 307+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 308++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 309+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 310+ 	uint8_t cmd = genl->cmd;
 311+ 
 312+@@ -6376,7 +6376,7 @@ static void pr_out_dpipe_headers(struct dpipe_ctx *ctx,
 313+ 
 314+ static int dpipe_header_field_get(struct nlattr *nl, struct dpipe_field *field)
 315+ {
 316+-	struct nlattr *nla_field[DEVLINK_ATTR_MAX + 1] = {};
 317++	struct nlattr *nla_field[DEVLINK_ATTR_MAX + 1] = {0};
 318+ 	const char *name;
 319+ 	int err;
 320+ 
 321+@@ -6427,7 +6427,7 @@ static unsigned int dpipe_header_field_count_get(struct nlattr *nla_fields)
 322+ 
 323+ static int dpipe_header_get(struct dpipe_ctx *ctx, struct nlattr *nl)
 324+ {
 325+-	struct nlattr *nla_header[DEVLINK_ATTR_MAX + 1] = {};
 326++	struct nlattr *nla_header[DEVLINK_ATTR_MAX + 1] = {0};
 327+ 	struct dpipe_header *header;
 328+ 	unsigned int fields_count;
 329+ 	const char *header_name;
 330+@@ -6483,7 +6483,7 @@ static int dpipe_headers_get(struct dpipe_ctx *ctx, struct nlattr **tb)
 331+ static int cmd_dpipe_header_cb(const struct nlmsghdr *nlh, void *data)
 332+ {
 333+ 	struct dpipe_ctx *ctx = data;
 334+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 335++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 336+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 337+ 	int err;
 338+ 
 339+@@ -6505,7 +6505,7 @@ static int cmd_dpipe_header_cb(const struct nlmsghdr *nlh, void *data)
 340+ static int cmd_dpipe_headers_show(struct dl *dl)
 341+ {
 342+ 	struct nlmsghdr *nlh;
 343+-	struct dpipe_ctx ctx = {};
 344++	struct dpipe_ctx ctx = {0};
 345+ 	uint16_t flags = NLM_F_REQUEST | NLM_F_ACK;
 346+ 	int err;
 347+ 
 348+@@ -6600,7 +6600,7 @@ static void pr_out_dpipe_action(struct dpipe_action *action,
 349+ 
 350+ static int dpipe_action_parse(struct dpipe_action *action, struct nlattr *nl)
 351+ {
 352+-	struct nlattr *nla_action[DEVLINK_ATTR_MAX + 1] = {};
 353++	struct nlattr *nla_action[DEVLINK_ATTR_MAX + 1] = {0};
 354+ 	int err;
 355+ 
 356+ 	err = mnl_attr_parse_nested(nl, attr_cb, nla_action);
 357+@@ -6685,7 +6685,7 @@ static int dpipe_match_parse(struct dpipe_match *match,
 358+ 			     struct nlattr *nl)
 359+ 
 360+ {
 361+-	struct nlattr *nla_match[DEVLINK_ATTR_MAX + 1] = {};
 362++	struct nlattr *nla_match[DEVLINK_ATTR_MAX + 1] = {0};
 363+ 	int err;
 364+ 
 365+ 	err = mnl_attr_parse_nested(nl, attr_cb, nla_match);
 366+@@ -6790,7 +6790,7 @@ resource_path_print(struct dl *dl, struct resources *resources,
 367+ 
 368+ static int dpipe_table_show(struct dpipe_ctx *ctx, struct nlattr *nl)
 369+ {
 370+-	struct nlattr *nla_table[DEVLINK_ATTR_MAX + 1] = {};
 371++	struct nlattr *nla_table[DEVLINK_ATTR_MAX + 1] = {0};
 372+ 	struct dpipe_table *table;
 373+ 	uint32_t resource_units;
 374+ 	bool counters_enabled;
 375+@@ -6884,7 +6884,7 @@ err_table_show:
 376+ static int cmd_dpipe_table_show_cb(const struct nlmsghdr *nlh, void *data)
 377+ {
 378+ 	struct dpipe_ctx *ctx = data;
 379+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 380++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 381+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 382+ 
 383+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 384+@@ -6902,8 +6902,8 @@ static int cmd_resource_dump_cb(const struct nlmsghdr *nlh, void *data);
 385+ static int cmd_dpipe_table_show(struct dl *dl)
 386+ {
 387+ 	struct nlmsghdr *nlh;
 388+-	struct dpipe_ctx dpipe_ctx = {};
 389+-	struct resource_ctx resource_ctx = {};
 390++	struct dpipe_ctx dpipe_ctx = {0};
 391++	struct resource_ctx resource_ctx = {0};
 392+ 	uint16_t flags = NLM_F_REQUEST;
 393+ 	int err;
 394+ 
 395+@@ -7160,7 +7160,7 @@ static void pr_out_dpipe_entry_value(struct dpipe_ctx *ctx,
 396+ static int dpipe_entry_match_value_show(struct dpipe_ctx *ctx,
 397+ 					struct nlattr *nl)
 398+ {
 399+-	struct nlattr *nla_match_value[DEVLINK_ATTR_MAX + 1] = {};
 400++	struct nlattr *nla_match_value[DEVLINK_ATTR_MAX + 1] = {0};
 401+ 	struct dpipe_match match;
 402+ 	int err;
 403+ 
 404+@@ -7191,7 +7191,7 @@ err_match_parse:
 405+ static int dpipe_entry_action_value_show(struct dpipe_ctx *ctx,
 406+ 					 struct nlattr *nl)
 407+ {
 408+-	struct nlattr *nla_action_value[DEVLINK_ATTR_MAX + 1] = {};
 409++	struct nlattr *nla_action_value[DEVLINK_ATTR_MAX + 1] = {0};
 410+ 	struct dpipe_action action;
 411+ 	int err;
 412+ 
 413+@@ -7247,7 +7247,7 @@ dpipe_tables_match_values_show(struct dpipe_ctx *ctx,
 414+ 
 415+ static int dpipe_entry_show(struct dpipe_ctx *ctx, struct nlattr *nl)
 416+ {
 417+-	struct nlattr *nla_entry[DEVLINK_ATTR_MAX + 1] = {};
 418++	struct nlattr *nla_entry[DEVLINK_ATTR_MAX + 1] = {0};
 419+ 	uint32_t entry_index;
 420+ 	uint64_t counter;
 421+ 	int err;
 422+@@ -7311,7 +7311,7 @@ err_entry_show:
 423+ static int cmd_dpipe_table_entry_dump_cb(const struct nlmsghdr *nlh, void *data)
 424+ {
 425+ 	struct dpipe_ctx *ctx = data;
 426+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 427++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 428+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 429+ 
 430+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 431+@@ -7327,7 +7327,7 @@ static int cmd_dpipe_table_entry_dump_cb(const struct nlmsghdr *nlh, void *data)
 432+ static int cmd_dpipe_table_dump(struct dl *dl)
 433+ {
 434+ 	struct nlmsghdr *nlh;
 435+-	struct dpipe_ctx ctx = {};
 436++	struct dpipe_ctx ctx = {0};
 437+ 	uint16_t flags = NLM_F_REQUEST;
 438+ 	int err;
 439+ 
 440+@@ -7436,7 +7436,7 @@ static int
 441+ resource_get(struct resource_ctx *ctx, struct resource *resource,
 442+ 	     struct resource *parent_resource, struct nlattr *nl)
 443+ {
 444+-	struct nlattr *nla_resource[DEVLINK_ATTR_MAX + 1] = {};
 445++	struct nlattr *nla_resource[DEVLINK_ATTR_MAX + 1] = {0};
 446+ 	struct nlattr *nla_child_resource;
 447+ 	struct nlattr *nla_resources;
 448+ 	bool top = false;
 449+@@ -7584,7 +7584,7 @@ static int resources_get(struct resource_ctx *ctx, struct nlattr **tb)
 450+ static int cmd_resource_dump_cb(const struct nlmsghdr *nlh, void *data)
 451+ {
 452+ 	struct resource_ctx *ctx = data;
 453+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 454++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 455+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 456+ 	int err;
 457+ 
 458+@@ -7608,8 +7608,8 @@ static int cmd_resource_dump_cb(const struct nlmsghdr *nlh, void *data)
 459+ static int cmd_resource_show(struct dl *dl)
 460+ {
 461+ 	struct nlmsghdr *nlh;
 462+-	struct dpipe_ctx dpipe_ctx = {};
 463+-	struct resource_ctx resource_ctx = {};
 464++	struct dpipe_ctx dpipe_ctx = {0};
 465++	struct resource_ctx resource_ctx = {0};
 466+ 	int err;
 467+ 
 468+ 	err = dl_argv_parse(dl, DL_OPT_HANDLE, 0);
 469+@@ -7704,7 +7704,7 @@ err_resource_lookup:
 470+ static int cmd_resource_set(struct dl *dl)
 471+ {
 472+ 	struct nlmsghdr *nlh;
 473+-	struct resource_ctx ctx = {};
 474++	struct resource_ctx ctx = {0};
 475+ 	int err;
 476+ 
 477+ 	err = resource_ctx_init(&ctx, dl);
 478+@@ -7816,7 +7816,7 @@ static void pr_out_region_snapshots_id(struct dl *dl, struct nlattr **tb, int in
 479+ 
 480+ static void pr_out_snapshots(struct dl *dl, struct nlattr **tb)
 481+ {
 482+-	struct nlattr *tb_snapshot[DEVLINK_ATTR_MAX + 1] = {};
 483++	struct nlattr *tb_snapshot[DEVLINK_ATTR_MAX + 1] = {0};
 484+ 	struct nlattr *nla_sanpshot;
 485+ 	int err, index = 0;
 486+ 
 487+@@ -7861,7 +7861,7 @@ static void pr_out_region(struct dl *dl, struct nlattr **tb)
 488+ static int cmd_region_show_cb(const struct nlmsghdr *nlh, void *data)
 489+ {
 490+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 491+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 492++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 493+ 	struct dl *dl = data;
 494+ 
 495+ 	mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
 496+@@ -7917,8 +7917,8 @@ static int cmd_region_read_cb(const struct nlmsghdr *nlh, void *data)
 497+ {
 498+ 	struct nlattr *nla_entry, *nla_chunk_data, *nla_chunk_addr;
 499+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 500+-	struct nlattr *tb_field[DEVLINK_ATTR_MAX + 1] = {};
 501+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 502++	struct nlattr *tb_field[DEVLINK_ATTR_MAX + 1] = {0};
 503++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 504+ 	struct dl *dl = data;
 505+ 	int err;
 506+ 
 507+@@ -8265,7 +8265,7 @@ static int cmd_fmsg_nest(struct fmsg_cb_data *fmsg_data, uint8_t nest_value,
 508+ static int cmd_fmsg_object_cb(const struct nlmsghdr *nlh, void *data)
 509+ {
 510+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 511+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 512++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 513+ 	struct fmsg_cb_data *fmsg_data = data;
 514+ 	struct dl *dl = fmsg_data->dl;
 515+ 	struct nlattr *nla_object;
 516+@@ -8456,7 +8456,7 @@ static void pr_out_dump_report_timestamp(struct dl *dl, const struct nlattr *att
 517+ static void pr_out_health(struct dl *dl, struct nlattr **tb_health,
 518+ 			  bool print_device, bool print_port)
 519+ {
 520+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 521++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 522+ 	enum devlink_health_reporter_state state;
 523+ 	int err;
 524+ 
 525+@@ -8527,7 +8527,7 @@ struct health_ctx {
 526+ static int cmd_health_show_cb(const struct nlmsghdr *nlh, void *data)
 527+ {
 528+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 529+-	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
 530++	struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {0};
 531+ 	struct health_ctx *ctx = data;
 532+ 	struct dl *dl = ctx->dl;
 533+ 
 534+diff --git a/devlink/mnlg.c b/devlink/mnlg.c
 535+index e6d92742..f906b252 100644
 536+--- a/devlink/mnlg.c
 537++++ b/devlink/mnlg.c
 538+@@ -70,7 +70,7 @@ static void parse_genl_mc_grps(struct nlattr *nested,
 539+ 	const char *name;
 540+ 
 541+ 	mnl_attr_for_each_nested(pos, nested) {
 542+-		struct nlattr *tb[CTRL_ATTR_MCAST_GRP_MAX + 1] = {};
 543++		struct nlattr *tb[CTRL_ATTR_MCAST_GRP_MAX + 1] = {0};
 544+ 
 545+ 		mnl_attr_parse_nested(pos, parse_mc_grps_cb, tb);
 546+ 		if (!tb[CTRL_ATTR_MCAST_GRP_NAME] ||
 547+@@ -104,7 +104,7 @@ static int get_group_id_attr_cb(const struct nlattr *attr, void *data)
 548+ static int get_group_id_cb(const struct nlmsghdr *nlh, void *data)
 549+ {
 550+ 	struct group_info *group_info = data;
 551+-	struct nlattr *tb[CTRL_ATTR_MAX + 1] = {};
 552++	struct nlattr *tb[CTRL_ATTR_MAX + 1] = {0};
 553+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
 554+ 
 555+ 	mnl_attr_parse(nlh, sizeof(*genl), get_group_id_attr_cb, tb);
 556+diff --git a/ip/ip6tunnel.c b/ip/ip6tunnel.c
 557+index c712d664..318e54b1 100644
 558+--- a/ip/ip6tunnel.c
 559++++ b/ip/ip6tunnel.c
 560+@@ -286,7 +286,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip6_tnl_parm2 *p)
 561+ 			if (get_ifname(p->name, *argv))
 562+ 				invarg("\"name\" not a valid ifname", *argv);
 563+ 			if (cmd == SIOCCHGTUNNEL && count == 0) {
 564+-				struct ip6_tnl_parm2 old_p = {};
 565++				struct ip6_tnl_parm2 old_p = {0};
 566+ 
 567+ 				if (tnl_get_ioctl(*argv, &old_p))
 568+ 					return -1;
 569+diff --git a/ip/ipaddress.c b/ip/ipaddress.c
 570+index 4109d8bd..cfd21f9a 100644
 571+--- a/ip/ipaddress.c
 572++++ b/ip/ipaddress.c
 573+@@ -165,7 +165,7 @@ static void print_queuelen(FILE *f, struct rtattr *tb[IFLA_MAX + 1])
 574+ 	if (tb[IFLA_TXQLEN])
 575+ 		qlen = rta_getattr_u32(tb[IFLA_TXQLEN]);
 576+ 	else {
 577+-		struct ifreq ifr = {};
 578++		struct ifreq ifr = {0};
 579+ 		int s = socket(AF_INET, SOCK_STREAM, 0);
 580+ 
 581+ 		if (s < 0)
 582+@@ -353,7 +353,7 @@ static void print_vfinfo(FILE *fp, struct ifinfomsg *ifi, struct rtattr *vfinfo)
 583+ 	struct ifla_vf_mac *vf_mac;
 584+ 	struct ifla_vf_broadcast *vf_broadcast;
 585+ 	struct ifla_vf_tx_rate *vf_tx_rate;
 586+-	struct rtattr *vf[IFLA_VF_MAX + 1] = {};
 587++	struct rtattr *vf[IFLA_VF_MAX + 1] = {0};
 588+ 
 589+ 	SPRINT_BUF(b1);
 590+ 
 591+@@ -2370,7 +2370,7 @@ static int ipaddr_modify(int cmd, int flags, int argc, char **argv)
 592+ 	char  *lcl_arg = NULL;
 593+ 	char  *valid_lftp = NULL;
 594+ 	char  *preferred_lftp = NULL;
 595+-	inet_prefix lcl = {};
 596++	inet_prefix lcl = {0};
 597+ 	inet_prefix peer;
 598+ 	int local_len = 0;
 599+ 	int peer_len = 0;
 600+@@ -2545,7 +2545,7 @@ static int ipaddr_modify(int cmd, int flags, int argc, char **argv)
 601+ 		return nodev(d);
 602+ 
 603+ 	if (valid_lftp || preferred_lftp) {
 604+-		struct ifa_cacheinfo cinfo = {};
 605++		struct ifa_cacheinfo cinfo = {0};
 606+ 
 607+ 		if (!valid_lft) {
 608+ 			fprintf(stderr, "valid_lft is zero\n");
 609+diff --git a/ip/ipaddrlabel.c b/ip/ipaddrlabel.c
 610+index beb08da3..c8a14940 100644
 611+--- a/ip/ipaddrlabel.c
 612++++ b/ip/ipaddrlabel.c
 613+@@ -148,7 +148,7 @@ static int ipaddrlabel_modify(int cmd, int argc, char **argv)
 614+ 		.ifal.ifal_family = preferred_family,
 615+ 	};
 616+ 
 617+-	inet_prefix prefix = {};
 618++	inet_prefix prefix = {0};
 619+ 	uint32_t label = 0xffffffffUL;
 620+ 	char *p = NULL;
 621+ 	char *l = NULL;
 622+diff --git a/ip/iplink.c b/ip/iplink.c
 623+index a3ea775d..10f6c2c6 100644
 624+--- a/ip/iplink.c
 625++++ b/ip/iplink.c
 626+@@ -1261,7 +1261,7 @@ static int set_mtu(const char *dev, int mtu)
 627+ 
 628+ static int get_address(const char *dev, int *htype)
 629+ {
 630+-	struct ifreq ifr = {};
 631++	struct ifreq ifr = {0};
 632+ 	struct sockaddr_ll me = {
 633+ 		.sll_family = AF_PACKET,
 634+ 		.sll_protocol = htons(ETH_P_LOOP),
 635+diff --git a/ip/iplink_can.c b/ip/iplink_can.c
 636+index f4b37528..2d3c1fc8 100644
 637+--- a/ip/iplink_can.c
 638++++ b/ip/iplink_can.c
 639+@@ -130,7 +130,7 @@ static void print_ctrlmode(enum output_type t, __u32 flags, const char* key)
 640+ static int can_parse_opt(struct link_util *lu, int argc, char **argv,
 641+ 			 struct nlmsghdr *n)
 642+ {
 643+-	struct can_bittiming bt = {}, dbt = {};
 644++	struct can_bittiming bt = {0}, dbt = {0};
 645+ 	struct can_ctrlmode cm = { 0 };
 646+ 	struct rtattr *tdc;
 647+ 	__u32 tdcv = -1, tdco = -1, tdcf = -1;
 648+diff --git a/ip/ipmaddr.c b/ip/ipmaddr.c
 649+index b7600424..3084b462 100644
 650+--- a/ip/ipmaddr.c
 651++++ b/ip/ipmaddr.c
 652+@@ -289,7 +289,7 @@ static int multiaddr_list(int argc, char **argv)
 653+ 
 654+ static int multiaddr_modify(int cmd, int argc, char **argv)
 655+ {
 656+-	struct ifreq ifr = {};
 657++	struct ifreq ifr = {0};
 658+ 	int family;
 659+ 	int fd, len;
 660+ 
 661+diff --git a/ip/ipntable.c b/ip/ipntable.c
 662+index 762c790d..2fa11a25 100644
 663+--- a/ip/ipntable.c
 664++++ b/ip/ipntable.c
 665+@@ -76,7 +76,7 @@ static int ipntable_modify(int cmd, int flags, int argc, char **argv)
 666+ 	char *namep = NULL;
 667+ 	char *threshsp = NULL;
 668+ 	char *gc_intp = NULL;
 669+-	char parms_buf[1024] = {};
 670++	char parms_buf[1024] = {0};
 671+ 	struct rtattr *parms_rta = (struct rtattr *)parms_buf;
 672+ 	int parms_change = 0;
 673+ 
 674+@@ -312,7 +312,7 @@ static int ipntable_modify(int cmd, int flags, int argc, char **argv)
 675+ static const char *ntable_strtime_delta(__u32 msec)
 676+ {
 677+ 	static char str[32];
 678+-	struct timeval now = {};
 679++	struct timeval now = {0};
 680+ 	time_t t;
 681+ 	struct tm *tp;
 682+ 
 683+diff --git a/ip/iptunnel.c b/ip/iptunnel.c
 684+index 7a0e7237..c6c99118 100644
 685+--- a/ip/iptunnel.c
 686++++ b/ip/iptunnel.c
 687+@@ -177,7 +177,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p)
 688+ 			if (get_ifname(p->name, *argv))
 689+ 				invarg("\"name\" not a valid ifname", *argv);
 690+ 			if (cmd == SIOCCHGTUNNEL && count == 0) {
 691+-				struct ip_tunnel_parm old_p = {};
 692++				struct ip_tunnel_parm old_p = {0};
 693+ 
 694+ 				if (tnl_get_ioctl(*argv, &old_p))
 695+ 					return -1;
 696+@@ -289,7 +289,7 @@ static int do_del(int argc, char **argv)
 697+ static void print_tunnel(const void *t)
 698+ {
 699+ 	const struct ip_tunnel_parm *p = t;
 700+-	struct ip_tunnel_6rd ip6rd = {};
 701++	struct ip_tunnel_6rd ip6rd = {0};
 702+ 	SPRINT_BUF(b1);
 703+ 
 704+ 	/* Do not use format_host() for local addr,
 705+@@ -311,7 +311,7 @@ static void print_tunnel(const void *t)
 706+ 				: "any");
 707+ 
 708+ 	if (p->iph.protocol == IPPROTO_IPV6 && (p->i_flags & SIT_ISATAP)) {
 709+-		struct ip_tunnel_prl prl[16] = {};
 710++		struct ip_tunnel_prl prl[16] = {0};
 711+ 		int i;
 712+ 
 713+ 		prl[0].datalen = sizeof(prl) - sizeof(prl[0]);
 714+@@ -434,7 +434,7 @@ static int do_show(int argc, char **argv)
 715+ 
 716+ static int do_prl(int argc, char **argv)
 717+ {
 718+-	struct ip_tunnel_prl p = {};
 719++	struct ip_tunnel_prl p = {0};
 720+ 	int count = 0;
 721+ 	int cmd = 0;
 722+ 	const char *medium = NULL;
 723+@@ -483,7 +483,7 @@ static int do_prl(int argc, char **argv)
 724+ 
 725+ static int do_6rd(int argc, char **argv)
 726+ {
 727+-	struct ip_tunnel_6rd ip6rd = {};
 728++	struct ip_tunnel_6rd ip6rd = {0};
 729+ 	int cmd = 0;
 730+ 	const char *medium = NULL;
 731+ 	inet_prefix prefix;
 732+diff --git a/ip/iptuntap.c b/ip/iptuntap.c
 733+index 9837b37e..f3167858 100644
 734+--- a/ip/iptuntap.c
 735++++ b/ip/iptuntap.c
 736+@@ -265,7 +265,7 @@ static void print_flags(long flags)
 737+ 
 738+ static void show_processes(const char *name)
 739+ {
 740+-	glob_t globbuf = { };
 741++	glob_t globbuf = {0};
 742+ 	char **fd_path;
 743+ 	int err;
 744+ 
 745+diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
 746+index 8eb5551f..11b32767 100644
 747+--- a/ip/ipxfrm.c
 748++++ b/ip/ipxfrm.c
 749+@@ -919,7 +919,7 @@ void xfrm_xfrma_print(struct rtattr *tb[], __u16 family,
 750+ 
 751+ static int xfrm_selector_iszero(struct xfrm_selector *s)
 752+ {
 753+-	struct xfrm_selector s0 = {};
 754++	struct xfrm_selector s0 = {0};
 755+ 
 756+ 	return (memcmp(&s0, s, sizeof(s0)) == 0);
 757+ }
 758+@@ -941,7 +941,7 @@ void xfrm_state_info_print(struct xfrm_usersa_info *xsinfo,
 759+ 			    struct rtattr *tb[], FILE *fp, const char *prefix,
 760+ 			    const char *title, bool nokeys)
 761+ {
 762+-	char buf[STRBUF_SIZE] = {};
 763++	char buf[STRBUF_SIZE] = {0};
 764+ 	int force_spi = xfrm_xfrmproto_is_ipsec(xsinfo->id.proto);
 765+ 
 766+ 	xfrm_id_info_print(&xsinfo->saddr, &xsinfo->id, xsinfo->mode,
 767+@@ -1012,7 +1012,7 @@ void xfrm_policy_info_print(struct xfrm_userpolicy_info *xpinfo,
 768+ 			    struct rtattr *tb[], FILE *fp, const char *prefix,
 769+ 			    const char *title)
 770+ {
 771+-	char buf[STRBUF_SIZE] = {};
 772++	char buf[STRBUF_SIZE] = {0};
 773+ 
 774+ 	xfrm_selector_print(&xpinfo->sel, preferred_family, fp, title);
 775+ 
 776+@@ -1102,8 +1102,8 @@ int xfrm_id_parse(xfrm_address_t *saddr, struct xfrm_id *id, __u16 *family,
 777+ {
 778+ 	int argc = *argcp;
 779+ 	char **argv = *argvp;
 780+-	inet_prefix dst = {};
 781+-	inet_prefix src = {};
 782++	inet_prefix dst = {0};
 783++	inet_prefix src = {0};
 784+ 
 785+ 	while (1) {
 786+ 		if (strcmp(*argv, "src") == 0) {
 787+@@ -1410,8 +1410,8 @@ int xfrm_selector_parse(struct xfrm_selector *sel, int *argcp, char ***argvp)
 788+ {
 789+ 	int argc = *argcp;
 790+ 	char **argv = *argvp;
 791+-	inet_prefix dst = {};
 792+-	inet_prefix src = {};
 793++	inet_prefix dst = {0};
 794++	inet_prefix src = {0};
 795+ 	char *upspecp = NULL;
 796+ 
 797+ 	while (1) {
 798+diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c
 799+index 4d825025..37b1b88a 100644
 800+--- a/ip/xfrm_policy.c
 801++++ b/ip/xfrm_policy.c
 802+@@ -259,14 +259,14 @@ static int xfrm_policy_modify(int cmd, unsigned int flags, int argc, char **argv
 803+ 	char *selp = NULL;
 804+ 	char *ptypep = NULL;
 805+ 	char *sctxp = NULL;
 806+-	struct xfrm_userpolicy_type upt = {};
 807+-	char tmpls_buf[XFRM_TMPLS_BUF_SIZE] = {};
 808++	struct xfrm_userpolicy_type upt = {0};
 809++	char tmpls_buf[XFRM_TMPLS_BUF_SIZE] = {0};
 810+ 	int tmpls_len = 0;
 811+ 	struct xfrm_mark mark = {0, 0};
 812+ 	struct {
 813+ 		struct xfrm_user_sec_ctx sctx;
 814+ 		char	str[CTX_BUF_SIZE];
 815+-	} ctx = {};
 816++	} ctx = {0};
 817+ 	bool is_if_id_set = false;
 818+ 	__u32 if_id = 0;
 819+ 
 820+@@ -579,12 +579,12 @@ static int xfrm_policy_get_or_delete(int argc, char **argv, int delete,
 821+ 	char *indexp = NULL;
 822+ 	char *ptypep = NULL;
 823+ 	char *sctxp = NULL;
 824+-	struct xfrm_userpolicy_type upt = {};
 825++	struct xfrm_userpolicy_type upt = {0};
 826+ 	struct xfrm_mark mark = {0, 0};
 827+ 	struct {
 828+ 		struct xfrm_user_sec_ctx sctx;
 829+ 		char    str[CTX_BUF_SIZE];
 830+-	} ctx = {};
 831++	} ctx = {0};
 832+ 	bool is_if_id_set = false;
 833+ 	__u32 if_id = 0;
 834+ 
 835+@@ -1265,7 +1265,7 @@ static int xfrm_policy_flush(int argc, char **argv)
 836+ 		.n.nlmsg_type = XFRM_MSG_FLUSHPOLICY,
 837+ 	};
 838+ 	char *ptypep = NULL;
 839+-	struct xfrm_userpolicy_type upt = {};
 840++	struct xfrm_userpolicy_type upt = {0};
 841+ 
 842+ 	while (argc > 0) {
 843+ 		if (strcmp(*argv, "ptype") == 0) {
 844+diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
 845+index 6fee7efd..628aeffd 100644
 846+--- a/ip/xfrm_state.c
 847++++ b/ip/xfrm_state.c
 848+@@ -307,9 +307,9 @@ static int xfrm_state_modify(int cmd, unsigned int flags, int argc, char **argv)
 849+ 		.xsinfo.lft.soft_packet_limit = XFRM_INF,
 850+ 		.xsinfo.lft.hard_packet_limit = XFRM_INF,
 851+ 	};
 852+-	struct xfrm_replay_state replay = {};
 853+-	struct xfrm_replay_state_esn replay_esn = {};
 854+-	struct xfrm_user_offload xuo = {};
 855++	struct xfrm_replay_state replay = {0};
 856++	struct xfrm_replay_state_esn replay_esn = {0};
 857++	struct xfrm_user_offload xuo = {0};
 858+ 	unsigned int ifindex = 0;
 859+ 	__u8 dir = 0;
 860+ 	bool is_offload = false;
 861+@@ -327,7 +327,7 @@ static int xfrm_state_modify(int cmd, unsigned int flags, int argc, char **argv)
 862+ 	struct {
 863+ 		struct xfrm_user_sec_ctx sctx;
 864+ 		char    str[CTX_BUF_SIZE];
 865+-	} ctx = {};
 866++	} ctx = {0};
 867+ 	struct xfrm_mark output_mark = {0, 0};
 868+ 	bool is_if_id_set = false;
 869+ 	__u32 if_id = 0;
 870+@@ -397,7 +397,7 @@ static int xfrm_state_modify(int cmd, unsigned int flags, int argc, char **argv)
 871+ 				  (void *)&encap, sizeof(encap));
 872+ 		} else if (strcmp(*argv, "coa") == 0) {
 873+ 			inet_prefix coa;
 874+-			xfrm_address_t xcoa = {};
 875++			xfrm_address_t xcoa = {0};
 876+ 
 877+ 			if (coap)
 878+ 				duparg("coa", *argv);
 879+@@ -489,7 +489,7 @@ static int xfrm_state_modify(int cmd, unsigned int flags, int argc, char **argv)
 880+ 						struct xfrm_algo_auth auth;
 881+ 					} u;
 882+ 					char buf[XFRM_ALGO_KEY_BUF_SIZE];
 883+-				} alg = {};
 884++				} alg = {0};
 885+ 				int len;
 886+ 				__u32 icvlen, trunclen;
 887+ 				char *name;
 888+diff --git a/lib/bpf_legacy.c b/lib/bpf_legacy.c
 889+index 6e3891c9..614ee1c6 100644
 890+--- a/lib/bpf_legacy.c
 891++++ b/lib/bpf_legacy.c
 892+@@ -148,7 +148,7 @@ static int bpf(int cmd, union bpf_attr *attr, unsigned int size)
 893+ static int bpf_map_update(int fd, const void *key, const void *value,
 894+ 			  uint64_t flags)
 895+ {
 896+-	union bpf_attr attr = {};
 897++	union bpf_attr attr = {0};
 898+ 
 899+ 	attr.map_fd = fd;
 900+ 	attr.key = bpf_ptr_to_u64(key);
 901+@@ -160,7 +160,7 @@ static int bpf_map_update(int fd, const void *key, const void *value,
 902+ 
 903+ static int bpf_prog_fd_by_id(uint32_t id)
 904+ {
 905+-	union bpf_attr attr = {};
 906++	union bpf_attr attr = {0};
 907+ 
 908+ 	attr.prog_id = id;
 909+ 
 910+@@ -170,7 +170,7 @@ static int bpf_prog_fd_by_id(uint32_t id)
 911+ static int bpf_prog_info_by_fd(int fd, struct bpf_prog_info *info,
 912+ 			       uint32_t *info_len)
 913+ {
 914+-	union bpf_attr attr = {};
 915++	union bpf_attr attr = {0};
 916+ 	int ret;
 917+ 
 918+ 	attr.info.bpf_fd = fd;
 919+@@ -187,7 +187,7 @@ static int bpf_prog_info_by_fd(int fd, struct bpf_prog_info *info,
 920+ 
 921+ int bpf_dump_prog_info(FILE *f, uint32_t id)
 922+ {
 923+-	struct bpf_prog_info info = {};
 924++	struct bpf_prog_info info = {0};
 925+ 	uint32_t len = sizeof(info);
 926+ 	int fd, ret, dump_ok = 0;
 927+ 	SPRINT_BUF(tmp);
 928+@@ -467,7 +467,7 @@ static int bpf_map_selfcheck_pinned(int fd, const struct bpf_elf_map *map,
 929+ 				    struct bpf_map_ext *ext, int length,
 930+ 				    enum bpf_prog_type type)
 931+ {
 932+-	struct bpf_elf_map tmp, zero = {};
 933++	struct bpf_elf_map tmp, zero = {0};
 934+ 	int ret;
 935+ 
 936+ 	ret = bpf_derive_elf_map_from_fdinfo(fd, &tmp, ext);
 937+@@ -709,7 +709,7 @@ static int bpf_gen_slave(const char *base, const char *name,
 938+ {
 939+ 	char bpf_lnk_dir[PATH_MAX + NAME_MAX + 1];
 940+ 	char bpf_sub_dir[PATH_MAX + NAME_MAX];
 941+-	struct stat sb = {};
 942++	struct stat sb = {0};
 943+ 	int ret;
 944+ 
 945+ 	snprintf(bpf_lnk_dir, sizeof(bpf_lnk_dir), "%s%s/", base, link);
 946+@@ -816,7 +816,7 @@ out:
 947+ 
 948+ static int bpf_obj_get(const char *pathname, enum bpf_prog_type type)
 949+ {
 950+-	union bpf_attr attr = {};
 951++	union bpf_attr attr = {0};
 952+ 	char tmp[PATH_MAX];
 953+ 
 954+ 	if (strlen(pathname) > 2 && pathname[0] == 'm' &&
 955+@@ -990,7 +990,7 @@ int bpf_load_common(struct bpf_cfg_in *cfg, const struct bpf_cfg_ops *ops,
 956+ 
 957+ int bpf_parse_common(struct bpf_cfg_in *cfg, const struct bpf_cfg_ops *ops)
 958+ {
 959+-	bool opt_tbl[BPF_MODE_MAX] = {};
 960++	bool opt_tbl[BPF_MODE_MAX] = {0};
 961+ 
 962+ 	if (ops->cbpf_cb) {
 963+ 		opt_tbl[CBPF_BYTECODE] = true;
 964+@@ -1033,7 +1033,7 @@ int bpf_graft_map(const char *map_path, uint32_t *key, int argc, char **argv)
 965+ 		.argc		= argc,
 966+ 		.argv		= argv,
 967+ 	};
 968+-	struct bpf_map_ext ext = {};
 969++	struct bpf_map_ext ext = {0};
 970+ 	int ret, prog_fd, map_fd;
 971+ 	uint32_t map_key;
 972+ 
 973+@@ -1086,7 +1086,7 @@ out_prog:
 974+ 
 975+ int bpf_prog_attach_fd(int prog_fd, int target_fd, enum bpf_attach_type type)
 976+ {
 977+-	union bpf_attr attr = {};
 978++	union bpf_attr attr = {0};
 979+ 
 980+ 	attr.target_fd = target_fd;
 981+ 	attr.attach_bpf_fd = prog_fd;
 982+@@ -1097,7 +1097,7 @@ int bpf_prog_attach_fd(int prog_fd, int target_fd, enum bpf_attach_type type)
 983+ 
 984+ int bpf_prog_detach_fd(int target_fd, enum bpf_attach_type type)
 985+ {
 986+-	union bpf_attr attr = {};
 987++	union bpf_attr attr = {0};
 988+ 
 989+ 	attr.target_fd = target_fd;
 990+ 	attr.attach_type = type;
 991+@@ -1109,7 +1109,7 @@ int bpf_prog_load_dev(enum bpf_prog_type type, const struct bpf_insn *insns,
 992+ 		      size_t size_insns, const char *license, __u32 ifindex,
 993+ 		      char *log, size_t size_log)
 994+ {
 995+-	union bpf_attr attr = {};
 996++	union bpf_attr attr = {0};
 997+ 
 998+ 	attr.prog_type = type;
 999+ 	attr.insns = bpf_ptr_to_u64(insns);
1000+@@ -1264,7 +1264,7 @@ static int bpf_map_create(enum bpf_map_type type, uint32_t size_key,
1001+ 			  uint32_t ifindex, uint32_t btf_id_key,
1002+ 			  uint32_t btf_id_val)
1003+ {
1004+-	union bpf_attr attr = {};
1005++	union bpf_attr attr = {0};
1006+ 
1007+ 	attr.map_type = type;
1008+ 	attr.key_size = size_key;
1009+@@ -1283,7 +1283,7 @@ static int bpf_map_create(enum bpf_map_type type, uint32_t size_key,
1010+ static int bpf_btf_load(void *btf, size_t size_btf,
1011+ 			char *log, size_t size_log)
1012+ {
1013+-	union bpf_attr attr = {};
1014++	union bpf_attr attr = {0};
1015+ 
1016+ 	attr.btf = bpf_ptr_to_u64(btf);
1017+ 	attr.btf_size = size_btf;
1018+@@ -1299,7 +1299,7 @@ static int bpf_btf_load(void *btf, size_t size_btf,
1019+ 
1020+ static int bpf_obj_pin(int fd, const char *pathname)
1021+ {
1022+-	union bpf_attr attr = {};
1023++	union bpf_attr attr = {0};
1024+ 
1025+ 	attr.pathname = bpf_ptr_to_u64(pathname);
1026+ 	attr.bpf_fd = fd;
1027+@@ -1984,7 +1984,7 @@ static int bpf_map_verify_all_offs(struct bpf_elf_ctx *ctx, int end)
1028+ 
1029+ static int bpf_fetch_maps_end(struct bpf_elf_ctx *ctx)
1030+ {
1031+-	struct bpf_elf_map fixup[ARRAY_SIZE(ctx->maps)] = {};
1032++	struct bpf_elf_map fixup[ARRAY_SIZE(ctx->maps)] = {0};
1033+ 	int i, sym_num = bpf_map_num_sym(ctx);
1034+ 	__u8 *buff;
1035+ 
1036+@@ -2490,7 +2490,7 @@ static int bpf_fetch_prog_relo(struct bpf_elf_ctx *ctx, const char *section,
1037+ 	int ret, idx, i, fd = -1;
1038+ 
1039+ 	for (i = 1; i < ctx->elf_hdr.e_shnum; i++) {
1040+-		struct bpf_relo_props props = {};
1041++		struct bpf_relo_props props = {0};
1042+ 
1043+ 		ret = bpf_fill_section_data(ctx, i, &data_relo);
1044+ 		if (ret < 0 || data_relo.sec_hdr.sh_type != SHT_REL)
1045+@@ -2665,7 +2665,7 @@ static int bpf_fill_prog_arrays(struct bpf_elf_ctx *ctx)
1046+ 		ret = bpf_map_update(ctx->map_fds[idx], &key_id,
1047+ 				     &fd, BPF_ANY);
1048+ 		if (ret < 0) {
1049+-			struct bpf_jited_aux aux = {};
1050++			struct bpf_jited_aux aux = {0};
1051+ 
1052+ 			ret = -errno;
1053+ 			if (errno == E2BIG) {
1054+@@ -2756,7 +2756,7 @@ static bool bpf_pinning_reserved(uint32_t pinning)
1055+ static void bpf_hash_init(struct bpf_elf_ctx *ctx, const char *db_file)
1056+ {
1057+ 	struct bpf_hash_entry *entry;
1058+-	char subpath[PATH_MAX] = {};
1059++	char subpath[PATH_MAX] = {0};
1060+ 	uint32_t pinning;
1061+ 	FILE *fp;
1062+ 	int ret;
1063+@@ -2854,7 +2854,7 @@ static void bpf_get_cfg(struct bpf_elf_ctx *ctx)
1064+ 
1065+ 	fd = open(path_jit, O_RDONLY);
1066+ 	if (fd >= 0) {
1067+-		char tmp[16] = {};
1068++		char tmp[16] = {0};
1069+ 
1070+ 		if (read(fd, tmp, sizeof(tmp)) > 0)
1071+ 			ctx->cfg.jit_enabled = atoi(tmp);
1072+diff --git a/lib/libnetlink.c b/lib/libnetlink.c
1073+index 7068750f..ea7e322e 100644
1074+--- a/lib/libnetlink.c
1075++++ b/lib/libnetlink.c
1076+@@ -84,7 +84,7 @@ static void print_ext_ack_msg(bool is_err, const char *msg)
1077+ /* dump netlink extended ack error message */
1078+ int nl_dump_ext_ack(const struct nlmsghdr *nlh, nl_ext_ack_fn_t errfn)
1079+ {
1080+-	struct nlattr *tb[NLMSGERR_ATTR_MAX + 1] = {};
1081++	struct nlattr *tb[NLMSGERR_ATTR_MAX + 1] = {0};
1082+ 	const struct nlmsgerr *err = mnl_nlmsg_get_payload(nlh);
1083+ 	const struct nlmsghdr *err_nlh = NULL;
1084+ 	unsigned int hlen = sizeof(*err);
1085+@@ -131,7 +131,7 @@ int nl_dump_ext_ack(const struct nlmsghdr *nlh, nl_ext_ack_fn_t errfn)
1086+ 
1087+ int nl_dump_ext_ack_done(const struct nlmsghdr *nlh, int error)
1088+ {
1089+-	struct nlattr *tb[NLMSGERR_ATTR_MAX + 1] = {};
1090++	struct nlattr *tb[NLMSGERR_ATTR_MAX + 1] = {0};
1091+ 	unsigned int hlen = sizeof(int);
1092+ 	const char *msg = NULL;
1093+ 
1094+@@ -951,7 +951,7 @@ int rtnl_dump_filter_nc(struct rtnl_handle *rth,
1095+ 			.filter = filter, .arg1 = arg1,
1096+ 			.nc_flags = nc_flags,
1097+ 		},
1098+-		{ },
1099++		{0},
1100+ 	};
1101+ 
1102+ 	return rtnl_dump_filter_l(rth, a);
1103+@@ -970,7 +970,7 @@ int rtnl_dump_filter_errhndlr_nc(struct rtnl_handle *rth,
1104+ 			.errhndlr = errhndlr, .arg2 = arg2,
1105+ 			.nc_flags = nc_flags,
1106+ 		},
1107+-		{ },
1108++		{0},
1109+ 	};
1110+ 
1111+ 	return rtnl_dump_filter_l(rth, a);
1112+diff --git a/lib/ll_map.c b/lib/ll_map.c
1113+index 70ea3d49..36320f77 100644
1114+--- a/lib/ll_map.c
1115++++ b/lib/ll_map.c
1116+@@ -279,7 +279,7 @@ static int ll_link_get(const char *name, int index)
1117+ 		.ifm.ifi_index = index,
1118+ 	};
1119+ 	__u32 filt_mask = RTEXT_FILTER_VF | RTEXT_FILTER_SKIP_STATS;
1120+-	struct rtnl_handle rth = {};
1121++	struct rtnl_handle rth = {0};
1122+ 	struct nlmsghdr *answer;
1123+ 	int rc = 0;
1124+ 
1125+diff --git a/lib/rt_names.c b/lib/rt_names.c
1126+index b976471d..0b13c66f 100644
1127+--- a/lib/rt_names.c
1128++++ b/lib/rt_names.c
1129+@@ -696,8 +696,7 @@ int nl_proto_a2n(__u32 *id, const char *arg)
1130+ }
1131+ 
1132+ #define PROTODOWN_REASON_NUM_BITS 32
1133+-static char *protodown_reason_tab[PROTODOWN_REASON_NUM_BITS] = {
1134+-};
1135++static char *protodown_reason_tab[PROTODOWN_REASON_NUM_BITS];
1136+ 
1137+ static int protodown_reason_init;
1138+ 
1139+diff --git a/misc/arpd.c b/misc/arpd.c
1140+index 504961cb..ac412e29 100644
1141+--- a/misc/arpd.c
1142++++ b/misc/arpd.c
1143+@@ -435,7 +435,7 @@ static void get_kern_msg(void)
1144+ {
1145+ 	int status;
1146+ 	struct nlmsghdr *h;
1147+-	struct sockaddr_nl nladdr = {};
1148++	struct sockaddr_nl nladdr = {0};
1149+ 	struct iovec iov;
1150+ 	char   buf[8192];
1151+ 	struct msghdr msg = {
1152+@@ -659,7 +659,7 @@ int main(int argc, char **argv)
1153+ 
1154+ 	if (ifnum) {
1155+ 		int i;
1156+-		struct ifreq ifr = {};
1157++		struct ifreq ifr = {0};
1158+ 
1159+ 		for (i = 0; i < ifnum; i++) {
1160+ 			if (get_ifname(ifr.ifr_name, ifnames[i]))
1161+diff --git a/misc/ss.c b/misc/ss.c
1162+index b39f63fe..eda95552 100644
1163+--- a/misc/ss.c
1164++++ b/misc/ss.c
1165+@@ -2682,7 +2682,7 @@ static void sctp_timer_print(struct tcpstat *s)
1166+ static int tcp_show_line(char *line, const struct filter *f, int family)
1167+ {
1168+ 	int rto = 0, ato = 0;
1169+-	struct tcpstat s = {};
1170++	struct tcpstat s = {0};
1171+ 	char *loc, *rem, *data;
1172+ 	char opt[256];
1173+ 	int n;
1174+@@ -2949,7 +2949,7 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
1175+ 		struct rtattr *tb[])
1176+ {
1177+ 	double rtt = 0;
1178+-	struct tcpstat s = {};
1179++	struct tcpstat s = {0};
1180+ 
1181+ 	s.ss.state = r->idiag_state;
1182+ 
1183+@@ -3295,7 +3295,7 @@ static int inet_show_sock(struct nlmsghdr *nlh,
1184+ 	inet_stats_print(s, v6only);
1185+ 
1186+ 	if (show_options) {
1187+-		struct tcpstat t = {};
1188++		struct tcpstat t = {0};
1189+ 
1190+ 		t.timer = r->idiag_timer;
1191+ 		t.timeout = r->idiag_expires;
1192+@@ -3572,7 +3572,7 @@ static int show_one_inet_sock(struct nlmsghdr *h, void *arg)
1193+ 	int err;
1194+ 	struct inet_diag_arg *diag_arg = arg;
1195+ 	struct inet_diag_msg *r = NLMSG_DATA(h);
1196+-	struct sockstat s = {};
1197++	struct sockstat s = {0};
1198+ 
1199+ 	if (!(diag_arg->f->families & FAMILY_MASK(r->idiag_family)))
1200+ 		return 0;
1201+@@ -3669,7 +3669,7 @@ static int tcp_show_netlink_file(struct filter *f)
1202+ 		int err2;
1203+ 		size_t status, nitems;
1204+ 		struct nlmsghdr *h = (struct nlmsghdr *)buf;
1205+-		struct sockstat s = {};
1206++		struct sockstat s = {0};
1207+ 
1208+ 		status = fread(buf, 1, sizeof(*h), fp);
1209+ 		if (status != sizeof(*h)) {
1210+@@ -3826,7 +3826,7 @@ static int sctp_show(struct filter *f)
1211+ 
1212+ static int dgram_show_line(char *line, const struct filter *f, int family)
1213+ {
1214+-	struct sockstat s = {};
1215++	struct sockstat s = {0};
1216+ 	char *loc, *rem, *data;
1217+ 	char opt[256];
1218+ 	int n;
1219+@@ -3966,7 +3966,7 @@ static bool unix_type_skip(struct sockstat *s, struct filter *f)
1220+ 
1221+ static void unix_stats_print(struct sockstat *s, struct filter *f)
1222+ {
1223+-	char port_name[30] = {};
1224++	char port_name[30] = {0};
1225+ 
1226+ 	sock_state_print(s);
1227+ 
1228+@@ -4279,7 +4279,7 @@ static int packet_show_sock(struct nlmsghdr *nlh, void *arg)
1229+ 	struct packet_diag_info *pinfo = NULL;
1230+ 	struct packet_diag_ring *ring_rx = NULL, *ring_tx = NULL;
1231+ 	struct rtattr *tb[PACKET_DIAG_MAX+1];
1232+-	struct sockstat stat = {};
1233++	struct sockstat stat = {0};
1234+ 	uint32_t fanout = 0;
1235+ 	bool has_fanout = false;
1236+ 
1237+@@ -4428,7 +4428,7 @@ static int packet_show_netlink(struct filter *f)
1238+ static int packet_show_line(char *buf, const struct filter *f, int fam)
1239+ {
1240+ 	unsigned long long sk;
1241+-	struct sockstat stat = {};
1242++	struct sockstat stat = {0};
1243+ 	int type, prot, iface, state, rq, uid, ino;
1244+ 
1245+ 	sscanf(buf, "%llx %*d %d %x %d %d %u %u %u",
1246+@@ -4568,7 +4568,7 @@ static int xdp_show_sock(struct nlmsghdr *nlh, void *arg)
1247+ 	struct xdp_diag_umem *umem = NULL;
1248+ 	struct xdp_diag_stats *stats = NULL;
1249+ 	const struct filter *f = arg;
1250+-	struct sockstat stat = {};
1251++	struct sockstat stat = {0};
1252+ 
1253+ 	parse_rtattr(tb, XDP_DIAG_MAX, (struct rtattr *)(msg + 1),
1254+ 		     nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*msg)));
1255+@@ -4653,9 +4653,9 @@ static int netlink_show_one(struct filter *f,
1256+ 		.remote.family	= AF_NETLINK,
1257+ 	};
1258+ 
1259+-	SPRINT_BUF(prot_buf) = {};
1260++	SPRINT_BUF(prot_buf) = {0};
1261+ 	const char *prot_name;
1262+-	char procname[64] = {};
1263++	char procname[64] = {0};
1264+ 
1265+ 	if (f->f) {
1266+ 		st.rport = -1;
1267+@@ -4902,8 +4902,8 @@ static void tipc_sock_addr_print(struct rtattr *net_addr, struct rtattr *id)
1268+ 	uint32_t node = rta_getattr_u32(net_addr);
1269+ 	uint32_t identity = rta_getattr_u32(id);
1270+ 
1271+-	SPRINT_BUF(addr) = {};
1272+-	SPRINT_BUF(port) = {};
1273++	SPRINT_BUF(addr) = {0};
1274++	SPRINT_BUF(port) = {0};
1275+ 
1276+ 	sprintf(addr, "%u", node);
1277+ 	sprintf(port, "%u", identity);
1278+@@ -4913,12 +4913,12 @@ static void tipc_sock_addr_print(struct rtattr *net_addr, struct rtattr *id)
1279+ 
1280+ static int tipc_show_sock(struct nlmsghdr *nlh, void *arg)
1281+ {
1282+-	struct rtattr *stat[TIPC_NLA_SOCK_STAT_MAX + 1] = {};
1283+-	struct rtattr *attrs[TIPC_NLA_SOCK_MAX + 1] = {};
1284+-	struct rtattr *con[TIPC_NLA_CON_MAX + 1] = {};
1285+-	struct rtattr *info[TIPC_NLA_MAX + 1] = {};
1286++	struct rtattr *stat[TIPC_NLA_SOCK_STAT_MAX + 1] = {0};
1287++	struct rtattr *attrs[TIPC_NLA_SOCK_MAX + 1] = {0};
1288++	struct rtattr *con[TIPC_NLA_CON_MAX + 1] = {0};
1289++	struct rtattr *info[TIPC_NLA_MAX + 1] = {0};
1290+ 	struct rtattr *msg_ref;
1291+-	struct sockstat ss = {};
1292++	struct sockstat ss = {0};
1293+ 
1294+ 	parse_rtattr(info, TIPC_NLA_MAX, NLMSG_DATA(nlh),
1295+ 		     NLMSG_PAYLOAD(nlh, 0));
1296+diff --git a/rdma/dev.c b/rdma/dev.c
1297+index c684dde4..92397f23 100644
1298+--- a/rdma/dev.c
1299++++ b/rdma/dev.c
1300+@@ -191,7 +191,7 @@ static void dev_print_node_type(struct rd *rd, struct nlattr **tb)
1301+ 
1302+ static int dev_parse_cb(const struct nlmsghdr *nlh, void *data)
1303+ {
1304+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1305++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1306+ 	struct rd *rd = data;
1307+ 	const char *name;
1308+ 	uint32_t idx;
1309+diff --git a/rdma/link.c b/rdma/link.c
1310+index bf24b849..620485f1 100644
1311+--- a/rdma/link.c
1312++++ b/rdma/link.c
1313+@@ -224,7 +224,7 @@ static void link_print_netdev(struct rd *rd, struct nlattr **tb)
1314+ 
1315+ static int link_parse_cb(const struct nlmsghdr *nlh, void *data)
1316+ {
1317+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1318++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1319+ 	struct rd *rd = data;
1320+ 	uint32_t port, idx;
1321+ 	const char *name;
1322+diff --git a/rdma/rdma.c b/rdma/rdma.c
1323+index 8dc2d3e3..cd72b9f2 100644
1324+--- a/rdma/rdma.c
1325++++ b/rdma/rdma.c
1326+@@ -99,7 +99,7 @@ int main(int argc, char **argv)
1327+ 	bool json_output = false;
1328+ 	bool show_raw = false;
1329+ 	bool force = false;
1330+-	struct rd rd = {};
1331++	struct rd rd = {0};
1332+ 	char *filename;
1333+ 	int opt;
1334+ 	int err;
1335+diff --git a/rdma/res-cmid.c b/rdma/res-cmid.c
1336+index bfaa47b5..6e07f048 100644
1337+--- a/rdma/res-cmid.c
1338++++ b/rdma/res-cmid.c
1339+@@ -206,7 +206,7 @@ out:	if (nla_line[RDMA_NLDEV_ATTR_RES_PID])
1340+ 
1341+ int res_cm_id_idx_parse_cb(const struct nlmsghdr *nlh, void *data)
1342+ {
1343+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1344++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1345+ 	struct rd *rd = data;
1346+ 	const char *name;
1347+ 	int idx;
1348+@@ -223,7 +223,7 @@ int res_cm_id_idx_parse_cb(const struct nlmsghdr *nlh, void *data)
1349+ 
1350+ int res_cm_id_parse_cb(const struct nlmsghdr *nlh, void *data)
1351+ {
1352+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1353++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1354+ 	struct nlattr *nla_table, *nla_entry;
1355+ 	struct rd *rd = data;
1356+ 	int ret = MNL_CB_OK;
1357+@@ -240,7 +240,7 @@ int res_cm_id_parse_cb(const struct nlmsghdr *nlh, void *data)
1358+ 	nla_table = tb[RDMA_NLDEV_ATTR_RES_CM_ID];
1359+ 
1360+ 	mnl_attr_for_each_nested(nla_entry, nla_table) {
1361+-		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {};
1362++		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {0};
1363+ 
1364+ 		ret = mnl_attr_parse_nested(nla_entry, rd_attr_cb, nla_line);
1365+ 		if (ret != MNL_CB_OK)
1366+diff --git a/rdma/res-cq.c b/rdma/res-cq.c
1367+index 9e7c4f51..8c875a1c 100644
1368+--- a/rdma/res-cq.c
1369++++ b/rdma/res-cq.c
1370+@@ -130,7 +130,7 @@ out:	if (nla_line[RDMA_NLDEV_ATTR_RES_PID])
1371+ 
1372+ int res_cq_idx_parse_cb(const struct nlmsghdr *nlh, void *data)
1373+ {
1374+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1375++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1376+ 	struct rd *rd = data;
1377+ 	const char *name;
1378+ 	uint32_t idx;
1379+@@ -148,7 +148,7 @@ int res_cq_idx_parse_cb(const struct nlmsghdr *nlh, void *data)
1380+ 
1381+ int res_cq_parse_cb(const struct nlmsghdr *nlh, void *data)
1382+ {
1383+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1384++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1385+ 	struct nlattr *nla_table, *nla_entry;
1386+ 	struct rd *rd = data;
1387+ 	int ret = MNL_CB_OK;
1388+@@ -165,7 +165,7 @@ int res_cq_parse_cb(const struct nlmsghdr *nlh, void *data)
1389+ 	nla_table = tb[RDMA_NLDEV_ATTR_RES_CQ];
1390+ 
1391+ 	mnl_attr_for_each_nested(nla_entry, nla_table) {
1392+-		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {};
1393++		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {0};
1394+ 
1395+ 		ret = mnl_attr_parse_nested(nla_entry, rd_attr_cb, nla_line);
1396+ 		if (ret != MNL_CB_OK)
1397+diff --git a/rdma/res-mr.c b/rdma/res-mr.c
1398+index 1bf73f3a..1d060614 100644
1399+--- a/rdma/res-mr.c
1400++++ b/rdma/res-mr.c
1401+@@ -94,7 +94,7 @@ out:
1402+ 
1403+ int res_mr_idx_parse_cb(const struct nlmsghdr *nlh, void *data)
1404+ {
1405+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1406++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1407+ 	struct rd *rd = data;
1408+ 	const char *name;
1409+ 	uint32_t idx;
1410+@@ -112,7 +112,7 @@ int res_mr_idx_parse_cb(const struct nlmsghdr *nlh, void *data)
1411+ 
1412+ int res_mr_parse_cb(const struct nlmsghdr *nlh, void *data)
1413+ {
1414+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1415++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1416+ 	struct nlattr *nla_table, *nla_entry;
1417+ 	struct rd *rd = data;
1418+ 	int ret = MNL_CB_OK;
1419+@@ -129,7 +129,7 @@ int res_mr_parse_cb(const struct nlmsghdr *nlh, void *data)
1420+ 	nla_table = tb[RDMA_NLDEV_ATTR_RES_MR];
1421+ 
1422+ 	mnl_attr_for_each_nested(nla_entry, nla_table) {
1423+-		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {};
1424++		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {0};
1425+ 
1426+ 		ret = mnl_attr_parse_nested(nla_entry, rd_attr_cb, nla_line);
1427+ 		if (ret != MNL_CB_OK)
1428+diff --git a/rdma/res-pd.c b/rdma/res-pd.c
1429+index df538010..6179d788 100644
1430+--- a/rdma/res-pd.c
1431++++ b/rdma/res-pd.c
1432+@@ -83,7 +83,7 @@ out:	if (nla_line[RDMA_NLDEV_ATTR_RES_PID])
1433+ 
1434+ int res_pd_idx_parse_cb(const struct nlmsghdr *nlh, void *data)
1435+ {
1436+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1437++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1438+ 	struct rd *rd = data;
1439+ 	const char *name;
1440+ 	uint32_t idx;
1441+@@ -100,7 +100,7 @@ int res_pd_idx_parse_cb(const struct nlmsghdr *nlh, void *data)
1442+ 
1443+ int res_pd_parse_cb(const struct nlmsghdr *nlh, void *data)
1444+ {
1445+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1446++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1447+ 	struct nlattr *nla_table, *nla_entry;
1448+ 	struct rd *rd = data;
1449+ 	int ret = MNL_CB_OK;
1450+@@ -117,7 +117,7 @@ int res_pd_parse_cb(const struct nlmsghdr *nlh, void *data)
1451+ 	nla_table = tb[RDMA_NLDEV_ATTR_RES_PD];
1452+ 
1453+ 	mnl_attr_for_each_nested(nla_entry, nla_table) {
1454+-		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {};
1455++		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {0};
1456+ 
1457+ 		ret = mnl_attr_parse_nested(nla_entry, rd_attr_cb, nla_line);
1458+ 		if (ret != MNL_CB_OK)
1459+diff --git a/rdma/res-qp.c b/rdma/res-qp.c
1460+index a38be399..48b9ee1c 100644
1461+--- a/rdma/res-qp.c
1462++++ b/rdma/res-qp.c
1463+@@ -186,7 +186,7 @@ out:
1464+ 
1465+ int res_qp_idx_parse_cb(const struct nlmsghdr *nlh, void *data)
1466+ {
1467+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1468++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1469+ 	struct rd *rd = data;
1470+ 	const char *name;
1471+ 	uint32_t idx;
1472+@@ -204,7 +204,7 @@ int res_qp_idx_parse_cb(const struct nlmsghdr *nlh, void *data)
1473+ 
1474+ int res_qp_parse_cb(const struct nlmsghdr *nlh, void *data)
1475+ {
1476+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1477++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1478+ 	struct nlattr *nla_table, *nla_entry;
1479+ 	struct rd *rd = data;
1480+ 	int ret = MNL_CB_OK;
1481+@@ -221,7 +221,7 @@ int res_qp_parse_cb(const struct nlmsghdr *nlh, void *data)
1482+ 	nla_table = tb[RDMA_NLDEV_ATTR_RES_QP];
1483+ 
1484+ 	mnl_attr_for_each_nested(nla_entry, nla_table) {
1485+-		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {};
1486++		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {0};
1487+ 
1488+ 		ret = mnl_attr_parse_nested(nla_entry, rd_attr_cb, nla_line);
1489+ 		if (ret != MNL_CB_OK)
1490+diff --git a/rdma/res.c b/rdma/res.c
1491+index 9aae5d4b..a56a09f0 100644
1492+--- a/rdma/res.c
1493++++ b/rdma/res.c
1494+@@ -38,7 +38,7 @@ static int res_print_summary(struct rd *rd, struct nlattr **tb)
1495+ 	int err;
1496+ 
1497+ 	mnl_attr_for_each_nested(nla_entry, nla_table) {
1498+-		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {};
1499++		struct nlattr *nla_line[RDMA_NLDEV_ATTR_MAX] = {0};
1500+ 
1501+ 		err = mnl_attr_parse_nested(nla_entry, rd_attr_cb, nla_line);
1502+ 		if (err != MNL_CB_OK)
1503+@@ -65,7 +65,7 @@ static int res_no_args_idx_parse_cb(const struct nlmsghdr *nlh, void *data)
1504+ 
1505+ static int res_no_args_parse_cb(const struct nlmsghdr *nlh, void *data)
1506+ {
1507+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1508++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1509+ 	struct rd *rd = data;
1510+ 	const char *name;
1511+ 	uint32_t idx;
1512+diff --git a/rdma/utils.c b/rdma/utils.c
1513+index 21177b56..b57dddd1 100644
1514+--- a/rdma/utils.c
1515++++ b/rdma/utils.c
1516+@@ -504,7 +504,7 @@ int rd_attr_cb(const struct nlattr *attr, void *data)
1517+ 
1518+ int rd_dev_init_cb(const struct nlmsghdr *nlh, void *data)
1519+ {
1520+-	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {};
1521++	struct nlattr *tb[RDMA_NLDEV_ATTR_MAX] = {0};
1522+ 	struct dev_map *dev_map;
1523+ 	struct rd *rd = data;
1524+ 	const char *dev_name;
1525+diff --git a/tc/e_bpf.c b/tc/e_bpf.c
1526+index 517ee5b3..daf673f9 100644
1527+--- a/tc/e_bpf.c
1528++++ b/tc/e_bpf.c
1529+@@ -58,8 +58,8 @@ static int parse_bpf(struct exec_util *eu, int argc, char **argv)
1530+ 	char **argv_run = argv_default, **envp_run, *tmp;
1531+ 	int ret, i, env_old, env_num, env_map;
1532+ 	const char *bpf_uds_name = NULL;
1533+-	int fds[BPF_SCM_MAX_FDS] = {};
1534+-	struct bpf_map_aux aux = {};
1535++	int fds[BPF_SCM_MAX_FDS] = {0};
1536++	struct bpf_map_aux aux = {0};
1537+ 
1538+ 	if (argc == 0)
1539+ 		return 0;
1540+diff --git a/tc/em_cmp.c b/tc/em_cmp.c
1541+index e051656f..abe2cd93 100644
1542+--- a/tc/em_cmp.c
1543++++ b/tc/em_cmp.c
1544+@@ -43,7 +43,7 @@ static int cmp_parse_eopt(struct nlmsghdr *n, struct tcf_ematch_hdr *hdr,
1545+ 	int align, opnd = 0;
1546+ 	unsigned long offset = 0, layer = TCF_LAYER_NETWORK, mask = 0, value = 0;
1547+ 	int offset_present = 0, value_present = 0;
1548+-	struct tcf_em_cmp cmp = {};
1549++	struct tcf_em_cmp cmp = {0};
1550+ 
1551+ #define PARSE_ERR(CARG, FMT, ARGS...) \
1552+ 	em_parse_error(EINVAL, args, CARG, &cmp_ematch_util, FMT, ##ARGS)
1553+diff --git a/tc/em_ipset.c b/tc/em_ipset.c
1554+index 48b287f5..08d83401 100644
1555+--- a/tc/em_ipset.c
1556++++ b/tc/em_ipset.c
1557+@@ -198,7 +198,7 @@ static void ipset_print_usage(FILE *fd)
1558+ static int ipset_parse_eopt(struct nlmsghdr *n, struct tcf_ematch_hdr *hdr,
1559+ 			    struct bstr *args)
1560+ {
1561+-	struct xt_set_info set_info = {};
1562++	struct xt_set_info set_info = {0};
1563+ 	int ret;
1564+ 
1565+ #define PARSE_ERR(CARG, FMT, ARGS...) \
1566+diff --git a/tc/em_meta.c b/tc/em_meta.c
1567+index 2ddc65ed..6d0755c5 100644
1568+--- a/tc/em_meta.c
1569++++ b/tc/em_meta.c
1570+@@ -360,7 +360,7 @@ static int meta_parse_eopt(struct nlmsghdr *n, struct tcf_ematch_hdr *hdr,
1571+ {
1572+ 	int opnd;
1573+ 	struct bstr *a;
1574+-	struct tcf_meta_hdr meta_hdr = {};
1575++	struct tcf_meta_hdr meta_hdr = {0};
1576+ 	unsigned long lvalue = 0, rvalue = 0;
1577+ 
1578+ 	if (args == NULL)
1579+diff --git a/tc/em_nbyte.c b/tc/em_nbyte.c
1580+index 274d713f..1e72bdf4 100644
1581+--- a/tc/em_nbyte.c
1582++++ b/tc/em_nbyte.c
1583+@@ -43,7 +43,7 @@ static int nbyte_parse_eopt(struct nlmsghdr *n, struct tcf_ematch_hdr *hdr,
1584+ 	struct bstr *needle = args;
1585+ 	unsigned long offset = 0, layer = TCF_LAYER_NETWORK;
1586+ 	int offset_present = 0;
1587+-	struct tcf_em_nbyte nb = {};
1588++	struct tcf_em_nbyte nb = {0};
1589+ 
1590+ #define PARSE_ERR(CARG, FMT, ARGS...) \
1591+ 	em_parse_error(EINVAL, args, CARG, &nbyte_ematch_util, FMT, ##ARGS)
1592+diff --git a/tc/em_u32.c b/tc/em_u32.c
1593+index bc284af4..efebb2dc 100644
1594+--- a/tc/em_u32.c
1595++++ b/tc/em_u32.c
1596+@@ -38,7 +38,7 @@ static int u32_parse_eopt(struct nlmsghdr *n, struct tcf_ematch_hdr *hdr,
1597+ 	struct bstr *a;
1598+ 	int align, nh_len;
1599+ 	unsigned long key, mask, offmask = 0, offset;
1600+-	struct tc_u32_key u_key = {};
1601++	struct tc_u32_key u_key = {0};
1602+ 
1603+ #define PARSE_ERR(CARG, FMT, ARGS...) \
1604+ 	em_parse_error(EINVAL, args, CARG, &u32_ematch_util, FMT, ##ARGS)
1605+diff --git a/tc/f_bpf.c b/tc/f_bpf.c
1606+index fa3552ae..33462d0b 100644
1607+--- a/tc/f_bpf.c
1608++++ b/tc/f_bpf.c
1609+@@ -82,7 +82,7 @@ static int bpf_parse_opt(struct filter_util *qu, char *handle,
1610+ 	struct tcmsg *t = NLMSG_DATA(n);
1611+ 	unsigned int bpf_gen_flags = 0;
1612+ 	unsigned int bpf_flags = 0;
1613+-	struct bpf_cfg_in cfg = {};
1614++	struct bpf_cfg_in cfg = {0};
1615+ 	bool seen_run = false;
1616+ 	bool skip_sw = false;
1617+ 	struct rtattr *tail;
1618+diff --git a/tc/f_fw.c b/tc/f_fw.c
1619+index 688364f5..55fcc3cc 100644
1620+--- a/tc/f_fw.c
1621++++ b/tc/f_fw.c
1622+@@ -93,7 +93,7 @@ static int fw_parse_opt(struct filter_util *qu, char *handle, int argc, char **a
1623+ 			}
1624+ 			continue;
1625+ 		} else if (strcmp(*argv, "indev") == 0) {
1626+-			char d[IFNAMSIZ+1] = {};
1627++			char d[IFNAMSIZ+1] = {0};
1628+ 
1629+ 			argc--;
1630+ 			argv++;
1631+diff --git a/tc/f_rsvp.c b/tc/f_rsvp.c
1632+index 388e9ee5..e6eb0147 100644
1633+--- a/tc/f_rsvp.c
1634++++ b/tc/f_rsvp.c
1635+@@ -174,7 +174,7 @@ static int rsvp_parse_opt(struct filter_util *qu, char *handle, int argc,
1636+ 			  char **argv, struct nlmsghdr *n)
1637+ {
1638+ 	int family = strcmp(qu->id, "rsvp") == 0 ? AF_INET : AF_INET6;
1639+-	struct tc_rsvp_pinfo pinfo = {};
1640++	struct tc_rsvp_pinfo pinfo = {0};
1641+ 	struct tcmsg *t = NLMSG_DATA(n);
1642+ 	int pinfo_ok = 0;
1643+ 	struct rtattr *tail;
1644+diff --git a/tc/f_u32.c b/tc/f_u32.c
1645+index a5747f67..062e67c4 100644
1646+--- a/tc/f_u32.c
1647++++ b/tc/f_u32.c
1648+@@ -991,7 +991,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,
1649+ 	struct {
1650+ 		struct tc_u32_sel sel;
1651+ 		struct tc_u32_key keys[128];
1652+-	} sel = {};
1653++	} sel = {0};
1654+ 	struct tcmsg *t = NLMSG_DATA(n);
1655+ 	struct rtattr *tail;
1656+ 	int sel_ok = 0, terminal_ok = 0;
1657+@@ -1096,7 +1096,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,
1658+ 			struct {
1659+ 				struct tc_u32_sel sel;
1660+ 				struct tc_u32_key keys[4];
1661+-			} sel2 = {};
1662++			} sel2 = {0};
1663+ 
1664+ 			NEXT_ARG();
1665+ 			if (parse_selector(&argc, &argv, &sel2.sel, n)) {
1666+@@ -1122,7 +1122,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,
1667+ 			sample_ok = 1;
1668+ 			continue;
1669+ 		} else if (strcmp(*argv, "indev") == 0) {
1670+-			char ind[IFNAMSIZ + 1] = {};
1671++			char ind[IFNAMSIZ + 1] = {0};
1672+ 
1673+ 			argc--;
1674+ 			argv++;
1675+diff --git a/tc/m_bpf.c b/tc/m_bpf.c
1676+index af5ba5ce..ec11be6d 100644
1677+--- a/tc/m_bpf.c
1678++++ b/tc/m_bpf.c
1679+@@ -77,8 +77,8 @@ static int bpf_parse_opt(struct action_util *a, int *ptr_argc, char ***ptr_argv,
1680+ 			 int tca_id, struct nlmsghdr *n)
1681+ {
1682+ 	const char *bpf_obj = NULL, *bpf_uds_name = NULL;
1683+-	struct tc_act_bpf parm = {};
1684+-	struct bpf_cfg_in cfg = {};
1685++	struct tc_act_bpf parm = {0};
1686++	struct bpf_cfg_in cfg = {0};
1687+ 	bool seen_run = false;
1688+ 	struct rtattr *tail;
1689+ 	int argc, ret = 0;
1690+diff --git a/tc/m_connmark.c b/tc/m_connmark.c
1691+index 640bba9d..877d6e35 100644
1692+--- a/tc/m_connmark.c
1693++++ b/tc/m_connmark.c
1694+@@ -46,7 +46,7 @@ static int
1695+ parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
1696+ 	      struct nlmsghdr *n)
1697+ {
1698+-	struct tc_connmark sel = {};
1699++	struct tc_connmark sel = {0};
1700+ 	char **argv = *argv_p;
1701+ 	int argc = *argc_p;
1702+ 	int ok = 0;
1703+diff --git a/tc/m_csum.c b/tc/m_csum.c
1704+index 23c59725..9115a2d9 100644
1705+--- a/tc/m_csum.c
1706++++ b/tc/m_csum.c
1707+@@ -88,7 +88,7 @@ static int
1708+ parse_csum(struct action_util *a, int *argc_p,
1709+ 	   char ***argv_p, int tca_id, struct nlmsghdr *n)
1710+ {
1711+-	struct tc_csum sel = {};
1712++	struct tc_csum sel = {0};
1713+ 
1714+ 	int argc = *argc_p;
1715+ 	char **argv = *argv_p;
1716+diff --git a/tc/m_mirred.c b/tc/m_mirred.c
1717+index 38d8043b..30111430 100644
1718+--- a/tc/m_mirred.c
1719++++ b/tc/m_mirred.c
1720+@@ -96,9 +96,9 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p,
1721+ 	int argc = *argc_p;
1722+ 	char **argv = *argv_p;
1723+ 	int ok = 0, iok = 0, mirror = 0, redir = 0, ingress = 0, egress = 0;
1724+-	struct tc_mirred p = {};
1725++	struct tc_mirred p = {0};
1726+ 	struct rtattr *tail;
1727+-	char d[IFNAMSIZ] = {};
1728++	char d[IFNAMSIZ] = {0};
1729+ 
1730+ 	while (argc > 0) {
1731+ 
1732+diff --git a/tc/m_nat.c b/tc/m_nat.c
1733+index 654f9a3b..9ed1613c 100644
1734+--- a/tc/m_nat.c
1735++++ b/tc/m_nat.c
1736+@@ -83,7 +83,7 @@ bad_val:
1737+ static int
1738+ parse_nat(struct action_util *a, int *argc_p, char ***argv_p, int tca_id, struct nlmsghdr *n)
1739+ {
1740+-	struct tc_nat sel = {};
1741++	struct tc_nat sel = {0};
1742+ 
1743+ 	int argc = *argc_p;
1744+ 	char **argv = *argv_p;
1745+diff --git a/tc/m_pedit.c b/tc/m_pedit.c
1746+index 54949e43..85085c8b 100644
1747+--- a/tc/m_pedit.c
1748++++ b/tc/m_pedit.c
1749+@@ -524,7 +524,7 @@ done:
1750+ 
1751+ static int parse_munge(int *argc_p, char ***argv_p, struct m_pedit_sel *sel)
1752+ {
1753+-	struct m_pedit_key tkey = {};
1754++	struct m_pedit_key tkey = {0};
1755+ 	int argc = *argc_p;
1756+ 	char **argv = *argv_p;
1757+ 	int res = -1;
1758+@@ -628,7 +628,7 @@ static int pedit_keys_ex_addattr(struct m_pedit_sel *sel, struct nlmsghdr *n)
1759+ static int parse_pedit(struct action_util *a, int *argc_p, char ***argv_p,
1760+ 		       int tca_id, struct nlmsghdr *n)
1761+ {
1762+-	struct m_pedit_sel sel = {};
1763++	struct m_pedit_sel sel = {0};
1764+ 
1765+ 	int argc = *argc_p;
1766+ 	char **argv = *argv_p;
1767+diff --git a/tc/m_simple.c b/tc/m_simple.c
1768+index bc86be27..79d1c786 100644
1769+--- a/tc/m_simple.c
1770++++ b/tc/m_simple.c
1771+@@ -97,7 +97,7 @@ static int
1772+ parse_simple(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
1773+ 	     struct nlmsghdr *n)
1774+ {
1775+-	struct tc_defact sel = {};
1776++	struct tc_defact sel = {0};
1777+ 	int argc = *argc_p;
1778+ 	char **argv = *argv_p;
1779+ 	int ok = 0;
1780+diff --git a/tc/m_tunnel_key.c b/tc/m_tunnel_key.c
1781+index ca0dff11..4d97b38d 100644
1782+--- a/tc/m_tunnel_key.c
1783++++ b/tc/m_tunnel_key.c
1784+@@ -317,7 +317,7 @@ static int tunnel_key_parse_tos_ttl(char *str, int type, struct nlmsghdr *n)
1785+ static int parse_tunnel_key(struct action_util *a, int *argc_p, char ***argv_p,
1786+ 			    int tca_id, struct nlmsghdr *n)
1787+ {
1788+-	struct tc_tunnel_key parm = {};
1789++	struct tc_tunnel_key parm = {0};
1790+ 	char **argv = *argv_p;
1791+ 	int argc = *argc_p;
1792+ 	struct rtattr *tail;
1793+diff --git a/tc/m_vlan.c b/tc/m_vlan.c
1794+index 1b2b1d51..ba7db457 100644
1795+--- a/tc/m_vlan.c
1796++++ b/tc/m_vlan.c
1797+@@ -77,7 +77,7 @@ static int parse_vlan(struct action_util *a, int *argc_p, char ***argv_p,
1798+ 	int proto_set = 0;
1799+ 	__u8 prio;
1800+ 	int prio_set = 0;
1801+-	struct tc_vlan parm = {};
1802++	struct tc_vlan parm = {0};
1803+ 
1804+ 	if (matches(*argv, "vlan") != 0)
1805+ 		return -1;
1806+diff --git a/tc/m_xt.c b/tc/m_xt.c
1807+index deaf96a2..af250574 100644
1808+--- a/tc/m_xt.c
1809++++ b/tc/m_xt.c
1810+@@ -147,7 +147,7 @@ static int parse_ipt(struct action_util *a, int *argc_p,
1811+ {
1812+ 	struct xtables_target *m = NULL;
1813+ #if XTABLES_VERSION_CODE >= 6
1814+-	struct ipt_entry fw = {};
1815++	struct ipt_entry fw = {0};
1816+ #endif
1817+ 	struct rtattr *tail;
1818+ 
1819+diff --git a/tc/q_atm.c b/tc/q_atm.c
1820+index 77b56825..c0acf492 100644
1821+--- a/tc/q_atm.c
1822++++ b/tc/q_atm.c
1823+@@ -49,7 +49,7 @@ static void explain(void)
1824+ static int atm_parse_class_opt(struct qdisc_util *qu, int argc, char **argv,
1825+ 	struct nlmsghdr *n, const char *dev)
1826+ {
1827+-	struct sockaddr_atmsvc addr = {};
1828++	struct sockaddr_atmsvc addr = {0};
1829+ 	struct atm_qos qos;
1830+ 	struct atm_sap sap;
1831+ 	unsigned char hdr[MAX_HDR_LEN];
1832+diff --git a/tc/q_cbq.c b/tc/q_cbq.c
1833+index 4619a37b..965f5ffa 100644
1834+--- a/tc/q_cbq.c
1835++++ b/tc/q_cbq.c
1836+@@ -50,8 +50,8 @@ static void explain1(char *arg)
1837+ 
1838+ static int cbq_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n, const char *dev)
1839+ {
1840+-	struct tc_ratespec r = {};
1841+-	struct tc_cbq_lssopt lss = {};
1842++	struct tc_ratespec r = {0};
1843++	struct tc_cbq_lssopt lss = {0};
1844+ 	__u32 rtab[256];
1845+ 	unsigned mpu = 0, avpkt = 0, allot = 0;
1846+ 	unsigned short overhead = 0;
1847+@@ -185,10 +185,10 @@ static int cbq_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nl
1848+ static int cbq_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n, const char *dev)
1849+ {
1850+ 	int wrr_ok = 0, fopt_ok = 0;
1851+-	struct tc_ratespec r = {};
1852+-	struct tc_cbq_lssopt lss = {};
1853+-	struct tc_cbq_wrropt wrr = {};
1854+-	struct tc_cbq_fopt fopt = {};
1855++	struct tc_ratespec r = {0};
1856++	struct tc_cbq_lssopt lss = {0};
1857++	struct tc_cbq_wrropt wrr = {0};
1858++	struct tc_cbq_fopt fopt = {0};
1859+ 	__u32 rtab[256];
1860+ 	unsigned mpu = 0;
1861+ 	int cell_log =  -1;
1862+diff --git a/tc/q_cbs.c b/tc/q_cbs.c
1863+index 13bb08e9..a32aa6c1 100644
1864+--- a/tc/q_cbs.c
1865++++ b/tc/q_cbs.c
1866+@@ -37,7 +37,7 @@ static void explain1(const char *arg, const char *val)
1867+ static int cbs_parse_opt(struct qdisc_util *qu, int argc,
1868+ 			 char **argv, struct nlmsghdr *n, const char *dev)
1869+ {
1870+-	struct tc_cbs_qopt opt = {};
1871++	struct tc_cbs_qopt opt = {0};
1872+ 	struct rtattr *tail;
1873+ 
1874+ 	while (argc > 0) {
1875+diff --git a/tc/q_choke.c b/tc/q_choke.c
1876+index 570c3599..aa354d5d 100644
1877+--- a/tc/q_choke.c
1878++++ b/tc/q_choke.c
1879+@@ -34,7 +34,7 @@ static void explain(void)
1880+ static int choke_parse_opt(struct qdisc_util *qu, int argc, char **argv,
1881+ 			   struct nlmsghdr *n, const char *dev)
1882+ {
1883+-	struct tc_red_qopt opt = {};
1884++	struct tc_red_qopt opt = {0};
1885+ 	unsigned int burst = 0;
1886+ 	unsigned int avpkt = 1000;
1887+ 	double probability = 0.02;
1888+diff --git a/tc/q_codel.c b/tc/q_codel.c
1889+index c72a5779..a000bcdd 100644
1890+--- a/tc/q_codel.c
1891++++ b/tc/q_codel.c
1892+@@ -180,7 +180,7 @@ static int codel_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
1893+ static int codel_print_xstats(struct qdisc_util *qu, FILE *f,
1894+ 			      struct rtattr *xstats)
1895+ {
1896+-	struct tc_codel_xstats _st = {}, *st;
1897++	struct tc_codel_xstats _st = {0}, *st;
1898+ 
1899+ 	SPRINT_BUF(b1);
1900+ 
1901+diff --git a/tc/q_fifo.c b/tc/q_fifo.c
1902+index ce82e74d..183878d9 100644
1903+--- a/tc/q_fifo.c
1904++++ b/tc/q_fifo.c
1905+@@ -31,7 +31,7 @@ static int fifo_parse_opt(struct qdisc_util *qu, int argc, char **argv,
1906+ 			  struct nlmsghdr *n, const char *dev)
1907+ {
1908+ 	int ok = 0;
1909+-	struct tc_fifo_qopt opt = {};
1910++	struct tc_fifo_qopt opt = {0};
1911+ 
1912+ 	while (argc > 0) {
1913+ 		if (strcmp(*argv, "limit") == 0) {
1914+diff --git a/tc/q_fq_codel.c b/tc/q_fq_codel.c
1915+index 30098065..deba3f85 100644
1916+--- a/tc/q_fq_codel.c
1917++++ b/tc/q_fq_codel.c
1918+@@ -243,7 +243,7 @@ static int fq_codel_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt
1919+ static int fq_codel_print_xstats(struct qdisc_util *qu, FILE *f,
1920+ 				 struct rtattr *xstats)
1921+ {
1922+-	struct tc_fq_codel_xstats _st = {}, *st;
1923++	struct tc_fq_codel_xstats _st = {0}, *st;
1924+ 
1925+ 	SPRINT_BUF(b1);
1926+ 
1927+diff --git a/tc/q_gred.c b/tc/q_gred.c
1928+index 89aeb086..0202ce33 100644
1929+--- a/tc/q_gred.c
1930++++ b/tc/q_gred.c
1931+@@ -304,8 +304,8 @@ gred_parse_vqs(struct tc_gred_info *info, struct rtattr *vqs)
1932+ 	unsigned int offset = 0;
1933+ 
1934+ 	while (rem > offset) {
1935+-		struct rtattr *tb_entry[TCA_GRED_VQ_ENTRY_MAX + 1] = {};
1936+-		struct rtattr *tb[TCA_GRED_VQ_MAX + 1] = {};
1937++		struct rtattr *tb_entry[TCA_GRED_VQ_ENTRY_MAX + 1] = {0};
1938++		struct rtattr *tb[TCA_GRED_VQ_MAX + 1] = {0};
1939+ 		struct rtattr *entry;
1940+ 		unsigned int len;
1941+ 		unsigned int dp;
1942+@@ -413,7 +413,7 @@ gred_print_stats(struct tc_gred_info *info, struct tc_gred_qopt *qopt)
1943+ 
1944+ static int gred_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
1945+ {
1946+-	struct tc_gred_info infos[MAX_DPs] = {};
1947++	struct tc_gred_info infos[MAX_DPs] = {0};
1948+ 	struct rtattr *tb[TCA_GRED_MAX + 1];
1949+ 	struct tc_gred_sopt *sopt;
1950+ 	struct tc_gred_qopt *qopt;
1951+diff --git a/tc/q_hfsc.c b/tc/q_hfsc.c
1952+index 81c10210..8180b284 100644
1953+--- a/tc/q_hfsc.c
1954++++ b/tc/q_hfsc.c
1955+@@ -73,7 +73,7 @@ static int
1956+ hfsc_parse_opt(struct qdisc_util *qu, int argc, char **argv,
1957+ 	       struct nlmsghdr *n, const char *dev)
1958+ {
1959+-	struct tc_hfsc_qopt qopt = {};
1960++	struct tc_hfsc_qopt qopt = {0};
1961+ 
1962+ 	while (argc > 0) {
1963+ 		if (matches(*argv, "default") == 0) {
1964+@@ -144,7 +144,7 @@ static int
1965+ hfsc_parse_class_opt(struct qdisc_util *qu, int argc, char **argv,
1966+ 		     struct nlmsghdr *n, const char *dev)
1967+ {
1968+-	struct tc_service_curve rsc = {}, fsc = {}, usc = {};
1969++	struct tc_service_curve rsc = {0}, fsc = {}, usc = {};
1970+ 	int rsc_ok = 0, fsc_ok = 0, usc_ok = 0;
1971+ 	struct rtattr *tail;
1972+ 
1973+diff --git a/tc/q_htb.c b/tc/q_htb.c
1974+index b5f95f67..fea78992 100644
1975+--- a/tc/q_htb.c
1976++++ b/tc/q_htb.c
1977+@@ -115,7 +115,7 @@ static int htb_parse_opt(struct qdisc_util *qu, int argc,
1978+ 
1979+ static int htb_parse_class_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n, const char *dev)
1980+ {
1981+-	struct tc_htb_opt opt = {};
1982++	struct tc_htb_opt opt = {0};
1983+ 	__u32 rtab[256], ctab[256];
1984+ 	unsigned buffer = 0, cbuffer = 0;
1985+ 	int cell_log =  -1, ccell_log = -1;
1986+diff --git a/tc/q_multiq.c b/tc/q_multiq.c
1987+index 8ad9e0b2..7319b1bf 100644
1988+--- a/tc/q_multiq.c
1989++++ b/tc/q_multiq.c
1990+@@ -42,7 +42,7 @@ static void explain(void)
1991+ static int multiq_parse_opt(struct qdisc_util *qu, int argc, char **argv,
1992+ 			    struct nlmsghdr *n, const char *dev)
1993+ {
1994+-	struct tc_multiq_qopt opt = {};
1995++	struct tc_multiq_qopt opt = {0};
1996+ 
1997+ 	if (argc) {
1998+ 		if (strcmp(*argv, "help") == 0) {
1999+diff --git a/tc/q_netem.c b/tc/q_netem.c
2000+index 2e5a46ab..1c9c5966 100644
2001+--- a/tc/q_netem.c
2002++++ b/tc/q_netem.c
2003+@@ -200,17 +200,17 @@ static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
2004+ 	int slot_dist_size = 0;
2005+ 	struct rtattr *tail;
2006+ 	struct tc_netem_qopt opt = { .limit = 1000 };
2007+-	struct tc_netem_corr cor = {};
2008+-	struct tc_netem_reorder reorder = {};
2009+-	struct tc_netem_corrupt corrupt = {};
2010++	struct tc_netem_corr cor = {0};
2011++	struct tc_netem_reorder reorder = {0};
2012++	struct tc_netem_corrupt corrupt = {0};
2013+ 	struct tc_netem_gimodel gimodel;
2014+ 	struct tc_netem_gemodel gemodel;
2015+-	struct tc_netem_rate rate = {};
2016+-	struct tc_netem_slot slot = {};
2017++	struct tc_netem_rate rate = {0};
2018++	struct tc_netem_slot slot = {0};
2019+ 	__s16 *dist_data = NULL;
2020+ 	__s16 *slot_dist_data = NULL;
2021+ 	__u16 loss_type = NETEM_LOSS_UNSPEC;
2022+-	int present[__TCA_NETEM_MAX] = {};
2023++	int present[__TCA_NETEM_MAX] = {0};
2024+ 	__u64 rate64 = 0;
2025+ 
2026+ 	for ( ; argc > 0; --argc, ++argv) {
2027+diff --git a/tc/q_red.c b/tc/q_red.c
2028+index fd50d37d..d40b2696 100644
2029+--- a/tc/q_red.c
2030++++ b/tc/q_red.c
2031+@@ -51,7 +51,7 @@ static int red_parse_opt(struct qdisc_util *qu, int argc, char **argv,
2032+ 	struct nla_bitfield32 flags_bf = {
2033+ 		.selector = RED_SUPPORTED_FLAGS,
2034+ 	};
2035+-	struct tc_red_qopt opt = {};
2036++	struct tc_red_qopt opt = {0};
2037+ 	unsigned int burst = 0;
2038+ 	unsigned int avpkt = 0;
2039+ 	double probability = 0.02;
2040+diff --git a/tc/q_sfq.c b/tc/q_sfq.c
2041+index d04a440c..be426f51 100644
2042+--- a/tc/q_sfq.c
2043++++ b/tc/q_sfq.c
2044+@@ -38,7 +38,7 @@ static void explain(void)
2045+ static int sfq_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n, const char *dev)
2046+ {
2047+ 	int ok = 0, red = 0;
2048+-	struct tc_sfq_qopt_v1 opt = {};
2049++	struct tc_sfq_qopt_v1 opt = {0};
2050+ 	unsigned int burst = 0;
2051+ 	int wlog;
2052+ 	unsigned int avpkt = 1000;
2053+diff --git a/tc/q_skbprio.c b/tc/q_skbprio.c
2054+index ca81a72c..c792ebf0 100644
2055+--- a/tc/q_skbprio.c
2056++++ b/tc/q_skbprio.c
2057+@@ -32,7 +32,7 @@ static int skbprio_parse_opt(struct qdisc_util *qu, int argc, char **argv,
2058+ 			     struct nlmsghdr *n, const char *dev)
2059+ {
2060+ 	int ok = 0;
2061+-	struct tc_skbprio_qopt opt = {};
2062++	struct tc_skbprio_qopt opt = {0};
2063+ 
2064+ 	while (argc > 0) {
2065+ 		if (strcmp(*argv, "limit") == 0) {
2066+diff --git a/tc/q_tbf.c b/tc/q_tbf.c
2067+index 4e5bf382..040d8987 100644
2068+--- a/tc/q_tbf.c
2069++++ b/tc/q_tbf.c
2070+@@ -40,7 +40,7 @@ static int tbf_parse_opt(struct qdisc_util *qu, int argc, char **argv,
2071+ 			 struct nlmsghdr *n, const char *dev)
2072+ {
2073+ 	int ok = 0;
2074+-	struct tc_tbf_qopt opt = {};
2075++	struct tc_tbf_qopt opt = {0};
2076+ 	__u32 rtab[256];
2077+ 	__u32 ptab[256];
2078+ 	unsigned buffer = 0, mtu = 0, mpu = 0, latency = 0;
2079+diff --git a/tc/tc_class.c b/tc/tc_class.c
2080+index 39bea971..e6f91207 100644
2081+--- a/tc/tc_class.c
2082++++ b/tc/tc_class.c
2083+@@ -36,8 +36,8 @@ struct graph_node {
2084+ 	int nodes_count;
2085+ };
2086+ 
2087+-static struct hlist_head cls_list = {};
2088+-static struct hlist_head root_cls_list = {};
2089++static struct hlist_head cls_list = {0};
2090++static struct hlist_head root_cls_list = {0};
2091+ 
2092+ static void usage(void);
2093+ 
2094+@@ -67,9 +67,9 @@ static int tc_class_modify(int cmd, unsigned int flags, int argc, char **argv)
2095+ 		.t.tcm_family = AF_UNSPEC,
2096+ 	};
2097+ 	struct qdisc_util *q = NULL;
2098+-	struct tc_estimator est = {};
2099+-	char  d[IFNAMSIZ] = {};
2100+-	char  k[FILTER_NAMESZ] = {};
2101++	struct tc_estimator est = {0};
2102++	char  d[IFNAMSIZ] = {0};
2103++	char  k[FILTER_NAMESZ] = {0};
2104+ 
2105+ 	while (argc > 0) {
2106+ 		if (strcmp(*argv, "dev") == 0) {
2107+@@ -216,14 +216,14 @@ static void graph_cls_show(FILE *fp, char *buf, struct hlist_head *root_list,
2108+ 		int level)
2109+ {
2110+ 	struct hlist_node *n, *tmp_cls;
2111+-	char cls_id_str[256] = {};
2112++	char cls_id_str[256] = {0};
2113+ 	struct rtattr *tb[TCA_MAX + 1];
2114+ 	struct qdisc_util *q;
2115+-	char str[300] = {};
2116++	char str[300] = {0};
2117+ 
2118+ 	hlist_for_each_safe(n, tmp_cls, root_list) {
2119+ 		struct hlist_node *c, *tmp_chld;
2120+-		struct hlist_head children = {};
2121++		struct hlist_head children = {0};
2122+ 		struct graph_node *cls = container_of(n, struct graph_node,
2123+ 				hlist);
2124+ 
2125+@@ -388,7 +388,7 @@ int print_class(struct nlmsghdr *n, void *arg)
2126+ static int tc_class_list(int argc, char **argv)
2127+ {
2128+ 	struct tcmsg t = { .tcm_family = AF_UNSPEC };
2129+-	char d[IFNAMSIZ] = {};
2130++	char d[IFNAMSIZ] = {0};
2131+ 	char buf[1024] = {0};
2132+ 
2133+ 	filter_qdisc = 0;
2134+diff --git a/tc/tc_exec.c b/tc/tc_exec.c
2135+index 9b912ceb..edc6c205 100644
2136+--- a/tc/tc_exec.c
2137++++ b/tc/tc_exec.c
2138+@@ -85,7 +85,7 @@ noexist:
2139+ int do_exec(int argc, char **argv)
2140+ {
2141+ 	struct exec_util *eu;
2142+-	char kind[FILTER_NAMESZ] = {};
2143++	char kind[FILTER_NAMESZ] = {0};
2144+ 
2145+ 	if (argc < 1) {
2146+ 		fprintf(stderr, "No command given, try \"tc exec help\".\n");
2147+diff --git a/tc/tc_filter.c b/tc/tc_filter.c
2148+index 71be2e81..d6aa4605 100644
2149+--- a/tc/tc_filter.c
2150++++ b/tc/tc_filter.c
2151+@@ -78,9 +78,9 @@ static int tc_filter_modify(int cmd, unsigned int flags, int argc, char **argv)
2152+ 	__u32 chain_index;
2153+ 	int chain_index_set = 0;
2154+ 	char *fhandle = NULL;
2155+-	char  d[IFNAMSIZ] = {};
2156+-	char  k[FILTER_NAMESZ] = {};
2157+-	struct tc_estimator est = {};
2158++	char  d[IFNAMSIZ] = {0};
2159++	char  k[FILTER_NAMESZ] = {0};
2160++	struct tc_estimator est = {0};
2161+ 
2162+ 	if (cmd == RTM_NEWTFILTER && flags & NLM_F_CREATE)
2163+ 		protocol = htons(ETH_P_ALL);
2164+@@ -405,8 +405,8 @@ static int tc_filter_get(int cmd, unsigned int flags, int argc, char **argv)
2165+ 	__u32 block_index = 0;
2166+ 	__u32 parent_handle = 0;
2167+ 	char *fhandle = NULL;
2168+-	char  d[IFNAMSIZ] = {};
2169+-	char  k[FILTER_NAMESZ] = {};
2170++	char  d[IFNAMSIZ] = {0};
2171++	char  k[FILTER_NAMESZ] = {0};
2172+ 
2173+ 	while (argc > 0) {
2174+ 		if (strcmp(*argv, "dev") == 0) {
2175+@@ -595,7 +595,7 @@ static int tc_filter_list(int cmd, int argc, char **argv)
2176+ 		.t.tcm_parent = TC_H_UNSPEC,
2177+ 		.t.tcm_family = AF_UNSPEC,
2178+ 	};
2179+-	char d[IFNAMSIZ] = {};
2180++	char d[IFNAMSIZ] = {0};
2181+ 	__u32 prio = 0;
2182+ 	__u32 protocol = 0;
2183+ 	__u32 chain_index;
2184+diff --git a/tc/tc_qdisc.c b/tc/tc_qdisc.c
2185+index b79029d9..97e8693e 100644
2186+--- a/tc/tc_qdisc.c
2187++++ b/tc/tc_qdisc.c
2188+@@ -47,13 +47,13 @@ static int usage(void)
2189+ static int tc_qdisc_modify(int cmd, unsigned int flags, int argc, char **argv)
2190+ {
2191+ 	struct qdisc_util *q = NULL;
2192+-	struct tc_estimator est = {};
2193++	struct tc_estimator est = {0};
2194+ 	struct {
2195+ 		struct tc_sizespec	szopts;
2196+ 		__u16			*data;
2197+-	} stab = {};
2198+-	char  d[IFNAMSIZ] = {};
2199+-	char  k[FILTER_NAMESZ] = {};
2200++	} stab = {0};
2201++	char  d[IFNAMSIZ] = {0};
2202++	char  k[FILTER_NAMESZ] = {0};
2203+ 	struct {
2204+ 		struct nlmsghdr	n;
2205+ 		struct tcmsg		t;
2206+@@ -363,7 +363,7 @@ static int tc_qdisc_list(int argc, char **argv)
2207+ 		.t.tcm_family = AF_UNSPEC,
2208+ 	};
2209+ 
2210+-	char d[IFNAMSIZ] = {};
2211++	char d[IFNAMSIZ] = {0};
2212+ 	bool dump_invisible = false;
2213+ 	__u32 handle;
2214+ 
2215+diff --git a/tc/tc_stab.c b/tc/tc_stab.c
2216+index c0f1f160..45a6b184 100644
2217+--- a/tc/tc_stab.c
2218++++ b/tc/tc_stab.c
2219+@@ -51,7 +51,7 @@ int parse_size_table(int *argcp, char ***argvp, struct tc_sizespec *sp)
2220+ {
2221+ 	char **argv = *argvp;
2222+ 	int argc = *argcp;
2223+-	struct tc_sizespec s = {};
2224++	struct tc_sizespec s = {0};
2225+ 
2226+ 	NEXT_ARG();
2227+ 	if (matches(*argv, "help") == 0) {
2228+diff --git a/tc/tc_util.c b/tc/tc_util.c
2229+index 48065897..45b572ec 100644
2230+--- a/tc/tc_util.c
2231++++ b/tc/tc_util.c
2232+@@ -129,7 +129,7 @@ ok:
2233+ 
2234+ int print_tc_classid(char *buf, int blen, __u32 h)
2235+ {
2236+-	SPRINT_BUF(handle) = {};
2237++	SPRINT_BUF(handle) = {0};
2238+ 	int hlen = SPRINT_BSIZE - 1;
2239+ 
2240+ 	if (h == TC_H_ROOT)
2241+@@ -144,7 +144,7 @@ int print_tc_classid(char *buf, int blen, __u32 h)
2242+ 		snprintf(handle, hlen, "%x:%x", TC_H_MAJ(h) >> 16, TC_H_MIN(h));
2243+ 
2244+ 	if (use_names) {
2245+-		char clname[IDNAME_MAX] = {};
2246++		char clname[IDNAME_MAX] = {0};
2247+ 
2248+ 		if (id_to_name(cls_names, h, clname))
2249+ 			snprintf(buf, blen, "%s#%s", clname, handle);
2250+@@ -740,7 +740,7 @@ void print_tcstats_attr(FILE *fp, struct rtattr *tb[], char *prefix,
2251+ 	}
2252+ 	/* backward compatibility */
2253+ 	if (tb[TCA_STATS]) {
2254+-		struct tc_stats st = {};
2255++		struct tc_stats st = {0};
2256+ 
2257+ 		/* handle case where kernel returns more/less than we know about */
2258+ 		memcpy(&st, RTA_DATA(tb[TCA_STATS]),
2259+diff --git a/tipc/bearer.c b/tipc/bearer.c
2260+index 968293bc..febd9c2a 100644
2261+--- a/tipc/bearer.c
2262++++ b/tipc/bearer.c
2263+@@ -83,8 +83,8 @@ static void cmd_bearer_enable_udp_help(struct cmdl *cmdl, char *media)
2264+ static int get_netid_cb(const struct nlmsghdr *nlh, void *data)
2265+ {
2266+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2267+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2268+-	struct nlattr *attrs[TIPC_NLA_NET_MAX + 1] = {};
2269++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2270++	struct nlattr *attrs[TIPC_NLA_NET_MAX + 1] = {0};
2271+ 	int *netid = (int*)data;
2272+ 
2273+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2274+@@ -754,7 +754,7 @@ static int bearer_dump_udp_cb(const struct nlmsghdr *nlh, void *data)
2275+ {
2276+ 	struct sockaddr_storage *addr;
2277+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2278+-	struct nlattr *info[TIPC_NLA_UDP_MAX + 1] = {};
2279++	struct nlattr *info[TIPC_NLA_UDP_MAX + 1] = {0};
2280+ 
2281+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2282+ 
2283+@@ -790,9 +790,9 @@ static int bearer_get_udp_cb(const struct nlmsghdr *nlh, void *data)
2284+ 	struct cb_data *cb_data = (struct cb_data *) data;
2285+ 	struct sockaddr_storage *addr;
2286+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2287+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2288+-	struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1] = {};
2289+-	struct nlattr *opts[TIPC_NLA_UDP_MAX + 1] = {};
2290++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2291++	struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1] = {0};
2292++	struct nlattr *opts[TIPC_NLA_UDP_MAX + 1] = {0};
2293+ 
2294+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2295+ 	if (!info[TIPC_NLA_BEARER])
2296+@@ -887,9 +887,9 @@ static int bearer_get_cb(const struct nlmsghdr *nlh, void *data)
2297+ {
2298+ 	int *prop = data;
2299+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2300+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2301+-	struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1] = {};
2302+-	struct nlattr *props[TIPC_NLA_PROP_MAX + 1] = {};
2303++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2304++	struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1] = {0};
2305++	struct nlattr *props[TIPC_NLA_PROP_MAX + 1] = {0};
2306+ 
2307+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2308+ 	if (!info[TIPC_NLA_BEARER])
2309+@@ -1070,8 +1070,8 @@ static int cmd_bearer_get(struct nlmsghdr *nlh, const struct cmd *cmd,
2310+ static int bearer_list_cb(const struct nlmsghdr *nlh, void *data)
2311+ {
2312+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2313+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2314+-	struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1] = {};
2315++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2316++	struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1] = {0};
2317+ 
2318+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2319+ 	if (!info[TIPC_NLA_BEARER]) {
2320+diff --git a/tipc/link.c b/tipc/link.c
2321+index 9994ada2..9c8e1e8d 100644
2322+--- a/tipc/link.c
2323++++ b/tipc/link.c
2324+@@ -36,8 +36,8 @@ static const char tipc_bclink_name[] = "broadcast-link";
2325+ static int link_list_cb(const struct nlmsghdr *nlh, void *data)
2326+ {
2327+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2328+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2329+-	struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1] = {};
2330++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2331++	struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1] = {0};
2332+ 
2333+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2334+ 	if (!info[TIPC_NLA_LINK])
2335+@@ -86,9 +86,9 @@ static int link_get_cb(const struct nlmsghdr *nlh, void *data)
2336+ {
2337+ 	int *prop = data;
2338+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2339+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2340+-	struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1] = {};
2341+-	struct nlattr *props[TIPC_NLA_PROP_MAX + 1] = {};
2342++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2343++	struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1] = {0};
2344++	struct nlattr *props[TIPC_NLA_PROP_MAX + 1] = {0};
2345+ 
2346+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2347+ 	if (!info[TIPC_NLA_LINK])
2348+@@ -505,10 +505,10 @@ static int link_stat_show_cb(const struct nlmsghdr *nlh, void *data)
2349+ 	const char *name;
2350+ 	const char *link = data;
2351+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2352+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2353+-	struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1] = {};
2354+-	struct nlattr *prop[TIPC_NLA_PROP_MAX + 1] = {};
2355+-	struct nlattr *stats[TIPC_NLA_STATS_MAX + 1] = {};
2356++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2357++	struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1] = {0};
2358++	struct nlattr *prop[TIPC_NLA_PROP_MAX + 1] = {0};
2359++	struct nlattr *stats[TIPC_NLA_STATS_MAX + 1] = {0};
2360+ 
2361+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2362+ 	if (!info[TIPC_NLA_LINK])
2363+@@ -807,8 +807,8 @@ static int cmd_link_mon_set_prop(struct nlmsghdr *nlh, const struct cmd *cmd,
2364+ static int link_mon_summary_cb(const struct nlmsghdr *nlh, void *data)
2365+ {
2366+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2367+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2368+-	struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {};
2369++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2370++	struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {0};
2371+ 
2372+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2373+ 	if (!info[TIPC_NLA_MON])
2374+@@ -939,8 +939,8 @@ static void link_mon_print_peer_state(const uint32_t addr, const char *status,
2375+ static int link_mon_peer_list_cb(const struct nlmsghdr *nlh, void *data)
2376+ {
2377+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2378+-	struct nlattr *attrs[TIPC_NLA_MON_PEER_MAX + 1] = {};
2379+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2380++	struct nlattr *attrs[TIPC_NLA_MON_PEER_MAX + 1] = {0};
2381++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2382+ 	uint16_t member_cnt;
2383+ 	uint32_t applied;
2384+ 	uint32_t dom_gen;
2385+@@ -1025,8 +1025,8 @@ static int link_mon_peer_list(uint32_t mon_ref)
2386+ static int link_mon_list_cb(const struct nlmsghdr *nlh, void *data)
2387+ {
2388+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2389+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2390+-	struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {};
2391++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2392++	struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {0};
2393+ 	char *req_bearer = data;
2394+ 	const char *bname;
2395+ 	const char title[] =
2396+@@ -1153,8 +1153,8 @@ static void cmd_link_mon_get_help(struct cmdl *cmdl)
2397+ static int link_mon_get_cb(const struct nlmsghdr *nlh, void *data)
2398+ {
2399+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2400+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2401+-	struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {};
2402++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2403++	struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {0};
2404+ 
2405+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2406+ 	if (!info[TIPC_NLA_MON])
2407+diff --git a/tipc/media.c b/tipc/media.c
2408+index a3fec681..7bcef4b0 100644
2409+--- a/tipc/media.c
2410++++ b/tipc/media.c
2411+@@ -24,8 +24,8 @@
2412+ static int media_list_cb(const struct nlmsghdr *nlh, void *data)
2413+ {
2414+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2415+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2416+-	struct nlattr *attrs[TIPC_NLA_MEDIA_MAX + 1] = {};
2417++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2418++	struct nlattr *attrs[TIPC_NLA_MEDIA_MAX + 1] = {0};
2419+ 
2420+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2421+ 	if (!info[TIPC_NLA_MEDIA])
2422+@@ -61,9 +61,9 @@ static int media_get_cb(const struct nlmsghdr *nlh, void *data)
2423+ {
2424+ 	int *prop = data;
2425+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2426+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2427+-	struct nlattr *attrs[TIPC_NLA_MEDIA_MAX + 1] = {};
2428+-	struct nlattr *props[TIPC_NLA_PROP_MAX + 1] = {};
2429++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2430++	struct nlattr *attrs[TIPC_NLA_MEDIA_MAX + 1] = {0};
2431++	struct nlattr *props[TIPC_NLA_PROP_MAX + 1] = {0};
2432+ 
2433+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2434+ 	if (!info[TIPC_NLA_MEDIA])
2435+diff --git a/tipc/misc.c b/tipc/misc.c
2436+index 909975d8..1843ee03 100644
2437+--- a/tipc/misc.c
2438++++ b/tipc/misc.c
2439+@@ -157,7 +157,7 @@ void nodeid2str(uint8_t *id, char *str)
2440+ 
2441+ void hash2nodestr(uint32_t hash, char *str)
2442+ {
2443+-	struct tipc_sioc_nodeid_req nr = {};
2444++	struct tipc_sioc_nodeid_req nr = {0};
2445+ 	int sd;
2446+ 
2447+ 	sd = socket(AF_TIPC, SOCK_RDM, 0);
2448+diff --git a/tipc/nametable.c b/tipc/nametable.c
2449+index b09ed5fc..3536fbe3 100644
2450+--- a/tipc/nametable.c
2451++++ b/tipc/nametable.c
2452+@@ -28,9 +28,9 @@ static int nametable_show_cb(const struct nlmsghdr *nlh, void *data)
2453+ {
2454+ 	int *iteration = data;
2455+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2456+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2457+-	struct nlattr *attrs[TIPC_NLA_NAME_TABLE_MAX + 1] = {};
2458+-	struct nlattr *publ[TIPC_NLA_PUBL_MAX + 1] = {};
2459++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2460++	struct nlattr *attrs[TIPC_NLA_NAME_TABLE_MAX + 1] = {0};
2461++	struct nlattr *publ[TIPC_NLA_PUBL_MAX + 1] = {0};
2462+ 	const char *scope[] = { "", "zone", "cluster", "node" };
2463+ 	char str[33] = {0,};
2464+ 
2465+diff --git a/tipc/node.c b/tipc/node.c
2466+index bf592a07..45d95bdb 100644
2467+--- a/tipc/node.c
2468++++ b/tipc/node.c
2469+@@ -25,9 +25,9 @@
2470+ 
2471+ static int node_list_cb(const struct nlmsghdr *nlh, void *data)
2472+ {
2473+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2474+-	struct nlattr *attrs[TIPC_NLA_NODE_MAX + 1] = {};
2475+-	char str[33] = {};
2476++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2477++	struct nlattr *attrs[TIPC_NLA_NODE_MAX + 1] = {0};
2478++	char str[33] = {0};
2479+ 	uint32_t addr;
2480+ 
2481+ 	mnl_attr_parse(nlh, sizeof(struct genlmsghdr), parse_attrs, info);
2482+@@ -304,8 +304,8 @@ static int cmd_node_flush_key(struct nlmsghdr *nlh, const struct cmd *cmd,
2483+ 
2484+ static int nodeid_get_cb(const struct nlmsghdr *nlh, void *data)
2485+ {
2486+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2487+-	struct nlattr *attrs[TIPC_NLA_NET_MAX + 1] = {};
2488++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2489++	struct nlattr *attrs[TIPC_NLA_NET_MAX + 1] = {0};
2490+ 	char str[33] = {0,};
2491+ 	uint8_t id[16] = {0,};
2492+ 	uint64_t *w0 = (uint64_t *) &id[0];
2493+@@ -348,8 +348,8 @@ static int cmd_node_get_nodeid(struct nlmsghdr *nlh, const struct cmd *cmd,
2494+ 
2495+ static int netid_get_cb(const struct nlmsghdr *nlh, void *data)
2496+ {
2497+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2498+-	struct nlattr *attrs[TIPC_NLA_NET_MAX + 1] = {};
2499++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2500++	struct nlattr *attrs[TIPC_NLA_NET_MAX + 1] = {0};
2501+ 
2502+ 	mnl_attr_parse(nlh, sizeof(struct genlmsghdr), parse_attrs, info);
2503+ 	if (!info[TIPC_NLA_NET])
2504+diff --git a/tipc/socket.c b/tipc/socket.c
2505+index 597ffd91..19258b8c 100644
2506+--- a/tipc/socket.c
2507++++ b/tipc/socket.c
2508+@@ -27,8 +27,8 @@
2509+ static int publ_list_cb(const struct nlmsghdr *nlh, void *data)
2510+ {
2511+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2512+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2513+-	struct nlattr *attrs[TIPC_NLA_SOCK_MAX + 1] = {};
2514++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2515++	struct nlattr *attrs[TIPC_NLA_SOCK_MAX + 1] = {0};
2516+ 
2517+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2518+ 	if (!info[TIPC_NLA_PUBL])
2519+@@ -76,8 +76,8 @@ static int publ_list(uint32_t sock)
2520+ static int sock_list_cb(const struct nlmsghdr *nlh, void *data)
2521+ {
2522+ 	struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
2523+-	struct nlattr *info[TIPC_NLA_MAX + 1] = {};
2524+-	struct nlattr *attrs[TIPC_NLA_SOCK_MAX + 1] = {};
2525++	struct nlattr *info[TIPC_NLA_MAX + 1] = {0};
2526++	struct nlattr *attrs[TIPC_NLA_SOCK_MAX + 1] = {0};
2527+ 
2528+ 	mnl_attr_parse(nlh, sizeof(*genl), parse_attrs, info);
2529+ 	if (!info[TIPC_NLA_SOCK])
2530+@@ -91,7 +91,7 @@ static int sock_list_cb(const struct nlmsghdr *nlh, void *data)
2531+ 
2532+ 	if (attrs[TIPC_NLA_SOCK_CON]) {
2533+ 		uint32_t node;
2534+-		struct nlattr *con[TIPC_NLA_CON_MAX + 1] = {};
2535++		struct nlattr *con[TIPC_NLA_CON_MAX + 1] = {0};
2536+ 
2537+ 		mnl_attr_parse_nested(attrs[TIPC_NLA_SOCK_CON], parse_attrs, con);
2538+ 		node = mnl_attr_get_u32(con[TIPC_NLA_CON_NODE]);
2539+-- 
2540+2.34.1
2541+
+53, -0
 1@@ -0,0 +1,53 @@
 2+From b39ddf71d46ff91b8c84a2dd48c154cccc0a685c Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 16 Jun 2019 12:28:57 -0700
 5+Subject: [PATCH] Avoid non-standard \e escape sequence
 6+
 7+---
 8+ lib/color.c | 30 +++++++++++++++---------------
 9+ 1 file changed, 15 insertions(+), 15 deletions(-)
10+
11+diff --git a/lib/color.c b/lib/color.c
12+index 59976847..27de6462 100644
13+--- a/lib/color.c
14++++ b/lib/color.c
15+@@ -32,21 +32,21 @@ enum color {
16+ };
17+ 
18+ static const char * const color_codes[] = {
19+-	"\e[31m",
20+-	"\e[32m",
21+-	"\e[33m",
22+-	"\e[34m",
23+-	"\e[35m",
24+-	"\e[36m",
25+-	"\e[37m",
26+-	"\e[1;31m",
27+-	"\e[1;32m",
28+-	"\e[1;33m",
29+-	"\e[1;34m",
30+-	"\e[1;35m",
31+-	"\e[1;36m",
32+-	"\e[1;37m",
33+-	"\e[0m",
34++	"\033[31m",
35++	"\033[32m",
36++	"\033[33m",
37++	"\033[34m",
38++	"\033[35m",
39++	"\033[36m",
40++	"\033[37m",
41++	"\033[1;31m",
42++	"\033[1;32m",
43++	"\033[1;33m",
44++	"\033[1;34m",
45++	"\033[1;35m",
46++	"\033[1;36m",
47++	"\033[1;37m",
48++	"\033[0m",
49+ 	NULL,
50+ };
51+ 
52+-- 
53+2.20.1
54+
+52, -0
 1@@ -0,0 +1,52 @@
 2+From 1b949a2da0e4fa94625faebeb3f0e62246be39d0 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 16 Jun 2019 12:39:04 -0700
 5+Subject: [PATCH] Remove semicolon after function definitions
 6+
 7+---
 8+ lib/json_print.c | 22 +++++++++++-----------
 9+ 1 file changed, 11 insertions(+), 11 deletions(-)
10+
11+diff --git a/lib/json_print.c b/lib/json_print.c
12+index 994a2f8d..9bc77e3c 100644
13+--- a/lib/json_print.c
14++++ b/lib/json_print.c
15+@@ -137,15 +137,15 @@ void close_json_array(enum output_type type, const char *str)
16+ 		}							\
17+ 		return ret;						\
18+ 	}
19+-_PRINT_FUNC(int, int);
20+-_PRINT_FUNC(s64, int64_t);
21+-_PRINT_FUNC(hhu, unsigned char);
22+-_PRINT_FUNC(hu, unsigned short);
23+-_PRINT_FUNC(uint, unsigned int);
24+-_PRINT_FUNC(u64, uint64_t);
25+-_PRINT_FUNC(luint, unsigned long);
26+-_PRINT_FUNC(lluint, unsigned long long);
27+-_PRINT_FUNC(float, double);
28++_PRINT_FUNC(int, int)
29++_PRINT_FUNC(s64, int64_t)
30++_PRINT_FUNC(hhu, unsigned char)
31++_PRINT_FUNC(hu, unsigned short)
32++_PRINT_FUNC(uint, unsigned int)
33++_PRINT_FUNC(u64, uint64_t)
34++_PRINT_FUNC(luint, unsigned long)
35++_PRINT_FUNC(lluint, unsigned long long)
36++_PRINT_FUNC(float, double)
37+ #undef _PRINT_FUNC
38+ 
39+ #define _PRINT_NAME_VALUE_FUNC(type_name, type, format_char)		 \
40+@@ -157,8 +157,8 @@ _PRINT_FUNC(float, double);
41+ 			 "%s %%"#format_char, name);			 \
42+ 		print_##type_name(PRINT_ANY, name, format, value);	 \
43+ 	}
44+-_PRINT_NAME_VALUE_FUNC(uint, unsigned int, u);
45+-_PRINT_NAME_VALUE_FUNC(string, const char*, s);
46++_PRINT_NAME_VALUE_FUNC(uint, unsigned int, u)
47++_PRINT_NAME_VALUE_FUNC(string, const char*, s)
48+ #undef _PRINT_NAME_VALUE_FUNC
49+ 
50+ int print_color_string(enum output_type type,
51+-- 
52+2.30.0
53+
+201, -0
  1@@ -0,0 +1,201 @@
  2+From f30befee39d2f8cf06158bfd5b37b675e2287f3f Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sun, 16 Jun 2019 12:39:40 -0700
  5+Subject: [PATCH] Don't omit second operand to '?' operator
  6+
  7+---
  8+ ip/iproute_lwtunnel.c |  4 ++--
  9+ ip/iptunnel.c         |  7 ++++++-
 10+ ip/iptuntap.c         |  2 +-
 11+ lib/bpf_legacy.c      |  2 +-
 12+ lib/utils.c           |  7 +++++--
 13+ misc/ss.c             | 26 ++++++++++++++++++--------
 14+ 6 files changed, 33 insertions(+), 15 deletions(-)
 15+
 16+diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c
 17+index b05dffc6..a2d868db 100644
 18+--- a/ip/iproute_lwtunnel.c
 19++++ b/ip/iproute_lwtunnel.c
 20+@@ -291,7 +291,7 @@ static const char *format_action_type(int action)
 21+ 	if (action < 0 || action > SEG6_LOCAL_ACTION_MAX)
 22+ 		return "<invalid>";
 23+ 
 24+-	return seg6_action_names[action] ?: "<unknown>";
 25++	return seg6_action_names[action] ? seg6_action_names[action] : "<unknown>";
 26+ }
 27+ 
 28+ static int read_action_type(const char *name)
 29+@@ -322,7 +322,7 @@ static void print_encap_bpf_prog(FILE *fp, struct rtattr *encap,
 30+ 
 31+ 	if (is_json_context())
 32+ 		print_string(PRINT_JSON, str, NULL,
 33+-			     progname ? : "<unknown>");
 34++			     progname ? progname : "<unknown>");
 35+ 	else {
 36+ 		fprintf(fp, "%s ", str);
 37+ 		if (progname)
 38+diff --git a/ip/iptunnel.c b/ip/iptunnel.c
 39+index c6c99118..cc5cbbc7 100644
 40+--- a/ip/iptunnel.c
 41++++ b/ip/iptunnel.c
 42+@@ -279,11 +279,16 @@ static int do_add(int cmd, int argc, char **argv)
 43+ static int do_del(int argc, char **argv)
 44+ {
 45+ 	struct ip_tunnel_parm p;
 46++	const char *name;
 47+ 
 48+ 	if (parse_args(argc, argv, SIOCDELTUNNEL, &p) < 0)
 49+ 		return -1;
 50+ 
 51+-	return tnl_del_ioctl(tnl_defname(&p) ? : p.name, p.name, &p);
 52++	name = tnl_defname(&p);
 53++	if (!name)
 54++		name = p.name;
 55++
 56++	return tnl_del_ioctl(name, p.name, &p);
 57+ }
 58+ 
 59+ static void print_tunnel(const void *t)
 60+diff --git a/ip/iptuntap.c b/ip/iptuntap.c
 61+index f3167858..5095e0f8 100644
 62+--- a/ip/iptuntap.c
 63++++ b/ip/iptuntap.c
 64+@@ -323,7 +323,7 @@ static void show_processes(const char *name)
 65+ 				char *pname = get_task_name(pid);
 66+ 
 67+ 				print_string(PRINT_ANY, "name",
 68+-					     "%s", pname ? : "<NULL>");
 69++					     "%s", pname ? pname : "<NULL>");
 70+ 
 71+ 				print_uint(PRINT_ANY, "pid",
 72+ 					   "(%d)", pid);
 73+diff --git a/lib/bpf_legacy.c b/lib/bpf_legacy.c
 74+index 614ee1c6..21853635 100644
 75+--- a/lib/bpf_legacy.c
 76++++ b/lib/bpf_legacy.c
 77+@@ -786,7 +786,7 @@ static const char *bpf_get_work_dir(enum bpf_prog_type type)
 78+ 		mnt = bpf_find_mntpt("bpf", BPF_FS_MAGIC, bpf_tmp,
 79+ 				     sizeof(bpf_tmp), bpf_known_mnts);
 80+ 	if (!mnt) {
 81+-		mnt = mnt_env ? : BPF_DIR_MNT;
 82++		mnt = mnt_env ? mnt_env : BPF_DIR_MNT;
 83+ 		ret = bpf_mnt_check_target(mnt);
 84+ 		if (!ret)
 85+ 			ret = bpf_mnt_fs(mnt);
 86+diff --git a/lib/utils.c b/lib/utils.c
 87+index 0f683f9c..e862e1d4 100644
 88+--- a/lib/utils.c
 89++++ b/lib/utils.c
 90+@@ -929,8 +929,10 @@ int __get_hz(void)
 91+ 	int hz = 0;
 92+ 	FILE *fp;
 93+ 
 94+-	if (getenv("HZ"))
 95+-		return atoi(getenv("HZ")) ? : HZ;
 96++	if (getenv("HZ")) {
 97++		hz = atoi(getenv("HZ"));
 98++		goto out;
 99++	}
100+ 
101+ 	if (getenv("PROC_NET_PSCHED"))
102+ 		snprintf(name, sizeof(name)-1,
103+@@ -951,6 +953,7 @@ int __get_hz(void)
104+ 				hz = denom;
105+ 		fclose(fp);
106+ 	}
107++out:
108+ 	if (hz)
109+ 		return hz;
110+ 	return HZ;
111+diff --git a/misc/ss.c b/misc/ss.c
112+index eda95552..202e5385 100644
113+--- a/misc/ss.c
114++++ b/misc/ss.c
115+@@ -482,7 +482,9 @@ static FILE *generic_proc_open(const char *env, const char *name)
116+ 	char store[128];
117+ 
118+ 	if (!p) {
119+-		p = getenv("PROC_ROOT") ? : "/proc";
120++		p = getenv("PROC_ROOT");
121++		if (!p)
122++			p = "/proc";
123+ 		snprintf(store, sizeof(store)-1, "%s/%s", p, name);
124+ 		p = store;
125+ 	}
126+@@ -574,7 +576,7 @@ static void user_ent_destroy(void)
127+ 
128+ static void user_ent_hash_build(void)
129+ {
130+-	const char *root = getenv("PROC_ROOT") ? : "/proc/";
131++	const char *root;
132+ 	struct dirent *d;
133+ 	char name[1024];
134+ 	int nameoff;
135+@@ -584,6 +586,10 @@ static void user_ent_hash_build(void)
136+ 	const char *no_ctx = "unavailable";
137+ 	static int user_ent_hash_build_init;
138+ 
139++	root = getenv("PROC_ROOT");
140++	if (!root)
141++		root = "/proc/";
142++
143+ 	/* If show_users & show_proc_ctx set only do this once */
144+ 	if (user_ent_hash_build_init != 0)
145+ 		return;
146+@@ -2235,7 +2241,10 @@ void *parse_hostcond(char *addr, bool is_port)
147+ 	} else if (addr[0] == '*') {
148+ 		port = addr+1;
149+ 	} else {
150+-		port = strrchr(strchr(addr, '/') ? : addr, ':');
151++		port = strchr(addr, '/');
152++		if (!port)
153++			port = addr;
154++		port = strrchr(port, ':');
155+ 	}
156+ 
157+ 	if (is_port)
158+@@ -3970,9 +3979,9 @@ static void unix_stats_print(struct sockstat *s, struct filter *f)
159+ 
160+ 	sock_state_print(s);
161+ 
162+-	sock_addr_print(s->name ?: "*", " ",
163++	sock_addr_print(s->name ? s->name : "*", " ",
164+ 			int_to_str(s->lport, port_name), NULL);
165+-	sock_addr_print(s->peer_name ?: "*", " ",
166++	sock_addr_print(s->peer_name ? s->peer_name : "*", " ",
167+ 			int_to_str(s->rport, port_name), NULL);
168+ 
169+ 	proc_ctx_print(s);
170+@@ -4175,7 +4184,7 @@ static int unix_show(struct filter *f)
171+ 			if (!p)
172+ 				u->peer_name = "?";
173+ 			else
174+-				u->peer_name = p->name ? : "*";
175++				u->peer_name = p->name ? p->name : "*";
176+ 		}
177+ 
178+ 		if (f->f) {
179+@@ -4679,9 +4688,10 @@ static int netlink_show_one(struct filter *f,
180+ 			strncpy(procname, "kernel", 7);
181+ 		} else if (pid > 0) {
182+ 			FILE *fp;
183++			const char *root = getenv("PROC_ROOT");
184+ 
185+ 			snprintf(procname, sizeof(procname), "%s/%d/stat",
186+-				getenv("PROC_ROOT") ? : "/proc", pid);
187++				root ? root : "/proc", pid);
188+ 			if ((fp = fopen(procname, "r")) != NULL) {
189+ 				if (fscanf(fp, "%*d (%[^)])", procname) == 1) {
190+ 					snprintf(procname+strlen(procname),
191+@@ -4724,7 +4734,7 @@ static int netlink_show_one(struct filter *f,
192+ 		else if (pid > 0)
193+ 			getpidcon(pid, &pid_context);
194+ 
195+-		out(" proc_ctx=%s", pid_context ? : "unavailable");
196++		out(" proc_ctx=%s", pid_context ? pid_context : "unavailable");
197+ 		free(pid_context);
198+ 	}
199+ 
200+-- 
201+2.34.1
202+
+57, -0
 1@@ -0,0 +1,57 @@
 2+From a5a3b56a204b398f6ae2e1144c73ec819e23426f Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 16 Jun 2019 13:38:59 -0700
 5+Subject: [PATCH] Avoid unnecessary VLAs
 6+
 7+---
 8+ include/bpf_scm.h | 2 +-
 9+ ip/iptuntap.c     | 8 +++-----
10+ 2 files changed, 4 insertions(+), 6 deletions(-)
11+
12+diff --git a/include/bpf_scm.h b/include/bpf_scm.h
13+index 669f0538..9e456030 100644
14+--- a/include/bpf_scm.h
15++++ b/include/bpf_scm.h
16+@@ -37,7 +37,7 @@ static inline int *bpf_map_set_init(struct bpf_map_set_msg *msg,
17+ 				    struct sockaddr_un *addr,
18+ 				    unsigned int addr_len)
19+ {
20+-	const unsigned int cmsg_ctl_len = sizeof(int) * BPF_SCM_MAX_FDS;
21++	enum { cmsg_ctl_len = sizeof(int) * BPF_SCM_MAX_FDS };
22+ 	struct cmsghdr *cmsg;
23+ 
24+ 	msg->iov.iov_base = &msg->aux;
25+diff --git a/ip/iptuntap.c b/ip/iptuntap.c
26+index 5095e0f8..8928e503 100644
27+--- a/ip/iptuntap.c
28++++ b/ip/iptuntap.c
29+@@ -278,9 +278,7 @@ static void show_processes(const char *name)
30+ 
31+ 	fd_path = globbuf.gl_pathv;
32+ 	while (*fd_path) {
33+-		const char *dev_net_tun = "/dev/net/tun";
34+-		const size_t linkbuf_len = strlen(dev_net_tun) + 2;
35+-		char linkbuf[linkbuf_len], *fdinfo;
36++		char linkbuf[sizeof(TUNDEV) + 1], *fdinfo;
37+ 		int pid, fd;
38+ 		FILE *f;
39+ 
40+@@ -290,13 +288,13 @@ static void show_processes(const char *name)
41+ 		if (pid == getpid())
42+ 			goto next;
43+ 
44+-		err = readlink(*fd_path, linkbuf, linkbuf_len - 1);
45++		err = readlink(*fd_path, linkbuf, sizeof(linkbuf) - 1);
46+ 		if (err < 0) {
47+ 			perror("readlink");
48+ 			goto next;
49+ 		}
50+ 		linkbuf[err] = '\0';
51+-		if (strcmp(dev_net_tun, linkbuf))
52++		if (strcmp(TUNDEV, linkbuf))
53+ 			goto next;
54+ 
55+ 		if (asprintf(&fdinfo, "/proc/%d/fdinfo/%d", pid, fd) < 0)
56+-- 
57+2.34.0
58+
  1@@ -0,0 +1,136 @@
  2+From d01fedaf6124f77cee82d8023e8ed0aa1cec345a Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Mon, 24 Jun 2019 16:03:55 -0700
  5+Subject: [PATCH] ip: Fix get_link_kind when linked statically
  6+
  7+---
  8+ ip/iplink.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++------
  9+ 1 file changed, 90 insertions(+), 10 deletions(-)
 10+
 11+diff --git a/ip/iplink.c b/ip/iplink.c
 12+index 10f6c2c6..de7f21d6 100644
 13+--- a/ip/iplink.c
 14++++ b/ip/iplink.c
 15+@@ -151,7 +151,6 @@ static int on_off(const char *msg, const char *realval)
 16+ 	return -1;
 17+ }
 18+ 
 19+-static void *BODY;		/* cached dlopen(NULL) handle */
 20+ static struct link_util *linkutil_list;
 21+ 
 22+ struct link_util *get_link_kind(const char *id)
 23+@@ -160,21 +159,102 @@ struct link_util *get_link_kind(const char *id)
 24+ 	char buf[256];
 25+ 	struct link_util *l;
 26+ 
 27++	if (linkutil_list == NULL) {
 28++		// <sed -n 's/^\(struct link_util .*_link_util\) = {/		extern \1;/p' ip/*.c
 29++		extern struct link_util bareudp_link_util;
 30++		extern struct link_util bond_link_util;
 31++		extern struct link_util bond_slave_link_util;
 32++		extern struct link_util bridge_link_util;
 33++		extern struct link_util bridge_slave_link_util;
 34++		extern struct link_util can_link_util;
 35++		extern struct link_util dummy_link_util;
 36++		extern struct link_util geneve_link_util;
 37++		extern struct link_util hsr_link_util;
 38++		extern struct link_util ifb_link_util;
 39++		extern struct link_util ipoib_link_util;
 40++		extern struct link_util ipvlan_link_util;
 41++		extern struct link_util ipvtap_link_util;
 42++		extern struct link_util macvlan_link_util;
 43++		extern struct link_util macvtap_link_util;
 44++		extern struct link_util netdevsim_link_util;
 45++		extern struct link_util nlmon_link_util;
 46++		extern struct link_util rmnet_link_util;
 47++		extern struct link_util team_link_util;
 48++		extern struct link_util vcan_link_util;
 49++		extern struct link_util vlan_link_util;
 50++		extern struct link_util vrf_link_util;
 51++		extern struct link_util vrf_slave_link_util;
 52++		extern struct link_util vxcan_link_util;
 53++		extern struct link_util vxlan_link_util;
 54++		extern struct link_util wwan_link_util;
 55++		extern struct link_util macsec_link_util;
 56++		extern struct link_util tun_link_util;
 57++		extern struct link_util gre_link_util;
 58++		extern struct link_util gretap_link_util;
 59++		extern struct link_util erspan_link_util;
 60++		extern struct link_util ip6gre_link_util;
 61++		extern struct link_util ip6gretap_link_util;
 62++		extern struct link_util ip6erspan_link_util;
 63++		extern struct link_util ip6tnl_link_util;
 64++		extern struct link_util ipip_link_util;
 65++		extern struct link_util sit_link_util;
 66++		extern struct link_util veth_link_util;
 67++		extern struct link_util vti_link_util;
 68++		extern struct link_util vti6_link_util;
 69++		extern struct link_util xfrm_link_util;
 70++
 71++		// <sed -n 's/^struct link_util \(.*_link_util\) = {/		\1.next = linkutil_list, linkutil_list = \&\1;/p' ip/*.c
 72++		bareudp_link_util.next = linkutil_list, linkutil_list = &bareudp_link_util;
 73++		bond_link_util.next = linkutil_list, linkutil_list = &bond_link_util;
 74++		bond_slave_link_util.next = linkutil_list, linkutil_list = &bond_slave_link_util;
 75++		bridge_link_util.next = linkutil_list, linkutil_list = &bridge_link_util;
 76++		bridge_slave_link_util.next = linkutil_list, linkutil_list = &bridge_slave_link_util;
 77++		can_link_util.next = linkutil_list, linkutil_list = &can_link_util;
 78++		dummy_link_util.next = linkutil_list, linkutil_list = &dummy_link_util;
 79++		geneve_link_util.next = linkutil_list, linkutil_list = &geneve_link_util;
 80++		hsr_link_util.next = linkutil_list, linkutil_list = &hsr_link_util;
 81++		ifb_link_util.next = linkutil_list, linkutil_list = &ifb_link_util;
 82++		ipoib_link_util.next = linkutil_list, linkutil_list = &ipoib_link_util;
 83++		ipvlan_link_util.next = linkutil_list, linkutil_list = &ipvlan_link_util;
 84++		ipvtap_link_util.next = linkutil_list, linkutil_list = &ipvtap_link_util;
 85++		macvlan_link_util.next = linkutil_list, linkutil_list = &macvlan_link_util;
 86++		macvtap_link_util.next = linkutil_list, linkutil_list = &macvtap_link_util;
 87++		netdevsim_link_util.next = linkutil_list, linkutil_list = &netdevsim_link_util;
 88++		nlmon_link_util.next = linkutil_list, linkutil_list = &nlmon_link_util;
 89++		rmnet_link_util.next = linkutil_list, linkutil_list = &rmnet_link_util;
 90++		team_link_util.next = linkutil_list, linkutil_list = &team_link_util;
 91++		vcan_link_util.next = linkutil_list, linkutil_list = &vcan_link_util;
 92++		vlan_link_util.next = linkutil_list, linkutil_list = &vlan_link_util;
 93++		vrf_link_util.next = linkutil_list, linkutil_list = &vrf_link_util;
 94++		vrf_slave_link_util.next = linkutil_list, linkutil_list = &vrf_slave_link_util;
 95++		vxcan_link_util.next = linkutil_list, linkutil_list = &vxcan_link_util;
 96++		vxlan_link_util.next = linkutil_list, linkutil_list = &vxlan_link_util;
 97++		wwan_link_util.next = linkutil_list, linkutil_list = &wwan_link_util;
 98++		macsec_link_util.next = linkutil_list, linkutil_list = &macsec_link_util;
 99++		tun_link_util.next = linkutil_list, linkutil_list = &tun_link_util;
100++		gre_link_util.next = linkutil_list, linkutil_list = &gre_link_util;
101++		gretap_link_util.next = linkutil_list, linkutil_list = &gretap_link_util;
102++		erspan_link_util.next = linkutil_list, linkutil_list = &erspan_link_util;
103++		ip6gre_link_util.next = linkutil_list, linkutil_list = &ip6gre_link_util;
104++		ip6gretap_link_util.next = linkutil_list, linkutil_list = &ip6gretap_link_util;
105++		ip6erspan_link_util.next = linkutil_list, linkutil_list = &ip6erspan_link_util;
106++		ip6tnl_link_util.next = linkutil_list, linkutil_list = &ip6tnl_link_util;
107++		ipip_link_util.next = linkutil_list, linkutil_list = &ipip_link_util;
108++		sit_link_util.next = linkutil_list, linkutil_list = &sit_link_util;
109++		veth_link_util.next = linkutil_list, linkutil_list = &veth_link_util;
110++		vti_link_util.next = linkutil_list, linkutil_list = &vti_link_util;
111++		vti6_link_util.next = linkutil_list, linkutil_list = &vti6_link_util;
112++		xfrm_link_util.next = linkutil_list, linkutil_list = &xfrm_link_util;
113++	}
114++
115+ 	for (l = linkutil_list; l; l = l->next)
116+ 		if (strcmp(l->id, id) == 0)
117+ 			return l;
118+ 
119+ 	snprintf(buf, sizeof(buf), "%s/link_%s.so", get_ip_lib_dir(), id);
120+ 	dlh = dlopen(buf, RTLD_LAZY);
121+-	if (dlh == NULL) {
122+-		/* look in current binary, only open once */
123+-		dlh = BODY;
124+-		if (dlh == NULL) {
125+-			dlh = BODY = dlopen(NULL, RTLD_LAZY);
126+-			if (dlh == NULL)
127+-				return NULL;
128+-		}
129+-	}
130++	if (dlh == NULL)
131++		return NULL;
132+ 
133+ 	snprintf(buf, sizeof(buf), "%s_link_util", id);
134+ 	l = dlsym(dlh, buf);
135+-- 
136+2.34.1
137+
+44, -0
 1@@ -0,0 +1,44 @@
 2+From 116f98de6f16f9c8891b910e6e47ffbd86652100 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 24 Jun 2019 16:48:56 -0700
 5+Subject: [PATCH] Use alloca instead of VLA when VLA is not available
 6+
 7+---
 8+ ip/ipaddress.c | 14 ++++++++++++--
 9+ 1 file changed, 12 insertions(+), 2 deletions(-)
10+
11+diff --git a/ip/ipaddress.c b/ip/ipaddress.c
12+index cfd21f9a..8472499e 100644
13+--- a/ip/ipaddress.c
14++++ b/ip/ipaddress.c
15+@@ -246,7 +246,12 @@ static void print_linktype(FILE *fp, struct rtattr *tb)
16+ 
17+ 		lu = get_link_kind(kind);
18+ 		if (lu && lu->print_opt) {
19+-			struct rtattr *attr[lu->maxattr+1], **data = NULL;
20++#ifdef __STDC_NO_VLA__
21++			struct rtattr **attr = alloca((lu->maxattr+1)*sizeof(attr[0]));
22++#else
23++			struct rtattr *attr[lu->maxattr+1];
24++#endif
25++			struct rtattr **data = NULL;
26+ 
27+ 			if (linkinfo[IFLA_INFO_DATA]) {
28+ 				parse_rtattr_nested(attr, lu->maxattr,
29+@@ -280,7 +285,12 @@ static void print_linktype(FILE *fp, struct rtattr *tb)
30+ 
31+ 		slave_lu = get_link_kind(slave);
32+ 		if (slave_lu && slave_lu->print_opt) {
33+-			struct rtattr *attr[slave_lu->maxattr+1], **data = NULL;
34++#ifdef __STDC_NO_VLA__
35++			struct rtattr **attr = alloca((slave_lu->maxattr+1)*sizeof(attr[0]));
36++#else
37++			struct rtattr *attr[slave_lu->maxattr+1];
38++#endif
39++			struct rtattr **data = NULL;
40+ 
41+ 			if (linkinfo[IFLA_INFO_SLAVE_DATA]) {
42+ 				parse_rtattr_nested(attr, slave_lu->maxattr,
43+-- 
44+2.34.1
45+
+36, -0
 1@@ -0,0 +1,36 @@
 2+From 610a720da48cb1b4de2364d70215450275edebcb Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 24 Jun 2019 17:38:56 -0700
 5+Subject: [PATCH] Use static inline function for min()
 6+
 7+It is only called to calculate a minimum `int`, so specialize for
 8+`int`.
 9+---
10+ include/utils.h | 11 ++++-------
11+ 1 file changed, 4 insertions(+), 7 deletions(-)
12+
13+diff --git a/include/utils.h b/include/utils.h
14+index b6c468e9..8bdbb369 100644
15+--- a/include/utils.h
16++++ b/include/utils.h
17+@@ -273,13 +273,10 @@ unsigned int print_name_and_link(const char *fmt,
18+ # define offsetof(type, member) ((size_t) &((type *)0)->member)
19+ #endif
20+ 
21+-#ifndef min
22+-# define min(x, y) ({			\
23+-	typeof(x) _min1 = (x);		\
24+-	typeof(y) _min2 = (y);		\
25+-	(void) (&_min1 == &_min2);	\
26+-	_min1 < _min2 ? _min1 : _min2; })
27+-#endif
28++static inline int min(int a, int b)
29++{
30++	return a < b ? a : b;
31++}
32+ 
33+ #ifndef __check_format_string
34+ # define __check_format_string(pos_str, pos_args) \
35+-- 
36+2.34.1
37+
+86, -0
 1@@ -0,0 +1,86 @@
 2+From 2a25102281f4863cba9a0f76246006a2dd545cf7 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Wed, 29 Jan 2020 15:36:37 -0800
 5+Subject: [PATCH] Use __typeof__ instead of typeof
 6+
 7+---
 8+ include/list.h | 18 +++++++++---------
 9+ lib/ll_map.c   |  2 +-
10+ 2 files changed, 10 insertions(+), 10 deletions(-)
11+
12+diff --git a/include/list.h b/include/list.h
13+index 7108cea7..36d73d96 100644
14+--- a/include/list.h
15++++ b/include/list.h
16+@@ -7,7 +7,7 @@
17+ 
18+ #ifdef __GNUC__
19+ #define container_of(ptr, type, member) ({			\
20+-	const typeof( ((type *)0)->member ) *__mptr = (ptr);	\
21++	const __typeof__( ((type *)0)->member ) *__mptr = (ptr);\
22+ 	(type *)( (char *)__mptr - offsetof(type,member) );})
23+ #else
24+ #define container_of(ptr, type, member) (			\
25+@@ -65,24 +65,24 @@ static inline void list_del(struct list_head *entry)
26+ 	list_entry((ptr)->prev, type, member)
27+ 
28+ #define list_next_entry(pos, member) \
29+-	list_entry((pos)->member.next, typeof(*(pos)), member)
30++	list_entry((pos)->member.next, __typeof__(*(pos)), member)
31+ 
32+ #define list_prev_entry(pos, member) \
33+-	list_entry((pos)->member.prev, typeof(*(pos)), member)
34++	list_entry((pos)->member.prev, __typeof__(*(pos)), member)
35+ 
36+ #define list_for_each_entry(pos, head, member)				\
37+-	for (pos = list_first_entry(head, typeof(*pos), member);	\
38++	for (pos = list_first_entry(head, __typeof__(*pos), member);	\
39+ 	     &pos->member != (head);					\
40+ 	     pos = list_next_entry(pos, member))
41+ 
42+ #define list_for_each_entry_safe(pos, n, head, member)			\
43+-	for (pos = list_first_entry(head, typeof(*pos), member),	\
44++	for (pos = list_first_entry(head, __typeof__(*pos), member),	\
45+ 		n = list_next_entry(pos, member);			\
46+ 	     &pos->member != (head);					\
47+ 	     pos = n, n = list_next_entry(n, member))
48+ 
49+ #define list_for_each_entry_reverse(pos, head, member)			\
50+-	for (pos = list_last_entry(head, typeof(*pos), member);		\
51++	for (pos = list_last_entry(head, __typeof(*pos)__, member);	\
52+ 	     &pos->member != (head);					\
53+ 	     pos = list_prev_entry(pos, member))
54+ 
55+@@ -127,13 +127,13 @@ static inline int list_empty(const struct list_head *head)
56+ 	     pos = n)
57+ 
58+ #define hlist_entry_safe(ptr, type, member) \
59+-	({ typeof(ptr) ____ptr = (ptr); \
60++	({ __typeof__(ptr) ____ptr = (ptr); \
61+ 	   ____ptr ? hlist_entry(____ptr, type, member) : NULL; \
62+ 	})
63+ 
64+ #define hlist_for_each_entry(pos, head, member)				\
65+-	for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
66++	for (pos = hlist_entry_safe((head)->first, __typeof__(*(pos)), member);\
67+ 	     pos;							\
68+-	     pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
69++	     pos = hlist_entry_safe((pos)->member.next, __typeof__(*(pos)), member))
70+ 
71+ #endif /* __LIST_H__ */
72+diff --git a/lib/ll_map.c b/lib/ll_map.c
73+index 36320f77..f0a6d494 100644
74+--- a/lib/ll_map.c
75++++ b/lib/ll_map.c
76+@@ -173,7 +173,7 @@ static void ll_altname_entries_update(struct ll_cache *parent_im,
77+ 	 * and if it does not fit 1:1, recreate the cached list
78+ 	 * from scratch.
79+ 	 */
80+-	im = list_first_entry(&parent_im->altnames_list, typeof(*im),
81++	im = list_first_entry(&parent_im->altnames_list, __typeof__(*im),
82+ 			      altnames_list);
83+ 	rem = RTA_PAYLOAD(proplist);
84+ 	for (i = RTA_DATA(proplist); RTA_OK(i, rem);
85+-- 
86+2.25.0
87+
+39, -0
 1@@ -0,0 +1,39 @@
 2+From d266a4f1050e083596723e25ce4ffb0be09ab162 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 4 Jun 2020 22:23:11 -0700
 5+Subject: [PATCH] Prevent redefinition of SIOCGSTAMP and SIOCGSTAMPNS
 6+
 7+---
 8+ include/uapi/linux/sockios.h | 8 ++++++++
 9+ 1 file changed, 8 insertions(+)
10+
11+diff --git a/include/uapi/linux/sockios.h b/include/uapi/linux/sockios.h
12+index 7d1bccbb..ef870187 100644
13+--- a/include/uapi/linux/sockios.h
14++++ b/include/uapi/linux/sockios.h
15+@@ -39,14 +39,22 @@
16+ 
17+ #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__))
18+ /* on 64-bit and x32, avoid the ?: operator */
19++#ifndef SIOCGSTAMP
20+ #define SIOCGSTAMP	SIOCGSTAMP_OLD
21++#endif
22++#ifndef SIOCGSTAMPNS
23+ #define SIOCGSTAMPNS	SIOCGSTAMPNS_OLD
24++#endif
25+ #else
26++#ifndef SIOCGSTAMP
27+ #define SIOCGSTAMP	((sizeof(struct timeval))  == 8 ? \
28+ 			 SIOCGSTAMP_OLD   : SIOCGSTAMP_NEW)
29++#endif
30++#ifndef SIOCGSTAMPNS
31+ #define SIOCGSTAMPNS	((sizeof(struct timespec)) == 8 ? \
32+ 			 SIOCGSTAMPNS_OLD : SIOCGSTAMPNS_NEW)
33+ #endif
34++#endif
35+ 
36+ /* Routing table calls. */
37+ #define SIOCADDRT	0x890B		/* add routing table entry	*/
38+-- 
39+2.27.0
40+
+32, -0
 1@@ -0,0 +1,32 @@
 2+From 47376a101469e5f559dba47066255af6f06dbe04 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 2 Jun 2020 03:56:03 -0700
 5+Subject: [PATCH] Revert change of BPF_F_* to enum constants
 6+
 7+---
 8+ include/uapi/linux/bpf.h | 8 +++-----
 9+ 1 file changed, 3 insertions(+), 5 deletions(-)
10+
11+diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
12+index 0c3a514a..964719f9 100644
13+--- a/include/uapi/linux/bpf.h
14++++ b/include/uapi/linux/bpf.h
15+@@ -5185,12 +5185,10 @@ enum {
16+ /* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and
17+  * BPF_FUNC_perf_event_read_value flags.
18+  */
19+-enum {
20+-	BPF_F_INDEX_MASK		= 0xffffffffULL,
21+-	BPF_F_CURRENT_CPU		= BPF_F_INDEX_MASK,
22++#define BPF_F_INDEX_MASK		0xffffffffULL
23++#define BPF_F_CURRENT_CPU		BPF_F_INDEX_MASK
24+ /* BPF_FUNC_perf_event_output for sk_buff input context. */
25+-	BPF_F_CTXLEN_MASK		= (0xfffffULL << 32),
26+-};
27++#define BPF_F_CTXLEN_MASK		(0xfffffULL << 32)
28+ 
29+ /* Current network namespace */
30+ enum {
31+-- 
32+2.34.1
33+
+32, -0
 1@@ -0,0 +1,32 @@
 2+From 5a2587077e91d489ad9708cf5614bb5fecbb02aa Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 2 Dec 2021 14:49:08 -0800
 5+Subject: [PATCH] Make struct bpf_timer include a named member
 6+
 7+A struct without any named members is undefined behavior by C11
 8+6.7.2.1p8.
 9+
10+Signed-off-by: Michael Forney <mforney@mforney.org>
11+---
12+ include/uapi/linux/bpf.h | 5 ++---
13+ 1 file changed, 2 insertions(+), 3 deletions(-)
14+
15+diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
16+index 964719f9..f71d7e90 100644
17+--- a/include/uapi/linux/bpf.h
18++++ b/include/uapi/linux/bpf.h
19+@@ -6250,9 +6250,8 @@ struct bpf_spin_lock {
20+ };
21+ 
22+ struct bpf_timer {
23+-	__u64 :64;
24+-	__u64 :64;
25+-} __attribute__((aligned(8)));
26++	__u64	reserved[2];
27++};
28+ 
29+ struct bpf_sysctl {
30+ 	__u32	write;		/* Sysctl is being read (= 0) or written (= 1).
31+-- 
32+2.34.1
33+
+45, -0
 1@@ -0,0 +1,45 @@
 2+From 203c2dcd7742802a8b7c21ab94251787377556bb Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 2 Dec 2021 16:28:42 -0800
 5+Subject: [PATCH] Fix overflow check for strtod and strtoul
 6+
 7+---
 8+ lib/utils.c | 6 ++++--
 9+ 1 file changed, 4 insertions(+), 2 deletions(-)
10+
11+diff --git a/lib/utils.c b/lib/utils.c
12+index e862e1d4..d5c2f4e3 100644
13+--- a/lib/utils.c
14++++ b/lib/utils.c
15+@@ -221,6 +221,7 @@ int get_time_rtt(unsigned int *val, const char *arg, int *raw)
16+ 	char *p;
17+ 
18+ 	if (strchr(arg, '.') != NULL) {
19++		errno = 0;
20+ 		t = strtod(arg, &p);
21+ 		if (t < 0.0)
22+ 			return -1;
23+@@ -230,9 +231,10 @@ int get_time_rtt(unsigned int *val, const char *arg, int *raw)
24+ 			return -1;
25+ 
26+ 		/* over/underflow */
27+-		if ((t == HUGE_VALF || t == HUGE_VALL) && errno == ERANGE)
28++		if (errno == ERANGE)
29+ 			return -1;
30+ 	} else {
31++		errno = 0;
32+ 		res = strtoul(arg, &p, 0);
33+ 
34+ 		/* empty string? */
35+@@ -240,7 +242,7 @@ int get_time_rtt(unsigned int *val, const char *arg, int *raw)
36+ 			return -1;
37+ 
38+ 		/* overflow */
39+-		if (res == ULONG_MAX && errno == ERANGE)
40++		if (errno == ERANGE)
41+ 			return -1;
42+ 
43+ 		t = (double)res;
44+-- 
45+2.34.0
46+
+25, -0
 1@@ -0,0 +1,25 @@
 2+From 32f3e01aeae44068c040bb999f8e7ece8609dba5 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sat, 4 Dec 2021 00:50:36 -0800
 5+Subject: [PATCH] Remove flexible array member in embedded struct
 6+
 7+---
 8+ include/uapi/linux/sctp.h | 2 +-
 9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/include/uapi/linux/sctp.h b/include/uapi/linux/sctp.h
12+index 53fdfafc..3a98a867 100644
13+--- a/include/uapi/linux/sctp.h
14++++ b/include/uapi/linux/sctp.h
15+@@ -577,7 +577,7 @@ struct sctp_stream_reset_event {
16+ 	__u16 strreset_flags;
17+ 	__u32 strreset_length;
18+ 	sctp_assoc_t strreset_assoc_id;
19+-	__u16 strreset_stream_list[];
20++	__u16 strreset_stream_list[0];
21+ };
22+ 
23+ #define SCTP_ASSOC_RESET_DENIED		0x0004
24+-- 
25+2.34.0
26+
+26, -0
 1@@ -0,0 +1,26 @@
 2+From 81bd67e0e190b01266d12e98f4feb41766b7fcfb Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 17 Feb 2022 23:07:55 -0800
 5+Subject: [PATCH] Include linux ax25.h header
 6+
 7+Fixes the build with musl libc.
 8+---
 9+ lib/ax25_ntop.c | 2 +-
10+ 1 file changed, 1 insertion(+), 1 deletion(-)
11+
12+diff --git a/lib/ax25_ntop.c b/lib/ax25_ntop.c
13+index cfd0e04b..3a72a43e 100644
14+--- a/lib/ax25_ntop.c
15++++ b/lib/ax25_ntop.c
16+@@ -2,7 +2,7 @@
17+ 
18+ #include <errno.h>
19+ #include <sys/socket.h>
20+-#include <netax25/ax25.h>
21++#include <linux/ax25.h>
22+ 
23+ #include "utils.h"
24+ 
25+-- 
26+2.34.1
27+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit ade99e208c1843ed3b6eb9d138aa15a6a5eb5219
+1, -0
1@@ -0,0 +1 @@
2+5.16.0 r0
+2, -0
1@@ -0,0 +1,2 @@
2+/less-590.tar.gz
3+/src
+142, -0
  1@@ -0,0 +1,142 @@
  2+#define BINDIR "/bin"
  3+#define SYSDIR "/etc"
  4+
  5+#define	SECURE		SECURE_COMPILE
  6+#define	SHELL_ESCAPE	(!SECURE)
  7+#define	EXAMINE		(!SECURE)
  8+#define	TAB_COMPLETE_FILENAME	(!SECURE)
  9+#define	CMD_HISTORY	1
 10+#define	HILITE_SEARCH	1
 11+#define	EDITOR		(!SECURE)
 12+#define	TAGS		(!SECURE)
 13+#define	USERFILE	(!SECURE)
 14+#define	GLOB		(!SECURE)
 15+#define	PIPEC		(!SECURE && HAVE_POPEN)
 16+#define	LOGFILE		(!SECURE)
 17+#define	GNU_OPTIONS	1
 18+#define	ONLY_RETURN	0
 19+#define	LESSKEYFILE		".less"
 20+#define	LESSKEYFILE_SYS		SYSDIR "/sysless"
 21+#define	DEF_LESSKEYINFILE	".lesskey"
 22+#define	LESSKEYINFILE_SYS	SYSDIR "/syslesskey"
 23+#define LESSHISTFILE		".lesshst"
 24+#define	MSDOS_COMPILER	0
 25+#define	PATHNAME_SEP	"/"
 26+#define TGETENT_OK  1
 27+#define HAVE_ANSI_PROTOS 1
 28+#define HAVE_SYS_TYPES_H 1
 29+/* #undef HAVE_SGSTAT_H */
 30+#define	HAVE_PERROR	1
 31+#define	HAVE_TIME	1
 32+#define	HAVE_SHELL	1
 33+#define	DEF_METACHARS	"; *?\t\n'\"()<>[]|&^`#\\$%=~{},"
 34+#define	DEF_METAESCAPE	"\\"
 35+#define	HAVE_DUP	1
 36+#define HAVE_MEMCPY 1
 37+#define HAVE_STRCHR 1
 38+#define HAVE_STRSTR 1
 39+#define HAVE_LESSKEYSRC 1
 40+#if 0 /* old sizes for small memory machines */
 41+#define	CMDBUF_SIZE	512	/* Buffer for multichar commands */
 42+#define	UNGOT_SIZE	100	/* Max chars to unget() */
 43+#define	LINEBUF_SIZE	1024	/* Max size of line in input file */
 44+#define	OUTBUF_SIZE	1024	/* Output buffer */
 45+#define	PROMPT_SIZE	200	/* Max size of prompt string */
 46+#define	TERMBUF_SIZE	2048	/* Termcap buffer for tgetent */
 47+#define	TERMSBUF_SIZE	1024	/* Buffer to hold termcap strings */
 48+#define	TAGLINE_SIZE	512	/* Max size of line in tags file */
 49+#define	TABSTOP_MAX	32	/* Max number of custom tab stops */
 50+#else /* more reasonable sizes for modern machines */
 51+#define	CMDBUF_SIZE	2048	/* Buffer for multichar commands */
 52+#define	UNGOT_SIZE	200	/* Max chars to unget() */
 53+#define	LINEBUF_SIZE	1024	/* Initial max size of line in input file */
 54+#define	OUTBUF_SIZE	1024	/* Output buffer */
 55+#define	PROMPT_SIZE	2048	/* Max size of prompt string */
 56+#define	TERMBUF_SIZE	2048	/* Termcap buffer for tgetent */
 57+#define	TERMSBUF_SIZE	1024	/* Buffer to hold termcap strings */
 58+#define	TAGLINE_SIZE	1024	/* Max size of line in tags file */
 59+#define	TABSTOP_MAX	128	/* Max number of custom tab stops */
 60+#endif
 61+#define EDIT_PGM "vi"
 62+#define HAVE_CONST 1
 63+#define HAVE_CTYPE_H 1
 64+#define HAVE_ERRNO 1
 65+#define HAVE_ERRNO_H 1
 66+#define HAVE_FCHMOD 1
 67+#define HAVE_FCNTL_H 1
 68+#define HAVE_FILENO 1
 69+#define HAVE_FLOAT 1
 70+#define HAVE_FSYNC 1
 71+/* #undef HAVE_GNU_REGEX */
 72+#define HAVE_INTTYPES_H 1
 73+#define HAVE_LIMITS_H 1
 74+#define HAVE_LOCALE 1
 75+#define HAVE_MEMORY_H 1
 76+#define HAVE_NANOSLEEP 1
 77+#define HAVE_OSPEED 1
 78+/* #undef HAVE_PCRE */
 79+/* #undef HAVE_PCRE2 */
 80+#define HAVE_POLL 1
 81+#define HAVE_POPEN 1
 82+#define HAVE_POSIX_REGCOMP 1
 83+#define HAVE_REALPATH 1
 84+/* #undef HAVE_REGCMP */
 85+/* #undef HAVE_REGEXEC2 */
 86+/* #undef HAVE_RE_COMP */
 87+#define HAVE_SIGEMPTYSET 1
 88+#define HAVE_SIGPROCMASK 1
 89+/* #undef HAVE_SIGSETMASK */
 90+#define HAVE_SIGSET_T 1
 91+#define HAVE_SNPRINTF 1
 92+#define HAVE_STAT 1
 93+#define HAVE_STAT_INO 1
 94+#define HAVE_STDINT_H 1
 95+#define HAVE_STDIO_H 1
 96+#define HAVE_STDLIB_H 1
 97+#define HAVE_STRERROR 1
 98+#define HAVE_STRINGS_H 1
 99+#define HAVE_STRING_H 1
100+#define HAVE_SYSTEM 1
101+#define HAVE_SYS_ERRLIST 1
102+#define HAVE_SYS_IOCTL_H 1
103+#define HAVE_SYS_STAT_H 1
104+/* #undef HAVE_SYS_STREAM_H */
105+#define HAVE_SYS_TYPES_H 1
106+#define HAVE_TERMCAP_H 1
107+#define HAVE_TERMIOS_FUNCS 1
108+#define HAVE_TERMIOS_H 1
109+/* #undef HAVE_TERMIO_H */
110+#define HAVE_TIME_H 1
111+#define HAVE_TIME_T 1
112+#define HAVE_TTYNAME 1
113+#define HAVE_UNISTD_H 1
114+#define HAVE_UPPER_LOWER 1
115+#define HAVE_USLEEP 1
116+/* #undef HAVE_V8_REGCOMP */
117+#define HAVE_VALUES_H 1
118+#define HAVE_VOID 1
119+#define HAVE_WCTYPE 1
120+#define HAVE_WCTYPE_H 1
121+#define HAVE__SETJMP 1
122+/* #undef MUST_DEFINE_ERRNO */
123+/* #undef MUST_DEFINE_OSPEED */
124+/* #undef NO_REGEX */
125+#define PACKAGE_BUGREPORT ""
126+#define PACKAGE_NAME "less"
127+#define PACKAGE_STRING "less 1"
128+#define PACKAGE_TARNAME "less"
129+#define PACKAGE_URL ""
130+#define PACKAGE_VERSION "1"
131+#define RETSIGTYPE void
132+#define SECURE_COMPILE 0
133+/* #undef STAT_MACROS_BROKEN */
134+#define STDC_HEADERS 1
135+#define TIME_WITH_SYS_TIME 1
136+#ifndef _DARWIN_USE_64_BIT_INODE
137+# define _DARWIN_USE_64_BIT_INODE 1
138+#endif
139+/* #undef _FILE_OFFSET_BITS */
140+/* #undef _LARGE_FILES */
141+/* #undef const */
142+/* #undef off_t */
143+/* #undef size_t */
+37, -0
 1@@ -0,0 +1,37 @@
 2+cflags{
 3+	'-I $dir',
 4+	'-isystem $builddir/pkg/netbsd-curses/include',
 5+}
 6+
 7+objects[[
 8+	lesskey_parse.c
 9+	version.c
10+	xbuf.c
11+]]
12+
13+exe('less', [[
14+	main.c screen.c brac.c ch.c charset.c cmdbuf.c
15+	command.c cvt.c decode.c edit.c filename.c forwback.c
16+	help.c ifile.c input.c jump.c line.c linenum.c
17+	lsystem.c mark.c optfunc.c option.c opttbl.c os.c
18+	output.c pattern.c position.c prompt.c search.c signal.c
19+	tags.c ttyin.c version.c.o xbuf.c.o
20+	lesskey_parse.c.o
21+	$builddir/pkg/netbsd-curses/libcurses.a.d
22+]], {'pkg/netbsd-curses/headers'})
23+file('bin/less', '755', '$outdir/less')
24+
25+exe('lessecho', {'lessecho.c', 'version.c.o'})
26+file('bin/lessecho', '755', '$outdir/lessecho')
27+
28+exe('lesskey', {'lesskey.c', 'lesskey_parse.c.o', 'xbuf.c.o', 'version.c.o'})
29+file('bin/lesskey', '755', '$outdir/lesskey')
30+
31+for _, cmd in ipairs{'less', 'lessecho', 'lesskey'} do
32+	build('gzip', '$outdir/'..cmd..'.1.gz', '$srcdir/'..cmd..'.nro')
33+	file('share/man/man1/'..cmd..'.1.gz', '644', '$outdir/'..cmd..'.1.gz')
34+end
35+
36+sym('bin/more', 'less')
37+
38+fetch 'curl'
+49, -0
 1@@ -0,0 +1,49 @@
 2+From a13b37473388ed731c2dc96c6bf2b053a4de26c3 Mon Sep 17 00:00:00 2001
 3+From: Mark Nudelman <markn@greenwoodsoftware.com>
 4+Date: Tue, 27 Jul 2021 10:33:14 -0700
 5+Subject: [PATCH] Fix compiler warning.
 6+
 7+---
 8+ funcs.h | 2 +-
 9+ xbuf.c  | 2 +-
10+ xbuf.h  | 2 +-
11+ 3 files changed, 3 insertions(+), 3 deletions(-)
12+
13+diff --git a/funcs.h b/funcs.h
14+index 330540a..29de5d3 100644
15+--- a/funcs.h
16++++ b/funcs.h
17+@@ -351,4 +351,4 @@ public int getchr LESSPARAMS ((VOID_PARAM));
18+ public void xbuf_init LESSPARAMS ((struct xbuffer *xbuf));
19+ public void xbuf_deinit LESSPARAMS ((struct xbuffer *xbuf));
20+ public void xbuf_reset LESSPARAMS ((struct xbuffer *xbuf));
21+-public void xbuf_add LESSPARAMS ((struct xbuffer *xbuf, char ch));
22++public void xbuf_add LESSPARAMS ((struct xbuffer *xbuf, int ch));
23+diff --git a/xbuf.c b/xbuf.c
24+index f20dfae..cc6ec47 100644
25+--- a/xbuf.c
26++++ b/xbuf.c
27+@@ -34,7 +34,7 @@ xbuf_reset(xbuf)
28+ 	public void
29+ xbuf_add(xbuf, ch)
30+ 	struct xbuffer *xbuf;
31+-	char ch;
32++	int ch;
33+ {
34+ 	if (xbuf->end >= xbuf->size)
35+ 	{
36+diff --git a/xbuf.h b/xbuf.h
37+index ba62ef1..b6bd160 100644
38+--- a/xbuf.h
39++++ b/xbuf.h
40+@@ -10,6 +10,6 @@ struct xbuffer
41+ 
42+ void xbuf_init(struct xbuffer *xbuf);
43+ void xbuf_reset(struct xbuffer *xbuf);
44+-void xbuf_add(struct xbuffer *xbuf, char ch);
45++void xbuf_add(struct xbuffer *xbuf, int ch);
46+ 
47+ #endif
48+-- 
49+2.32.0
50+
+1, -0
1@@ -0,0 +1 @@
2+6aadf54be8bf57d0e2999a3c5d67b1de63808bb90deb8f77b028eafae3a08e10  less-590.tar.gz
+1, -0
1@@ -0,0 +1 @@
2+url = "http://www.greenwoodsoftware.com/less/less-590.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+590 r0
+1, -0
1@@ -0,0 +1 @@
2+#define CBOR_EXPORT
+69, -0
 1@@ -0,0 +1,69 @@
 2+cflags{
 3+	'-Wall', '-Wpedantic',
 4+	'-D HAVE_ENDIAN_H',
 5+	'-I $outdir/include',
 6+}
 7+
 8+build('sed', '$outdir/include/cbor/configuration.h', '$srcdir/src/cbor/configuration.h.in', {
 9+	expr={
10+		[[-e 's,$${CBOR_VERSION_MAJOR},0,']],
11+		[[-e 's,$${CBOR_VERSION_MINOR},9,']],
12+		[[-e 's,$${CBOR_VERSION_PATCH},0,']],
13+		[[-e 's,$${CBOR_BUFFER_GROWTH},2,']],
14+		[[-e 's,$${CBOR_MAX_STACK_SIZE},2048,']],
15+		[[-e 's,$${CBOR_RESTRICT_SPECIFIER},restrict,']],
16+		[[-e 's,$${CBOR_INLINE_SPECIFIER},inline,']],
17+		'-e /CBOR_CUSTOM_ALLOC/d',
18+		'-e /CBOR_PRETTY_PRINTER/d',
19+	},
20+})
21+
22+pkg.hdrs = {
23+	copy('$outdir/include', '$srcdir/src', {
24+		'cbor.h',
25+		'cbor/arrays.h',
26+		'cbor/bytestrings.h',
27+		'cbor/callbacks.h',
28+		'cbor/common.h',
29+		'cbor/data.h',
30+		'cbor/encoding.h',
31+		'cbor/floats_ctrls.h',
32+		'cbor/ints.h',
33+		'cbor/maps.h',
34+		'cbor/serialization.h',
35+		'cbor/streaming.h',
36+		'cbor/strings.h',
37+		'cbor/tags.h',
38+	}),
39+	copy('$outdir/include/cbor', '$dir', {'cbor_export.h'}),
40+	'$outdir/include/cbor/configuration.h',
41+}
42+pkg.deps = {'$gendir/headers'}
43+
44+lib('libcbor.a', [[
45+	src/cbor.c
46+	src/cbor/(
47+		streaming.c
48+		internal/(
49+			encoders.c
50+			builder_callbacks.c
51+			loaders.c
52+			memory_utils.c
53+			stack.c
54+			unicode.c
55+		)
56+		encoding.c
57+		serialization.c
58+		arrays.c
59+		common.c
60+		floats_ctrls.c
61+		bytestrings.c
62+		callbacks.c
63+		strings.c
64+		maps.c
65+		tags.c
66+		ints.c
67+	)
68+]])
69+
70+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 58b3319b8c3ec15171cb00f01a3a1e9d400899e1
+1, -0
1@@ -0,0 +1 @@
2+0.9.0 r0
+195, -0
  1@@ -0,0 +1,195 @@
  2+/* disabled to prevent building extra backends */
  3+/* #undef HAVE_POLL */
  4+/* #undef HAVE_SELECT */
  5+
  6+#define DISABLE_DEBUG_MODE 1
  7+#define DISABLE_MM_REPLACEMENT 1
  8+/* #undef DISABLE_THREAD_SUPPORT */
  9+#define HAVE_ACCEPT4 1
 10+/* #undef HAVE_AFUNIX_H */
 11+/* #undef HAVE_ARC4RANDOM */
 12+/* #undef HAVE_ARC4RANDOM_ADDRANDOM */
 13+/* #undef HAVE_ARC4RANDOM_BUF */
 14+#define HAVE_ARPA_INET_H 1
 15+#define HAVE_CLOCK_GETTIME 1
 16+/* #undef HAVE_DECL_CTL_KERN */
 17+/* #undef HAVE_DECL_KERN_ARND */
 18+/* #undef HAVE_DEVPOLL */
 19+#define HAVE_DLFCN_H 1
 20+#define HAVE_EPOLL 1
 21+#define HAVE_EPOLL_CREATE1 1
 22+#define HAVE_EPOLL_CTL 1
 23+#define HAVE_ERRNO_H 1
 24+#define HAVE_EVENTFD 1
 25+/* #undef HAVE_EVENT_PORTS */
 26+#define HAVE_FCNTL 1
 27+#define HAVE_FCNTL_H 1
 28+#define HAVE_FD_MASK 1
 29+#define HAVE_GETADDRINFO 1
 30+#define HAVE_GETEGID 1
 31+#define HAVE_GETEUID 1
 32+/* #undef HAVE_GETHOSTBYNAME_R */
 33+/* #undef HAVE_GETHOSTBYNAME_R_3_ARG */
 34+/* #undef HAVE_GETHOSTBYNAME_R_5_ARG */
 35+/* #undef HAVE_GETHOSTBYNAME_R_6_ARG */
 36+#define HAVE_GETIFADDRS 1
 37+#define HAVE_GETNAMEINFO 1
 38+#define HAVE_GETPROTOBYNUMBER 1
 39+#define HAVE_GETRANDOM 1
 40+#define HAVE_GETSERVBYNAME 1
 41+#define HAVE_GETTIMEOFDAY 1
 42+#define HAVE_IFADDRS_H 1
 43+#define HAVE_INET_NTOP 1
 44+#define HAVE_INET_PTON 1
 45+#define HAVE_INTTYPES_H 1
 46+#define HAVE_ISSETUGID 1
 47+/* #undef HAVE_KQUEUE */
 48+/* #undef HAVE_LIBWS2_32 */
 49+/* #undef HAVE_LIBZ */
 50+/* #undef HAVE_MACH_ABSOLUTE_TIME */
 51+/* #undef HAVE_MACH_MACH_H */
 52+/* #undef HAVE_MACH_MACH_TIME_H */
 53+#define HAVE_MEMORY_H 1
 54+#define HAVE_MMAP 1
 55+#define HAVE_NANOSLEEP 1
 56+#define HAVE_NETDB_H 1
 57+/* #undef HAVE_NETINET_IN6_H */
 58+#define HAVE_NETINET_IN_H 1
 59+#define HAVE_NETINET_TCP_H 1
 60+/* #undef HAVE_OPENSSL */
 61+/* #undef HAVE_OPENSSL_SSL_H */
 62+#define HAVE_PIPE 1
 63+#define HAVE_PIPE2 1
 64+#define HAVE_POLL_H 1
 65+/* #undef HAVE_PORT_CREATE */
 66+/* #undef HAVE_PORT_H */
 67+/* #undef HAVE_PTHREAD */
 68+#define HAVE_PTHREADS 1
 69+#define HAVE_PUTENV 1
 70+#define HAVE_SA_FAMILY_T 1
 71+#define HAVE_SENDFILE 1
 72+#define HAVE_SETENV 1
 73+#define HAVE_SETFD 1
 74+#define HAVE_SETRLIMIT 1
 75+#define HAVE_SIGACTION 1
 76+#define HAVE_SIGNAL 1
 77+#define HAVE_SPLICE 1
 78+#define HAVE_STDARG_H 1
 79+#define HAVE_STDDEF_H 1
 80+#define HAVE_STDINT_H 1
 81+#define HAVE_STDLIB_H 1
 82+#define HAVE_STRINGS_H 1
 83+#define HAVE_STRING_H 1
 84+#define HAVE_STRLCPY 1
 85+#define HAVE_STRSEP 1
 86+#define HAVE_STRTOK_R 1
 87+#define HAVE_STRTOLL 1
 88+#define HAVE_STRUCT_ADDRINFO 1
 89+#define HAVE_STRUCT_IN6_ADDR 1
 90+#define HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1
 91+#define HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1
 92+#define HAVE_STRUCT_LINGER 1
 93+#define HAVE_STRUCT_SOCKADDR_IN6 1
 94+/* #undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN */
 95+/* #undef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
 96+#define HAVE_STRUCT_SOCKADDR_STORAGE 1
 97+#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
 98+/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */
 99+#define HAVE_STRUCT_SOCKADDR_UN 1
100+/* #undef HAVE_SYSCTL */
101+/* #undef HAVE_SYS_DEVPOLL_H */
102+#define HAVE_SYS_EPOLL_H 1
103+#define HAVE_SYS_EVENTFD_H 1
104+/* #undef HAVE_SYS_EVENT_H */
105+#define HAVE_SYS_IOCTL_H 1
106+#define HAVE_SYS_MMAN_H 1
107+#define HAVE_SYS_PARAM_H 1
108+/* #undef HAVE_SYS_QUEUE_H */
109+#define HAVE_SYS_RANDOM_H 1
110+#define HAVE_SYS_RESOURCE_H 1
111+#define HAVE_SYS_SELECT_H 1
112+#define HAVE_SYS_SENDFILE_H 1
113+#define HAVE_SYS_SOCKET_H 1
114+#define HAVE_SYS_STAT_H 1
115+/* #undef HAVE_SYS_SYSCTL_H */
116+#define HAVE_SYS_TIMERFD_H 1
117+#define HAVE_SYS_TIME_H 1
118+#define HAVE_SYS_TYPES_H 1
119+#define HAVE_SYS_UIO_H 1
120+#define HAVE_SYS_UN_H 1
121+#define HAVE_SYS_WAIT_H 1
122+/* #undef HAVE_TAILQFOREACH */
123+#define HAVE_TIMERADD 1
124+#define HAVE_TIMERCLEAR 1
125+#define HAVE_TIMERCMP 1
126+#define HAVE_TIMERFD_CREATE 1
127+#define HAVE_TIMERISSET 1
128+#define HAVE_UINT16_T 1
129+#define HAVE_UINT32_T 1
130+#define HAVE_UINT64_T 1
131+#define HAVE_UINT8_T 1
132+#define HAVE_UINTPTR_T 1
133+#define HAVE_UMASK 1
134+#define HAVE_UNISTD_H 1
135+#define HAVE_UNSETENV 1
136+#define HAVE_USLEEP 1
137+#define HAVE_VASPRINTF 1
138+/* #undef HAVE_WORKING_KQUEUE */
139+/* #undef HAVE_ZLIB_H */
140+/* #undef HAVE__GMTIME64 */
141+/* #undef HAVE__GMTIME64_S */
142+#define HAVE___FUNCTION__ 1
143+#define HAVE___func__ 1
144+#define LT_OBJDIR ".libs/"
145+#define NUMERIC_VERSION 0x02010c00
146+#define PACKAGE "libevent"
147+#define PACKAGE_BUGREPORT ""
148+#define PACKAGE_NAME "libevent"
149+#define PACKAGE_STRING "libevent 2.1.12-stable"
150+#define PACKAGE_TARNAME "libevent"
151+#define PACKAGE_URL ""
152+#define PACKAGE_VERSION "2.1.12-stable"
153+/* #undef PTHREAD_CREATE_JOINABLE */
154+#define SIZEOF_INT 4
155+#define SIZEOF_LONG 8
156+#define SIZEOF_LONG_LONG 8
157+#define SIZEOF_OFF_T 8
158+#define SIZEOF_PTHREAD_T 8
159+#define SIZEOF_SHORT 2
160+#define SIZEOF_SIZE_T 8
161+#define SIZEOF_TIME_T 8
162+#define SIZEOF_VOID_P 8
163+#define STDC_HEADERS 1
164+#define TIME_WITH_SYS_TIME 1
165+#ifndef _ALL_SOURCE
166+# define _ALL_SOURCE 1
167+#endif
168+#ifndef _GNU_SOURCE
169+# define _GNU_SOURCE 1
170+#endif
171+#ifndef _POSIX_PTHREAD_SEMANTICS
172+# define _POSIX_PTHREAD_SEMANTICS 1
173+#endif
174+#ifndef _TANDEM_SOURCE
175+# define _TANDEM_SOURCE 1
176+#endif
177+#ifndef __EXTENSIONS__
178+# define __EXTENSIONS__ 1
179+#endif
180+#define VERSION "2.1.12-stable"
181+#ifndef _DARWIN_USE_64_BIT_INODE
182+# define _DARWIN_USE_64_BIT_INODE 1
183+#endif
184+/* #undef _FILE_OFFSET_BITS */
185+/* #undef _LARGE_FILES */
186+/* #undef _MINIX */
187+/* #undef _POSIX_1_SOURCE */
188+/* #undef _POSIX_SOURCE */
189+/* #undef const */
190+#ifndef __cplusplus
191+/* #undef inline */
192+#endif
193+/* #undef pid_t */
194+/* #undef size_t */
195+/* #undef socklen_t */
196+/* #undef ssize_t */
+0, -0
+55, -0
 1@@ -0,0 +1,55 @@
 2+cflags{
 3+	'-I $dir',
 4+	'-I $outdir/include',
 5+	'-I $srcdir/include',
 6+	'-isystem $builddir/pkg/openbsd/include',
 7+}
 8+
 9+build('sed', '$outdir/include/event2/event-config.h', {'$dir/config.h', '|', '$srcdir/make-event-config.sed'}, {
10+	expr='-f $srcdir/make-event-config.sed',
11+})
12+
13+pkg.hdrs = {
14+	copy('$outdir/include/event2', '$srcdir/include/event2', {
15+		'buffer.h',
16+		'bufferevent.h',
17+		'dns.h',
18+		'event.h',
19+		'http.h',
20+		'http_struct.h',
21+		'util.h',
22+		'visibility.h',
23+	}),
24+	'$outdir/include/event2/event-config.h',
25+}
26+pkg.deps = {
27+	'$gendir/headers',
28+	'pkg/openbsd/headers',
29+}
30+
31+lib('libevent.a', {
32+	'buffer.c',
33+	'bufferevent.c',
34+	'bufferevent_filter.c',
35+	'bufferevent_pair.c',
36+	'bufferevent_ratelim.c',
37+	'bufferevent_sock.c',
38+	'event.c',
39+	'evmap.c',
40+	'evthread.c',
41+	'evutil.c',
42+	'evutil_rand.c',
43+	'evutil_time.c',
44+	'listener.c',
45+	'log.c',
46+
47+	'evdns.c',
48+	'event_tagging.c',
49+	'evrpc.c',
50+	'http.c',
51+
52+	'epoll.c',
53+	'signal.c',
54+})
55+
56+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 5df3037d10556bfcb675bc73e516978b75fc7bc7
+1, -0
1@@ -0,0 +1 @@
2+2.1.12 r0
+30, -0
 1@@ -0,0 +1,30 @@
 2+#define _FIDO_MAJOR 1
 3+#define _FIDO_MINOR 9
 4+#define _FIDO_PATCH 0
 5+#ifdef HAVE__THREAD_LOCAL
 6+# define TLS _Thread_local
 7+#endif
 8+/* #undef HAVE_ARC4RANDOM_BUF */
 9+#define HAVE_CLOCK_GETTIME
10+#define HAVE_DEV_URANDOM
11+#define HAVE_ENDIAN_H
12+#define HAVE_ERR_H
13+#define HAVE_EXPLICIT_BZERO
14+#define HAVE_FREEZERO
15+#define HAVE_GETLINE
16+#define HAVE_GETOPT
17+#define HAVE_GETPAGESIZE
18+#define HAVE_GETRANDOM
19+/* #undef HAVE_MEMSET_S */
20+#define HAVE_POSIX_IOCTL
21+#define HAVE_READPASSPHRASE
22+#define HAVE_RECALLOCARRAY
23+#define HAVE_SIGNAL_H
24+#define HAVE_STRLCAT
25+#define HAVE_STRLCPY
26+#define HAVE_STRSEP
27+#define HAVE_SYSCONF
28+#define HAVE_SYS_RANDOM_H
29+/* #undef HAVE_TIMESPECSUB */
30+#define HAVE_TIMINGSAFE_BCMP
31+#define HAVE_UNISTD_H
+109, -0
  1@@ -0,0 +1,109 @@
  2+cflags{
  3+	'-std=c11', '-Wall', '-Wextra', '-Wpedantic',
  4+	'-Wno-overflow',  -- ioctl opcode conversion
  5+	'-include $outdir/config.h',
  6+	'-D _GNU_SOURCE',
  7+	'-D _DEFAULT_SOURCE',
  8+	'-D _FIDO_INTERNAL',
  9+	'-I $srcdir/src',
 10+	'-isystem $basedir/pkg/openbsd/include',
 11+	'-isystem $builddir/pkg/bearssl/include',
 12+	'-isystem $builddir/pkg/libcbor/include',
 13+	'-isystem $builddir/pkg/linux-headers/include',
 14+	'-isystem $builddir/pkg/zlib/include',
 15+}
 16+
 17+pkg.hdrs = copy('$outdir/include', '$srcdir/src', {
 18+	'fido.h',
 19+	'fido/credman.h',
 20+	'fido/err.h',
 21+	'fido/param.h',
 22+	'fido/types.h',
 23+})
 24+pkg.deps = {
 25+	'$outdir/config.h',
 26+	'pkg/bearssl/headers',
 27+	'pkg/libcbor/headers',
 28+	'pkg/linux-headers/headers',
 29+	'pkg/zlib/headers',
 30+}
 31+
 32+build('cat', '$outdir/config.h', {
 33+	'$builddir/probe/HAVE__THREAD_LOCAL',
 34+	'$dir/config.h',
 35+})
 36+
 37+lib('libfido2.a', [[
 38+	src/(
 39+		aes256.c
 40+		assert.c
 41+		authkey.c
 42+		bio.c
 43+		blob.c
 44+		buf.c
 45+		cbor.c
 46+		compress.c
 47+		config.c
 48+		cred.c
 49+		credman.c
 50+		dev.c
 51+		ecdh.c
 52+		eddsa.c
 53+		err.c
 54+		es256.c
 55+		hid.c
 56+		info.c
 57+		io.c
 58+		iso7816.c
 59+		largeblob.c
 60+		log.c
 61+		pin.c
 62+		random.c
 63+		reset.c
 64+		rs1.c
 65+		rs256.c
 66+		time.c
 67+		tpm.c
 68+		types.c
 69+		u2f.c
 70+
 71+		hid_linux.c
 72+		hid_unix.c
 73+	)
 74+	$builddir/pkg/bearssl/libbearssl.a
 75+	$builddir/pkg/libcbor/libcbor.a
 76+	$builddir/pkg/openbsd/libbsd.a
 77+	$builddir/pkg/zlib/libz.a
 78+]])
 79+
 80+lib('libcommon.a', [[tools/(base64.c util.c)]])
 81+
 82+exe('fido2-cred', [[
 83+	tools/(
 84+		fido2-cred.c
 85+		cred_make.c
 86+		cred_verify.c
 87+	)
 88+	libcommon.a
 89+	libfido2.a.d
 90+]])
 91+file('bin/fido2-cred', '755', '$outdir/fido2-cred')
 92+man{'man/fido2-cred.1'}
 93+
 94+exe('fido2-token', [[
 95+	tools/(
 96+		fido2-token.c
 97+		bio.c
 98+		config.c
 99+		credman.c
100+		largeblob.c
101+		pin.c
102+		token.c
103+	)
104+	libcommon.a
105+	libfido2.a.d
106+]])
107+file('bin/fido2-token', '755', '$outdir/fido2-token')
108+man{'man/fido2-token.1'}
109+
110+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 328395f410034d93d806bd36c9aa1584d802cd2e
+1, -0
1@@ -0,0 +1 @@
2+1.9.0 r0
+28, -0
 1@@ -0,0 +1,28 @@
 2+/* #undef DISABLE_PTHREADS */
 3+#define HAVE_DLFCN_H 1
 4+#define HAVE_INTTYPES_H 1
 5+#define HAVE_LIBPTHREAD 1
 6+#define HAVE_MEMORY_H 1
 7+#define HAVE_STDINT_H 1
 8+#define HAVE_STDLIB_H 1
 9+#define HAVE_STRERROR_L 1
10+#define HAVE_STRINGS_H 1
11+#define HAVE_STRING_H 1
12+#define HAVE_SYS_STAT_H 1
13+#define HAVE_SYS_TYPES_H 1
14+#define HAVE_UNISTD_H 1
15+#define LT_OBJDIR ".libs/"
16+#define NL_DEBUG 1
17+#define PACKAGE "libnl"
18+#define PACKAGE_BUGREPORT ""
19+#define PACKAGE_NAME "libnl"
20+#define PACKAGE_STRING "libnl 3.5.0"
21+#define PACKAGE_TARNAME "libnl"
22+#define PACKAGE_URL "http://www.infradead.org/~tgr/libnl/"
23+#define PACKAGE_VERSION "3.5.0"
24+#define STDC_HEADERS 1
25+#define VERSION "3.5.0"
26+/* #undef const */
27+#ifndef __cplusplus
28+/* #undef inline */
29+#endif
+66, -0
 1@@ -0,0 +1,66 @@
 2+cflags{
 3+	'-D _GNU_SOURCE',
 4+	string.format([[-D 'SYSCONFDIR="%s/etc/libnl"']], config.prefix),
 5+	'-I $dir',
 6+	'-I $outdir/include',
 7+	'-I $srcdir/include',
 8+	'-I $srcdir/include/linux-private',
 9+	'-isystem $builddir/pkg/linux-headers/include',
10+}
11+
12+build('sed', '$outdir/include/netlink/version.h', '$srcdir/include/netlink/version.h.in', {
13+	expr={
14+		'-e s,@PACKAGE_STRING@,\'libnl 3.5.0\',',
15+		'-e s,@PACKAGE_VERSION@,3.5.0,',
16+		'-e s,@MAJ_VERSION@,3,',
17+		'-e s,@MIN_VERSION@,5,',
18+		'-e s,@MIC_VERSION@,0,',
19+		'-e s,@LT_CURRENT@,226,',
20+		'-e s,@LT_REVISION@,0,',
21+		'-e s,@LT_AGE@,26,',
22+	},
23+})
24+
25+pkg.hdrs = {
26+	copy('$outdir/include/netlink', '$srcdir/include/netlink', {
27+		'addr.h',
28+		'attr.h',
29+		'cache.h',
30+		'cache-api.h',
31+		'data.h',
32+		'errno.h',
33+		'handlers.h',
34+		'hash.h',
35+		'hashtable.h',
36+		'list.h',
37+		'msg.h',
38+		'netlink.h',
39+		'netlink-compat.h',
40+		'netlink-kernel.h',
41+		'object.h',
42+		'object-api.h',
43+		'socket.h',
44+		'types.h',
45+		'utils.h',
46+		'genl/ctrl.h',
47+		'genl/family.h',
48+		'genl/genl.h',
49+		'genl/mngt.h',
50+	}),
51+	'$outdir/include/netlink/version.h',
52+}
53+
54+pkg.deps = {
55+	'$gendir/headers',
56+	'pkg/linux-headers/headers',
57+}
58+
59+lib('libnl-3.a', [[lib/(
60+	addr.c attr.c cache.c cache_mngr.c cache_mngt.c data.c
61+	error.c handlers.c msg.c nl.c object.c socket.c utils.c
62+	version.c hash.c hashtable.c mpls.c
63+)]])
64+
65+lib('libnl-genl-3.a', 'lib/genl/(ctrl.c family.c genl.c mngt.c)')
66+
67+fetch 'git'
+123, -0
  1@@ -0,0 +1,123 @@
  2+From 5205a990e10f9bf1102c719198f82aba342cbca5 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sun, 11 Aug 2019 05:05:09 +0000
  5+Subject: [PATCH] Use static inline functions for min and max
  6+
  7+These generic macros were only ever used with type `int`, and making
  8+them inline functions avoids the use of non-standard statement
  9+expressions.
 10+---
 11+ include/netlink-private/netlink.h | 27 +++++++++++----------------
 12+ lib/attr.c                        |  2 +-
 13+ lib/msg.c                         |  2 +-
 14+ lib/route/cls/ematch_syntax.y     |  2 +-
 15+ lib/route/link/inet.c             |  2 +-
 16+ lib/route/link/inet6.c            |  2 +-
 17+ 6 files changed, 16 insertions(+), 21 deletions(-)
 18+
 19+diff --git a/include/netlink-private/netlink.h b/include/netlink-private/netlink.h
 20+index 5f6e3f7..fca3133 100644
 21+--- a/include/netlink-private/netlink.h
 22++++ b/include/netlink-private/netlink.h
 23+@@ -158,22 +158,17 @@ static inline int nl_cb_call(struct nl_cb *cb, enum nl_cb_type type, struct nl_m
 24+ #undef __deprecated
 25+ #define __deprecated __attribute__ ((deprecated))
 26+ 
 27+-#define min(x,y) ({ \
 28+-	__typeof__(x) _x = (x);	\
 29+-	__typeof__(y) _y = (y);	\
 30+-	(void) (&_x == &_y);		\
 31+-	_x < _y ? _x : _y; })
 32+-
 33+-#define max(x,y) ({ \
 34+-	__typeof__(x) _x = (x);	\
 35+-	__typeof__(y) _y = (y);	\
 36+-	(void) (&_x == &_y);		\
 37+-	_x > _y ? _x : _y; })
 38+-
 39+-#define min_t(type,x,y) \
 40+-	({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
 41+-#define max_t(type,x,y) \
 42+-	({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
 43++static inline int
 44++min(int x, int y)
 45++{
 46++	return x < y ? x : y;
 47++}
 48++
 49++static inline int
 50++max(int x, int y)
 51++{
 52++	return x > y ? x : y;
 53++}
 54+ 
 55+ extern int nl_cache_parse(struct nl_cache_ops *, struct sockaddr_nl *,
 56+ 			  struct nlmsghdr *, struct nl_parser_param *);
 57+diff --git a/lib/attr.c b/lib/attr.c
 58+index a4f5852..025627e 100644
 59+--- a/lib/attr.c
 60++++ b/lib/attr.c
 61+@@ -358,7 +358,7 @@ int nla_memcpy(void *dest, const struct nlattr *src, int count)
 62+ 	if (!src)
 63+ 		return 0;
 64+ 	
 65+-	minlen = min_t(int, count, nla_len(src));
 66++	minlen = min(count, nla_len(src));
 67+ 	memcpy(dest, nla_data(src), minlen);
 68+ 
 69+ 	return minlen;
 70+diff --git a/lib/msg.c b/lib/msg.c
 71+index c08b3a4..d854df3 100644
 72+--- a/lib/msg.c
 73++++ b/lib/msg.c
 74+@@ -155,7 +155,7 @@ struct nlattr *nlmsg_attrdata(const struct nlmsghdr *nlh, int hdrlen)
 75+  */
 76+ int nlmsg_attrlen(const struct nlmsghdr *nlh, int hdrlen)
 77+ {
 78+-	return max_t(int, nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen), 0);
 79++	return max(nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen), 0);
 80+ }
 81+ 
 82+ /** @} */
 83+diff --git a/lib/route/cls/ematch_syntax.y b/lib/route/cls/ematch_syntax.y
 84+index 82d753d..88665cc 100644
 85+--- a/lib/route/cls/ematch_syntax.y
 86++++ b/lib/route/cls/ematch_syntax.y
 87+@@ -411,7 +411,7 @@ pattern:
 88+ 			if (nl_addr_parse($1, AF_UNSPEC, &addr) == 0) {
 89+ 				$$.len = nl_addr_get_len(addr);
 90+ 
 91+-				$$.index = min_t(int, $$.len, nl_addr_get_prefixlen(addr)/8);
 92++				$$.index = min($$.len, nl_addr_get_prefixlen(addr)/8);
 93+ 
 94+ 				if (!($$.data = calloc(1, $$.len))) {
 95+ 					nl_addr_put(addr);
 96+diff --git a/lib/route/link/inet.c b/lib/route/link/inet.c
 97+index 6651bc3..e33a3fe 100644
 98+--- a/lib/route/link/inet.c
 99++++ b/lib/route/link/inet.c
100+@@ -110,7 +110,7 @@ static int inet_parse_af(struct rtnl_link *link, struct nlattr *attr, void *data
101+ 
102+ 	if (tb[IFLA_INET_CONF]) {
103+ 		int i;
104+-		int len = min_t(int, IPV4_DEVCONF_MAX, nla_len(tb[IFLA_INET_CONF]) / 4);
105++		int len = min(IPV4_DEVCONF_MAX, nla_len(tb[IFLA_INET_CONF]) / 4);
106+ 
107+ 		for (i = 0; i < len; i++)
108+ 			id->i_confset[i] = 1;
109+diff --git a/lib/route/link/inet6.c b/lib/route/link/inet6.c
110+index f02792c..8a3de01 100644
111+--- a/lib/route/link/inet6.c
112++++ b/lib/route/link/inet6.c
113+@@ -199,7 +199,7 @@ static int inet6_parse_protinfo(struct rtnl_link *link, struct nlattr *attr,
114+ 			map_stat_id = map_stat_id_from_IPSTATS_MIB_v1;
115+ 		}
116+ 
117+-		len = min_t(int, __IPSTATS_MIB_MAX, len);
118++		len = min(__IPSTATS_MIB_MAX, len);
119+ 		for (i = 1; i < len; i++) {
120+ 			memcpy(&stat, &cnt[i * sizeof(stat)], sizeof(stat));
121+ 			rtnl_link_set_stat(link, map_stat_id[i], stat);
122+-- 
123+2.23.0
124+
+28, -0
 1@@ -0,0 +1,28 @@
 2+From e9b9e271c57d3d3129fa87c8866e91daeffe8144 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 11 Aug 2019 05:14:48 +0000
 5+Subject: [PATCH] Avoid statement expression in nl_container_of
 6+
 7+---
 8+ include/netlink/list.h | 5 ++---
 9+ 1 file changed, 2 insertions(+), 3 deletions(-)
10+
11+diff --git a/include/netlink/list.h b/include/netlink/list.h
12+index 2f20634..f116126 100644
13+--- a/include/netlink/list.h
14++++ b/include/netlink/list.h
15+@@ -59,9 +59,8 @@ static inline int nl_list_empty(struct nl_list_head *head)
16+ 	return head->next == head;
17+ }
18+ 
19+-#define nl_container_of(ptr, type, member) ({			\
20+-        const __typeof__( ((type *)0)->member ) *__mptr = (ptr);\
21+-        (type *)( (char *)__mptr - (offsetof(type, member)));})
22++#define nl_container_of(ptr, type, member) (			\
23++        (type *)( (char *)(ptr) - (offsetof(type, member))))
24+ 
25+ #define nl_list_entry(ptr, type, member) \
26+ 	nl_container_of(ptr, type, member)
27+-- 
28+2.23.0
29+
+39, -0
 1@@ -0,0 +1,39 @@
 2+From d1f59de10a2fbce42735b3a1938ecd4d60c8e205 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 11 Aug 2019 21:55:54 +0000
 5+Subject: [PATCH] Avoid initialization of flexible array member
 6+
 7+---
 8+ include/netlink-private/cache-api.h | 2 +-
 9+ include/netlink-private/netlink.h   | 2 +-
10+ 2 files changed, 2 insertions(+), 2 deletions(-)
11+
12+diff --git a/include/netlink-private/cache-api.h b/include/netlink-private/cache-api.h
13+index c684e79..82be310 100644
14+--- a/include/netlink-private/cache-api.h
15++++ b/include/netlink-private/cache-api.h
16+@@ -259,7 +259,7 @@ struct nl_cache_ops
17+ 	struct genl_ops *	co_genl;
18+ 
19+ 	/* Message type definition */
20+-	struct nl_msgtype	co_msgtypes[];
21++	struct nl_msgtype	*co_msgtypes;
22+ };
23+ 
24+ /** @} */
25+diff --git a/include/netlink-private/netlink.h b/include/netlink-private/netlink.h
26+index fca3133..1148cec 100644
27+--- a/include/netlink-private/netlink.h
28++++ b/include/netlink-private/netlink.h
29+@@ -200,7 +200,7 @@ static inline const char *nl_cache_name(struct nl_cache *cache)
30+ }
31+ 
32+ #define GENL_FAMILY(id, name) \
33+-	{ \
34++	(struct nl_msgtype[]){ \
35+ 		{ id, NL_ACT_UNSPEC, name }, \
36+ 		END_OF_MSGTYPES_LIST, \
37+ 	}
38+-- 
39+2.23.0
40+
+28, -0
 1@@ -0,0 +1,28 @@
 2+From e56f5df0379c7dc70f6ce61a31167185daa51cae Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 11 Aug 2019 21:57:03 +0000
 5+Subject: [PATCH] Avoid statement expression in ATTR_DIFF macro
 6+
 7+---
 8+ include/netlink-private/object-api.h | 5 +----
 9+ 1 file changed, 1 insertion(+), 4 deletions(-)
10+
11+diff --git a/include/netlink-private/object-api.h b/include/netlink-private/object-api.h
12+index 517e672..269cd4b 100644
13+--- a/include/netlink-private/object-api.h
14++++ b/include/netlink-private/object-api.h
15+@@ -260,10 +260,7 @@ struct nl_object
16+  * @endcode
17+  */
18+ #define ATTR_DIFF(LIST, ATTR, A, B, EXPR) \
19+-({	uint64_t diff = 0; \
20+-	if (((LIST) & (ATTR)) && ATTR_MISMATCH(A, B, ATTR, EXPR)) \
21+-		diff = ATTR; \
22+-	diff; })
23++	((uint64_t)(((LIST) & (ATTR)) && ATTR_MISMATCH(A, B, ATTR, EXPR) ? (ATTR) : 0))
24+ 
25+ /**
26+  * Object Operations
27+-- 
28+2.23.0
29+
+238, -0
  1@@ -0,0 +1,238 @@
  2+From 558f898c413bd46423c6b07073422fc6fc18769c Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Fri, 4 Oct 2019 18:13:36 -0700
  5+Subject: [PATCH] Remove _nl_auto helpers
  6+
  7+These use non-standard __attribute__((cleanup)) and statement
  8+expressions.
  9+---
 10+ include/netlink-private/utils.h | 49 ---------------------------------
 11+ lib/genl/mngt.c                 | 10 +++++--
 12+ lib/xfrm/sa.c                   | 24 ++++++++--------
 13+ 3 files changed, 19 insertions(+), 64 deletions(-)
 14+
 15+diff --git a/include/netlink-private/utils.h b/include/netlink-private/utils.h
 16+index f33a2f8..1456797 100644
 17+--- a/include/netlink-private/utils.h
 18++++ b/include/netlink-private/utils.h
 19+@@ -67,7 +67,6 @@
 20+ /*****************************************************************************/
 21+ 
 22+ #define _nl_unused                  __attribute__ ((__unused__))
 23+-#define _nl_auto(fcn)               __attribute__ ((__cleanup__(fcn)))
 24+ 
 25+ /*****************************************************************************/
 26+ 
 27+@@ -83,18 +82,6 @@
 28+ 
 29+ /*****************************************************************************/
 30+ 
 31+-#define _NL_AUTO_DEFINE_FCN_VOID0(CastType, name, func) \
 32+-static inline void name (void *v) \
 33+-{ \
 34+-	if (*((CastType *) v)) \
 35+-		func (*((CastType *) v)); \
 36+-}
 37+-
 38+-#define _nl_auto_free _nl_auto(_nl_auto_free_fcn)
 39+-_NL_AUTO_DEFINE_FCN_VOID0 (void *, _nl_auto_free_fcn, free)
 40+-
 41+-/*****************************************************************************/
 42+-
 43+ extern const char *nl_strerror_l(int err);
 44+ 
 45+ /*****************************************************************************/
 46+@@ -106,42 +93,6 @@ extern const char *nl_strerror_l(int err);
 47+ 
 48+ /*****************************************************************************/
 49+ 
 50+-#define _nl_clear_pointer(pp, destroy) \
 51+-	({ \
 52+-		__typeof__ (*(pp)) *_pp = (pp); \
 53+-		__typeof__ (*_pp) _p; \
 54+-		int _changed = 0; \
 55+-		\
 56+-		if (   _pp \
 57+-			&& (_p = *_pp)) { \
 58+-			_nl_unused const void *const _p_check_is_pointer = _p; \
 59+-			\
 60+-			*_pp = NULL; \
 61+-			\
 62+-			(destroy) (_p); \
 63+-			\
 64+-			_changed = 1; \
 65+-		} \
 66+-		_changed; \
 67+-	})
 68+-
 69+-#define _nl_clear_free(pp) _nl_clear_pointer (pp, free)
 70+-
 71+-#define _nl_steal_pointer(pp) \
 72+-	({ \
 73+-		__typeof__ (*(pp)) *const _pp = (pp); \
 74+-		__typeof__ (*_pp) _p = NULL; \
 75+-		\
 76+-		if (   _pp \
 77+-		    && (_p = *_pp)) { \
 78+-			*_pp = NULL; \
 79+-		} \
 80+-		\
 81+-		_p; \
 82+-	})
 83+-
 84+-/*****************************************************************************/
 85+-
 86+ #define _nl_malloc_maybe_a(alloca_maxlen, bytes, to_free) \
 87+ 	({ \
 88+ 		const size_t _bytes = (bytes); \
 89+diff --git a/lib/genl/mngt.c b/lib/genl/mngt.c
 90+index 28326cd..ff50e1d 100644
 91+--- a/lib/genl/mngt.c
 92++++ b/lib/genl/mngt.c
 93+@@ -50,7 +50,7 @@ static struct genl_cmd *lookup_cmd(struct genl_ops *ops, int cmd_id)
 94+ static int cmd_msg_parser(struct sockaddr_nl *who, struct nlmsghdr *nlh,
 95+                           struct genl_ops *ops, struct nl_cache_ops *cache_ops, void *arg)
 96+ {
 97+-	_nl_auto_free struct nlattr **tb_free = NULL;
 98++	struct nlattr **tb_free = NULL;
 99+ 	int err;
100+ 	struct genlmsghdr *ghdr;
101+ 	struct genl_cmd *cmd;
102+@@ -74,7 +74,7 @@ static int cmd_msg_parser(struct sockaddr_nl *who, struct nlmsghdr *nlh,
103+ 	                  cmd->c_maxattr,
104+ 	                  cmd->c_attr_policy);
105+ 	if (err < 0)
106+-		return err;
107++		goto out;
108+ 
109+ 	{
110+ 		struct genl_info info = {
111+@@ -85,8 +85,12 @@ static int cmd_msg_parser(struct sockaddr_nl *who, struct nlmsghdr *nlh,
112+ 			.attrs   = tb,
113+ 		};
114+ 
115+-		return cmd->c_msg_parser(cache_ops, cmd, &info, arg);
116++		err = cmd->c_msg_parser(cache_ops, cmd, &info, arg);
117+ 	}
118++
119++out:
120++	free(tb_free);
121++	return err;
122+ }
123+ 
124+ static int genl_msg_parser(struct nl_cache_ops *ops, struct sockaddr_nl *who,
125+diff --git a/lib/xfrm/sa.c b/lib/xfrm/sa.c
126+index 48265ba..14bf298 100644
127+--- a/lib/xfrm/sa.c
128++++ b/lib/xfrm/sa.c
129+@@ -1683,7 +1683,7 @@ int xfrmnl_sa_get_aead_params (struct xfrmnl_sa* sa, char* alg_name, unsigned in
130+ 
131+ int xfrmnl_sa_set_aead_params (struct xfrmnl_sa* sa, const char* alg_name, unsigned int key_len, unsigned int icv_len, const char* key)
132+ {
133+-	_nl_auto_free struct xfrmnl_algo_aead *b = NULL;
134++	struct xfrmnl_algo_aead *b = NULL;
135+ 	size_t keysize = sizeof (uint8_t) * ((key_len + 7)/8);
136+ 	uint32_t newlen = sizeof (struct xfrmnl_algo_aead) + keysize;
137+ 
138+@@ -1699,7 +1699,7 @@ int xfrmnl_sa_set_aead_params (struct xfrmnl_sa* sa, const char* alg_name, unsig
139+ 	memcpy (b->alg_key, key, keysize);
140+ 
141+ 	free (sa->aead);
142+-	sa->aead = _nl_steal_pointer (&b);
143++	sa->aead = b;
144+ 	sa->ce_mask |= XFRM_SA_ATTR_ALG_AEAD;
145+ 	return 0;
146+ }
147+@@ -1741,7 +1741,7 @@ int xfrmnl_sa_get_auth_params (struct xfrmnl_sa* sa, char* alg_name, unsigned in
148+ 
149+ int xfrmnl_sa_set_auth_params (struct xfrmnl_sa* sa, const char* alg_name, unsigned int key_len, unsigned int trunc_len, const char* key)
150+ {
151+-	_nl_auto_free struct xfrmnl_algo_auth *b = NULL;
152++	struct xfrmnl_algo_auth *b = NULL;
153+ 	size_t keysize = sizeof (uint8_t) * ((key_len + 7)/8);
154+ 	uint32_t newlen = sizeof (struct xfrmnl_algo_auth) + keysize;
155+ 
156+@@ -1756,7 +1756,7 @@ int xfrmnl_sa_set_auth_params (struct xfrmnl_sa* sa, const char* alg_name, unsig
157+ 	memcpy (b->alg_key, key, keysize);
158+ 
159+ 	free (sa->auth);
160+-	sa->auth = _nl_steal_pointer (&b);
161++	sa->auth = b;
162+ 	sa->ce_mask |= XFRM_SA_ATTR_ALG_AUTH;
163+ 	return 0;
164+ }
165+@@ -1795,7 +1795,7 @@ int xfrmnl_sa_get_crypto_params (struct xfrmnl_sa* sa, char* alg_name, unsigned
166+ 
167+ int xfrmnl_sa_set_crypto_params (struct xfrmnl_sa* sa, const char* alg_name, unsigned int key_len, const char* key)
168+ {
169+-	_nl_auto_free struct xfrmnl_algo *b = NULL;
170++	struct xfrmnl_algo *b = NULL;
171+ 	size_t keysize = sizeof (uint8_t) * ((key_len + 7)/8);
172+ 	uint32_t newlen = sizeof (struct xfrmnl_algo) + keysize;
173+ 
174+@@ -1809,7 +1809,7 @@ int xfrmnl_sa_set_crypto_params (struct xfrmnl_sa* sa, const char* alg_name, uns
175+ 	memcpy (b->alg_key, key, keysize);
176+ 
177+ 	free(sa->crypt);
178+-	sa->crypt = _nl_steal_pointer(&b);
179++	sa->crypt = b;
180+ 	sa->ce_mask |= XFRM_SA_ATTR_ALG_CRYPT;
181+ 	return 0;
182+ }
183+@@ -1848,7 +1848,7 @@ int xfrmnl_sa_get_comp_params (struct xfrmnl_sa* sa, char* alg_name, unsigned in
184+ 
185+ int xfrmnl_sa_set_comp_params (struct xfrmnl_sa* sa, const char* alg_name, unsigned int key_len, const char* key)
186+ {
187+-	_nl_auto_free struct xfrmnl_algo *b = NULL;
188++	struct xfrmnl_algo *b = NULL;
189+ 	size_t keysize = sizeof (uint8_t) * ((key_len + 7)/8);
190+ 	uint32_t newlen = sizeof (struct xfrmnl_algo) + keysize;
191+ 
192+@@ -1862,7 +1862,7 @@ int xfrmnl_sa_set_comp_params (struct xfrmnl_sa* sa, const char* alg_name, unsig
193+ 	memcpy (b->alg_key, key, keysize);
194+ 
195+ 	free(sa->comp);
196+-	sa->comp = _nl_steal_pointer(&b);
197++	sa->comp = b;
198+ 	sa->ce_mask |= XFRM_SA_ATTR_ALG_COMP;
199+ 	return 0;
200+ }
201+@@ -2023,7 +2023,7 @@ int xfrmnl_sa_get_sec_ctx (struct xfrmnl_sa* sa, unsigned int* doi, unsigned int
202+ int xfrmnl_sa_set_sec_ctx (struct xfrmnl_sa* sa, unsigned int doi, unsigned int alg, unsigned int len,
203+                            unsigned int sid, const char* ctx_str)
204+ {
205+-	_nl_auto_free struct xfrmnl_user_sec_ctx *b = NULL;
206++	struct xfrmnl_user_sec_ctx *b = NULL;
207+ 
208+ 	if (!(b = calloc(1, sizeof (struct xfrmnl_user_sec_ctx) + 1 + len)))
209+ 		return -1;
210+@@ -2037,7 +2037,7 @@ int xfrmnl_sa_set_sec_ctx (struct xfrmnl_sa* sa, unsigned int doi, unsigned int
211+ 	b->ctx[len] = '\0';
212+ 
213+ 	free(sa->sec_ctx);
214+-	sa->sec_ctx = _nl_steal_pointer(&b);
215++	sa->sec_ctx = b;
216+ 	sa->ce_mask |= XFRM_SA_ATTR_SECCTX;
217+ 	return 0;
218+ }
219+@@ -2136,7 +2136,7 @@ int xfrmnl_sa_set_replay_state_esn (struct xfrmnl_sa* sa, unsigned int oseq, uns
220+                                     unsigned int oseq_hi, unsigned int seq_hi, unsigned int replay_window,
221+                                     unsigned int bmp_len, unsigned int* bmp)
222+ {
223+-	_nl_auto_free struct xfrmnl_replay_state_esn *b = NULL;
224++	struct xfrmnl_replay_state_esn *b = NULL;
225+ 
226+ 	if (!(b = calloc (1, sizeof (struct xfrmnl_replay_state_esn) + (sizeof (uint32_t) * bmp_len))))
227+ 		return -1;
228+@@ -2150,7 +2150,7 @@ int xfrmnl_sa_set_replay_state_esn (struct xfrmnl_sa* sa, unsigned int oseq, uns
229+ 	memcpy (b->bmp, bmp, bmp_len * sizeof (uint32_t));
230+ 
231+ 	free(sa->replay_state_esn);
232+-	sa->replay_state_esn = _nl_steal_pointer(&b);
233++	sa->replay_state_esn = b;
234+ 	sa->ce_mask |= XFRM_SA_ATTR_REPLAY_STATE;
235+ 	return 0;
236+ }
237+-- 
238+2.23.0
239+
+76, -0
 1@@ -0,0 +1,76 @@
 2+From f64cfa931a450ffb08cbbdeb6652b424f6bb8187 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 30 Jan 2020 14:12:35 -0800
 5+Subject: [PATCH] Avoid use of alloca and statement expressions
 6+
 7+---
 8+ include/netlink-private/utils.h | 21 ---------------------
 9+ lib/genl/mngt.c                 | 13 +++++++++----
10+ 2 files changed, 9 insertions(+), 25 deletions(-)
11+
12+diff --git a/include/netlink-private/utils.h b/include/netlink-private/utils.h
13+index 1456797..e26399f 100644
14+--- a/include/netlink-private/utils.h
15++++ b/include/netlink-private/utils.h
16+@@ -93,27 +93,6 @@ extern const char *nl_strerror_l(int err);
17+ 
18+ /*****************************************************************************/
19+ 
20+-#define _nl_malloc_maybe_a(alloca_maxlen, bytes, to_free) \
21+-	({ \
22+-		const size_t _bytes = (bytes); \
23+-		__typeof__ (to_free) _to_free = (to_free); \
24+-		__typeof__ (*_to_free) _ptr; \
25+-		\
26+-		_NL_STATIC_ASSERT ((alloca_maxlen) <= 500); \
27+-		_nl_assert (_to_free && !*_to_free); \
28+-		\
29+-		if (_bytes <= (alloca_maxlen)) { \
30+-			_ptr = alloca (_bytes); \
31+-		} else { \
32+-			_ptr = malloc (_bytes); \
33+-			*_to_free = _ptr; \
34+-		}; \
35+-		\
36+-		_ptr; \
37+-	})
38+-
39+-/*****************************************************************************/
40+-
41+ static inline char *
42+ _nl_strncpy_trunc(char *dst, const char *src, size_t len)
43+ {
44+diff --git a/lib/genl/mngt.c b/lib/genl/mngt.c
45+index ff50e1d..8f92122 100644
46+--- a/lib/genl/mngt.c
47++++ b/lib/genl/mngt.c
48+@@ -54,7 +54,7 @@ static int cmd_msg_parser(struct sockaddr_nl *who, struct nlmsghdr *nlh,
49+ 	int err;
50+ 	struct genlmsghdr *ghdr;
51+ 	struct genl_cmd *cmd;
52+-	struct nlattr **tb;
53++	struct nlattr **tb, *tb_local[32];
54+ 
55+ 	ghdr = genlmsg_hdr(nlh);
56+ 
57+@@ -64,9 +64,14 @@ static int cmd_msg_parser(struct sockaddr_nl *who, struct nlmsghdr *nlh,
58+ 	if (cmd->c_msg_parser == NULL)
59+ 		return -NLE_OPNOTSUPP;
60+ 
61+-	tb = _nl_malloc_maybe_a (300, (((size_t) cmd->c_maxattr) + 1u) * sizeof (struct nlattr *), &tb_free);
62+-	if (!tb)
63+-		return -NLE_NOMEM;
64++	if (cmd->c_maxattr > ARRAY_SIZE(tb_local) - 1) {
65++		tb = malloc(((size_t) cmd->c_maxattr + 1u) * sizeof (struct nlattr *));
66++		if (!tb)
67++			return -NLE_NOMEM;
68++		tb_free = tb;
69++	} else {
70++		tb = tb_local;
71++	}
72+ 
73+ 	err = nlmsg_parse(nlh,
74+ 	                  GENL_HDRSIZE(ops->o_hdrsize),
75+-- 
76+2.25.0
77+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 7b167ef85f6eb4d7faca349302478b2dc121e309
+1, -0
1@@ -0,0 +1 @@
2+3.5.0 r1
+2, -0
1@@ -0,0 +1,2 @@
2+/libtermkey-0.22.tar.gz
3+/src
+16, -0
 1@@ -0,0 +1,16 @@
 2+cflags{
 3+	'-std=c99', '-Wall',
 4+	'-isystem $builddir/pkg/netbsd-curses/include',
 5+}
 6+
 7+pkg.hdrs = copy('$outdir/include', '$srcdir', {'termkey.h'})
 8+pkg.deps = {'pkg/netbsd-curses/headers'}
 9+
10+lib('libtermkey.a', {
11+	'termkey.c',
12+	'driver-csi.c',
13+	'driver-ti.c',
14+	'$builddir/pkg/netbsd-curses/libcurses.a.d',
15+})
16+
17+fetch 'curl'
+1, -0
1@@ -0,0 +1 @@
2+6945bd3c4aaa83da83d80a045c5563da4edd7d0374c62c0d35aec09eb3014600  libtermkey-0.22.tar.gz
+1, -0
1@@ -0,0 +1 @@
2+url = "http://www.leonerd.org.uk/code/libtermkey/libtermkey-0.22.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+0.22 r0
+30, -0
 1@@ -0,0 +1,30 @@
 2+cflags{
 3+	'-std=c11', '-Wall', '-Wpedantic',
 4+	'-D _DEFAULT_SOURCE',
 5+	'-I $srcdir',
 6+	'-isystem $builddir/pkg/bearssl/include',
 7+}
 8+
 9+pkg.hdrs = copy('$outdir/include', '$srcdir', {'tls.h'})
10+pkg.deps = {
11+	'pkg/bearssl/headers',
12+}
13+
14+lib('libtls.a', {
15+	'tls.c',
16+	'tls_bio_cb.c',
17+	'tls_client.c',
18+	'tls_config.c',
19+	'tls_conninfo.c',
20+	'tls_keypair.c',
21+	'tls_ocsp.c',
22+	'tls_peer.c',
23+	'tls_server.c',
24+	'tls_util.c',
25+	'tls_verify.c',
26+	'bearssl.c',
27+	'$builddir/pkg/bearssl/libbearssl.a',
28+	'$builddir/pkg/openbsd/libbsd.a',
29+})
30+
31+fetch 'git'
+45, -0
 1@@ -0,0 +1,45 @@
 2+From 7701b90a015c4e4c2b6af6e8b53315dce1f6c780 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 29 Mar 2020 13:07:39 -0700
 5+Subject: [PATCH] Use patched bearssl method to retrieve validity period
 6+
 7+---
 8+ tls_conninfo.c | 22 ++++++++++++++++++----
 9+ 1 file changed, 18 insertions(+), 4 deletions(-)
10+
11+diff --git a/tls_conninfo.c b/tls_conninfo.c
12+index ccce70d..1e9b57e 100644
13+--- a/tls_conninfo.c
14++++ b/tls_conninfo.c
15+@@ -162,10 +162,24 @@ static int
16+ tls_get_peer_cert_times(struct tls *ctx, time_t *notbefore,
17+     time_t *notafter)
18+ {
19+-	/* XXX: BearSSL has no way to get certificate notBefore and
20+-	 * notAfter */
21+-	*notbefore = -1;
22+-	*notafter = -1;
23++	br_x509_decoder_context xc;
24++	uint32_t notbefore_days, notbefore_seconds;
25++	uint32_t notafter_days, notafter_seconds;
26++	int err;
27++
28++	br_x509_decoder_init(&xc, NULL, NULL);
29++	br_x509_decoder_push(&xc, ctx->peer_chain[0].data, ctx->peer_chain[0].data_len);
30++
31++	if ((err = br_x509_decoder_last_error(&xc)) != 0) {
32++		tls_set_errorx(ctx, "%s", bearssl_strerror(err));
33++		return (-1);
34++	}
35++
36++	br_x509_decoder_get_notbefore(&xc, &notbefore_days, &notbefore_seconds);
37++	br_x509_decoder_get_notafter(&xc, &notafter_days, &notafter_seconds);
38++
39++	*notbefore = 86400LL * (notbefore_days - 719528) + notbefore_seconds;
40++	*notafter = 86400LL * (notafter_days - 719528) + notafter_seconds;
41+ 
42+ 	return (0);
43+ }
44+-- 
45+2.31.1
46+
+29, -0
 1@@ -0,0 +1,29 @@
 2+From ce2e99a74f9216fa5783a6bc943c228788fd469c Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 13 May 2021 22:17:56 -0700
 5+Subject: [PATCH] Use patched bearssl flag to force CertificateRequest
 6+
 7+---
 8+ tls_server.c | 6 +-----
 9+ 1 file changed, 1 insertion(+), 5 deletions(-)
10+
11+diff --git a/tls_server.c b/tls_server.c
12+index 2436036..7f578b8 100644
13+--- a/tls_server.c
14++++ b/tls_server.c
15+@@ -339,11 +339,7 @@ tls_accept_common(struct tls *ctx)
16+ 		if (tls_configure_x509(conn_ctx) != 0)
17+ 			goto err;
18+ 
19+-		if (ctx->config->ca_len == 0) {
20+-			tls_set_errorx(ctx, "cannot verify client without trust anchors");
21+-			goto err;
22+-		}
23+-
24++		flags |= BR_OPT_REQUEST_CLIENT_CERT;
25+ 		br_ssl_server_set_trust_anchor_names_alt(&conn_ctx->conn->u.server,
26+ 		    ctx->config->ca, ctx->config->ca_len);
27+ 
28+-- 
29+2.31.1
30+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 28db202f76a6fc1bec6e0d58412e348b1a14fb37
+1, -0
1@@ -0,0 +1 @@
2+0.5 r3
+11, -0
 1@@ -0,0 +1,11 @@
 2+cflags{
 3+	'-std=c99', '-Wall', '-Wpedantic',
 4+	'-D _POSIX_C_SOURCE=200809L',
 5+	'-I $srcdir',
 6+}
 7+
 8+pkg.hdrs = copy('$outdir/include/libutp', '$srcdir', {'utp.h'})
 9+
10+lib('libutp.a', {'utp.c', 'utp_utils.c'})
11+
12+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 996ad97f18a09a2f3d38cb210a44014eaf089df5
+1, -0
1@@ -0,0 +1 @@
2+996ad97f18 r0
+3, -0
1@@ -0,0 +1,3 @@
2+/linux-6.4.tar.xz
3+/src
4+/tools.ninja
+23, -0
 1@@ -0,0 +1,23 @@
 2+return {
 3+	-- <cd src/arch/arm64/include/uapi && find * -name '*.h' -exec printf "\t'%s',\n" {} + | LC_COLLATE=C sort
 4+	'asm/auxvec.h',
 5+	'asm/bitsperlong.h',
 6+	'asm/bpf_perf_event.h',
 7+	'asm/byteorder.h',
 8+	'asm/fcntl.h',
 9+	'asm/hwcap.h',
10+	'asm/kvm.h',
11+	'asm/mman.h',
12+	'asm/param.h',
13+	'asm/perf_regs.h',
14+	'asm/posix_types.h',
15+	'asm/ptrace.h',
16+	'asm/setup.h',
17+	'asm/sigcontext.h',
18+	'asm/signal.h',
19+	'asm/statfs.h',
20+	'asm/sve_context.h',
21+	'asm/ucontext.h',
22+	'asm/unistd.h',
23+	unistd={},
24+}
+913, -0
  1@@ -0,0 +1,913 @@
  2+return {
  3+	-- <cd src/include/uapi && find * -name '*.h' -exec printf "\t'%s',\n" {} + | LC_COLLATE=C sort
  4+	'asm-generic/auxvec.h',
  5+	'asm-generic/bitsperlong.h',
  6+	'asm-generic/bpf_perf_event.h',
  7+	'asm-generic/errno-base.h',
  8+	'asm-generic/errno.h',
  9+	'asm-generic/fcntl.h',
 10+	'asm-generic/hugetlb_encode.h',
 11+	'asm-generic/int-l64.h',
 12+	'asm-generic/int-ll64.h',
 13+	'asm-generic/ioctl.h',
 14+	'asm-generic/ioctls.h',
 15+	'asm-generic/ipcbuf.h',
 16+	'asm-generic/kvm_para.h',
 17+	'asm-generic/mman-common.h',
 18+	'asm-generic/mman.h',
 19+	'asm-generic/msgbuf.h',
 20+	'asm-generic/param.h',
 21+	'asm-generic/poll.h',
 22+	'asm-generic/posix_types.h',
 23+	'asm-generic/resource.h',
 24+	'asm-generic/sembuf.h',
 25+	'asm-generic/setup.h',
 26+	'asm-generic/shmbuf.h',
 27+	'asm-generic/siginfo.h',
 28+	'asm-generic/signal-defs.h',
 29+	'asm-generic/signal.h',
 30+	'asm-generic/socket.h',
 31+	'asm-generic/sockios.h',
 32+	'asm-generic/stat.h',
 33+	'asm-generic/statfs.h',
 34+	'asm-generic/swab.h',
 35+	'asm-generic/termbits-common.h',
 36+	'asm-generic/termbits.h',
 37+	'asm-generic/termios.h',
 38+	'asm-generic/types.h',
 39+	'asm-generic/ucontext.h',
 40+	'asm-generic/unistd.h',
 41+	'drm/amdgpu_drm.h',
 42+	'drm/armada_drm.h',
 43+	'drm/drm.h',
 44+	'drm/drm_fourcc.h',
 45+	'drm/drm_mode.h',
 46+	'drm/drm_sarea.h',
 47+	'drm/etnaviv_drm.h',
 48+	'drm/exynos_drm.h',
 49+	'drm/habanalabs_accel.h',
 50+	'drm/i915_drm.h',
 51+	'drm/ivpu_accel.h',
 52+	'drm/lima_drm.h',
 53+	'drm/msm_drm.h',
 54+	'drm/nouveau_drm.h',
 55+	'drm/omap_drm.h',
 56+	'drm/panfrost_drm.h',
 57+	'drm/qaic_accel.h',
 58+	'drm/qxl_drm.h',
 59+	'drm/radeon_drm.h',
 60+	'drm/tegra_drm.h',
 61+	'drm/v3d_drm.h',
 62+	'drm/vc4_drm.h',
 63+	'drm/vgem_drm.h',
 64+	'drm/virtgpu_drm.h',
 65+	'drm/vmwgfx_drm.h',
 66+	'linux/a.out.h',
 67+	'linux/acct.h',
 68+	'linux/acrn.h',
 69+	'linux/adb.h',
 70+	'linux/adfs_fs.h',
 71+	'linux/affs_hardblocks.h',
 72+	'linux/agpgart.h',
 73+	'linux/aio_abi.h',
 74+	'linux/am437x-vpfe.h',
 75+	'linux/amt.h',
 76+	'linux/android/binder.h',
 77+	'linux/android/binderfs.h',
 78+	'linux/apm_bios.h',
 79+	'linux/arcfb.h',
 80+	'linux/arm_sdei.h',
 81+	'linux/aspeed-lpc-ctrl.h',
 82+	'linux/aspeed-p2a-ctrl.h',
 83+	'linux/aspeed-video.h',
 84+	'linux/atalk.h',
 85+	'linux/atm.h',
 86+	'linux/atm_eni.h',
 87+	'linux/atm_he.h',
 88+	'linux/atm_idt77105.h',
 89+	'linux/atm_nicstar.h',
 90+	'linux/atm_tcp.h',
 91+	'linux/atm_zatm.h',
 92+	'linux/atmapi.h',
 93+	'linux/atmarp.h',
 94+	'linux/atmbr2684.h',
 95+	'linux/atmclip.h',
 96+	'linux/atmdev.h',
 97+	'linux/atmioc.h',
 98+	'linux/atmlec.h',
 99+	'linux/atmmpc.h',
100+	'linux/atmppp.h',
101+	'linux/atmsap.h',
102+	'linux/atmsvc.h',
103+	'linux/audit.h',
104+	'linux/auto_dev-ioctl.h',
105+	'linux/auto_fs.h',
106+	'linux/auto_fs4.h',
107+	'linux/auxvec.h',
108+	'linux/ax25.h',
109+	'linux/batadv_packet.h',
110+	'linux/batman_adv.h',
111+	'linux/baycom.h',
112+	'linux/bcm933xx_hcs.h',
113+	'linux/bfs_fs.h',
114+	'linux/binfmts.h',
115+	'linux/blkpg.h',
116+	'linux/blktrace_api.h',
117+	'linux/blkzoned.h',
118+	'linux/bpf.h',
119+	'linux/bpf_common.h',
120+	'linux/bpf_perf_event.h',
121+	'linux/bpfilter.h',
122+	'linux/bpqether.h',
123+	'linux/bsg.h',
124+	'linux/bt-bmc.h',
125+	'linux/btf.h',
126+	'linux/btrfs.h',
127+	'linux/btrfs_tree.h',
128+	'linux/byteorder/big_endian.h',
129+	'linux/byteorder/little_endian.h',
130+	'linux/cachefiles.h',
131+	'linux/caif/caif_socket.h',
132+	'linux/caif/if_caif.h',
133+	'linux/can.h',
134+	'linux/can/bcm.h',
135+	'linux/can/error.h',
136+	'linux/can/gw.h',
137+	'linux/can/isotp.h',
138+	'linux/can/j1939.h',
139+	'linux/can/netlink.h',
140+	'linux/can/raw.h',
141+	'linux/can/vxcan.h',
142+	'linux/capability.h',
143+	'linux/capi.h',
144+	'linux/cciss_defs.h',
145+	'linux/cciss_ioctl.h',
146+	'linux/ccs.h',
147+	'linux/cdrom.h',
148+	'linux/cec-funcs.h',
149+	'linux/cec.h',
150+	'linux/cfm_bridge.h',
151+	'linux/cgroupstats.h',
152+	'linux/chio.h',
153+	'linux/cifs/cifs_mount.h',
154+	'linux/cifs/cifs_netlink.h',
155+	'linux/close_range.h',
156+	'linux/cn_proc.h',
157+	'linux/coda.h',
158+	'linux/coff.h',
159+	'linux/comedi.h',
160+	'linux/connector.h',
161+	'linux/const.h',
162+	'linux/coresight-stm.h',
163+	'linux/counter.h',
164+	'linux/cramfs_fs.h',
165+	'linux/cryptouser.h',
166+	'linux/cuda.h',
167+	'linux/cxl_mem.h',
168+	'linux/cyclades.h',
169+	'linux/cycx_cfm.h',
170+	'linux/dcbnl.h',
171+	'linux/dccp.h',
172+	'linux/devlink.h',
173+	'linux/dlm.h',
174+	'linux/dlm_device.h',
175+	'linux/dlm_plock.h',
176+	'linux/dlmconstants.h',
177+	'linux/dm-ioctl.h',
178+	'linux/dm-log-userspace.h',
179+	'linux/dma-buf.h',
180+	'linux/dma-heap.h',
181+	'linux/dns_resolver.h',
182+	'linux/dqblk_xfs.h',
183+	'linux/dvb/audio.h',
184+	'linux/dvb/ca.h',
185+	'linux/dvb/dmx.h',
186+	'linux/dvb/frontend.h',
187+	'linux/dvb/net.h',
188+	'linux/dvb/osd.h',
189+	'linux/dvb/version.h',
190+	'linux/dvb/video.h',
191+	'linux/dw100.h',
192+	'linux/edd.h',
193+	'linux/efs_fs_sb.h',
194+	'linux/elf-em.h',
195+	'linux/elf-fdpic.h',
196+	'linux/elf.h',
197+	'linux/errno.h',
198+	'linux/errqueue.h',
199+	'linux/erspan.h',
200+	'linux/ethtool.h',
201+	'linux/ethtool_netlink.h',
202+	'linux/eventpoll.h',
203+	'linux/ext4.h',
204+	'linux/f2fs.h',
205+	'linux/fadvise.h',
206+	'linux/falloc.h',
207+	'linux/fanotify.h',
208+	'linux/fb.h',
209+	'linux/fcntl.h',
210+	'linux/fd.h',
211+	'linux/fdreg.h',
212+	'linux/fib_rules.h',
213+	'linux/fiemap.h',
214+	'linux/filter.h',
215+	'linux/firewire-cdev.h',
216+	'linux/firewire-constants.h',
217+	'linux/fou.h',
218+	'linux/fpga-dfl.h',
219+	'linux/fs.h',
220+	'linux/fscrypt.h',
221+	'linux/fsi.h',
222+	'linux/fsl_hypervisor.h',
223+	'linux/fsl_mc.h',
224+	'linux/fsmap.h',
225+	'linux/fsverity.h',
226+	'linux/fuse.h',
227+	'linux/futex.h',
228+	'linux/gameport.h',
229+	'linux/gen_stats.h',
230+	'linux/genetlink.h',
231+	'linux/genwqe/genwqe_card.h',
232+	'linux/gfs2_ondisk.h',
233+	'linux/gpio.h',
234+	'linux/gsmmux.h',
235+	'linux/gtp.h',
236+	'linux/handshake.h',
237+	'linux/hash_info.h',
238+	'linux/hdlc.h',
239+	'linux/hdlc/ioctl.h',
240+	'linux/hdlcdrv.h',
241+	'linux/hdreg.h',
242+	'linux/hid.h',
243+	'linux/hiddev.h',
244+	'linux/hidraw.h',
245+	'linux/hpet.h',
246+	'linux/hsi/cs-protocol.h',
247+	'linux/hsi/hsi_char.h',
248+	'linux/hsr_netlink.h',
249+	'linux/hw_breakpoint.h',
250+	'linux/hyperv.h',
251+	'linux/i2c-dev.h',
252+	'linux/i2c.h',
253+	'linux/i2o-dev.h',
254+	'linux/i8k.h',
255+	'linux/icmp.h',
256+	'linux/icmpv6.h',
257+	'linux/idxd.h',
258+	'linux/if.h',
259+	'linux/if_addr.h',
260+	'linux/if_addrlabel.h',
261+	'linux/if_alg.h',
262+	'linux/if_arcnet.h',
263+	'linux/if_arp.h',
264+	'linux/if_bonding.h',
265+	'linux/if_bridge.h',
266+	'linux/if_cablemodem.h',
267+	'linux/if_eql.h',
268+	'linux/if_ether.h',
269+	'linux/if_fc.h',
270+	'linux/if_fddi.h',
271+	'linux/if_hippi.h',
272+	'linux/if_infiniband.h',
273+	'linux/if_link.h',
274+	'linux/if_ltalk.h',
275+	'linux/if_macsec.h',
276+	'linux/if_packet.h',
277+	'linux/if_phonet.h',
278+	'linux/if_plip.h',
279+	'linux/if_ppp.h',
280+	'linux/if_pppol2tp.h',
281+	'linux/if_pppox.h',
282+	'linux/if_slip.h',
283+	'linux/if_team.h',
284+	'linux/if_tun.h',
285+	'linux/if_tunnel.h',
286+	'linux/if_vlan.h',
287+	'linux/if_x25.h',
288+	'linux/if_xdp.h',
289+	'linux/ife.h',
290+	'linux/igmp.h',
291+	'linux/iio/buffer.h',
292+	'linux/iio/events.h',
293+	'linux/iio/types.h',
294+	'linux/ila.h',
295+	'linux/in.h',
296+	'linux/in6.h',
297+	'linux/in_route.h',
298+	'linux/inet_diag.h',
299+	'linux/inotify.h',
300+	'linux/input-event-codes.h',
301+	'linux/input.h',
302+	'linux/io_uring.h',
303+	'linux/ioam6.h',
304+	'linux/ioam6_genl.h',
305+	'linux/ioam6_iptunnel.h',
306+	'linux/ioctl.h',
307+	'linux/iommu.h',
308+	'linux/iommufd.h',
309+	'linux/ioprio.h',
310+	'linux/ip.h',
311+	'linux/ip6_tunnel.h',
312+	'linux/ip_vs.h',
313+	'linux/ipc.h',
314+	'linux/ipmi.h',
315+	'linux/ipmi_bmc.h',
316+	'linux/ipmi_msgdefs.h',
317+	'linux/ipmi_ssif_bmc.h',
318+	'linux/ipsec.h',
319+	'linux/ipv6.h',
320+	'linux/ipv6_route.h',
321+	'linux/irqnr.h',
322+	'linux/isdn/capicmd.h',
323+	'linux/iso_fs.h',
324+	'linux/isst_if.h',
325+	'linux/ivtv.h',
326+	'linux/ivtvfb.h',
327+	'linux/jffs2.h',
328+	'linux/joystick.h',
329+	'linux/kcm.h',
330+	'linux/kcmp.h',
331+	'linux/kcov.h',
332+	'linux/kd.h',
333+	'linux/kdev_t.h',
334+	'linux/kernel-page-flags.h',
335+	'linux/kernel.h',
336+	'linux/kernelcapi.h',
337+	'linux/kexec.h',
338+	'linux/keyboard.h',
339+	'linux/keyctl.h',
340+	'linux/kfd_ioctl.h',
341+	'linux/kfd_sysfs.h',
342+	'linux/kvm.h',
343+	'linux/kvm_para.h',
344+	'linux/l2tp.h',
345+	'linux/landlock.h',
346+	'linux/libc-compat.h',
347+	'linux/limits.h',
348+	'linux/lirc.h',
349+	'linux/llc.h',
350+	'linux/loadpin.h',
351+	'linux/loop.h',
352+	'linux/lp.h',
353+	'linux/lwtunnel.h',
354+	'linux/magic.h',
355+	'linux/major.h',
356+	'linux/map_to_14segment.h',
357+	'linux/map_to_7segment.h',
358+	'linux/matroxfb.h',
359+	'linux/max2175.h',
360+	'linux/mctp.h',
361+	'linux/mdio.h',
362+	'linux/media-bus-format.h',
363+	'linux/media.h',
364+	'linux/mei.h',
365+	'linux/mei_uuid.h',
366+	'linux/membarrier.h',
367+	'linux/memfd.h',
368+	'linux/mempolicy.h',
369+	'linux/mii.h',
370+	'linux/minix_fs.h',
371+	'linux/misc/bcm_vk.h',
372+	'linux/mman.h',
373+	'linux/mmc/ioctl.h',
374+	'linux/mmtimer.h',
375+	'linux/module.h',
376+	'linux/mount.h',
377+	'linux/mpls.h',
378+	'linux/mpls_iptunnel.h',
379+	'linux/mptcp.h',
380+	'linux/mqueue.h',
381+	'linux/mroute.h',
382+	'linux/mroute6.h',
383+	'linux/mrp_bridge.h',
384+	'linux/msdos_fs.h',
385+	'linux/msg.h',
386+	'linux/mtio.h',
387+	'linux/nbd-netlink.h',
388+	'linux/nbd.h',
389+	'linux/ncsi.h',
390+	'linux/ndctl.h',
391+	'linux/neighbour.h',
392+	'linux/net.h',
393+	'linux/net_dropmon.h',
394+	'linux/net_namespace.h',
395+	'linux/net_tstamp.h',
396+	'linux/netconf.h',
397+	'linux/netdev.h',
398+	'linux/netdevice.h',
399+	'linux/netfilter.h',
400+	'linux/netfilter/ipset/ip_set.h',
401+	'linux/netfilter/ipset/ip_set_bitmap.h',
402+	'linux/netfilter/ipset/ip_set_hash.h',
403+	'linux/netfilter/ipset/ip_set_list.h',
404+	'linux/netfilter/nf_conntrack_common.h',
405+	'linux/netfilter/nf_conntrack_ftp.h',
406+	'linux/netfilter/nf_conntrack_sctp.h',
407+	'linux/netfilter/nf_conntrack_tcp.h',
408+	'linux/netfilter/nf_conntrack_tuple_common.h',
409+	'linux/netfilter/nf_log.h',
410+	'linux/netfilter/nf_nat.h',
411+	'linux/netfilter/nf_synproxy.h',
412+	'linux/netfilter/nf_tables.h',
413+	'linux/netfilter/nf_tables_compat.h',
414+	'linux/netfilter/nfnetlink.h',
415+	'linux/netfilter/nfnetlink_acct.h',
416+	'linux/netfilter/nfnetlink_compat.h',
417+	'linux/netfilter/nfnetlink_conntrack.h',
418+	'linux/netfilter/nfnetlink_cthelper.h',
419+	'linux/netfilter/nfnetlink_cttimeout.h',
420+	'linux/netfilter/nfnetlink_hook.h',
421+	'linux/netfilter/nfnetlink_log.h',
422+	'linux/netfilter/nfnetlink_osf.h',
423+	'linux/netfilter/nfnetlink_queue.h',
424+	'linux/netfilter/x_tables.h',
425+	'linux/netfilter/xt_AUDIT.h',
426+	'linux/netfilter/xt_CHECKSUM.h',
427+	'linux/netfilter/xt_CLASSIFY.h',
428+	'linux/netfilter/xt_CONNMARK.h',
429+	'linux/netfilter/xt_CONNSECMARK.h',
430+	'linux/netfilter/xt_CT.h',
431+	'linux/netfilter/xt_DSCP.h',
432+	'linux/netfilter/xt_HMARK.h',
433+	'linux/netfilter/xt_IDLETIMER.h',
434+	'linux/netfilter/xt_LED.h',
435+	'linux/netfilter/xt_LOG.h',
436+	'linux/netfilter/xt_MARK.h',
437+	'linux/netfilter/xt_NFLOG.h',
438+	'linux/netfilter/xt_NFQUEUE.h',
439+	'linux/netfilter/xt_RATEEST.h',
440+	'linux/netfilter/xt_SECMARK.h',
441+	'linux/netfilter/xt_SYNPROXY.h',
442+	'linux/netfilter/xt_TCPMSS.h',
443+	'linux/netfilter/xt_TCPOPTSTRIP.h',
444+	'linux/netfilter/xt_TEE.h',
445+	'linux/netfilter/xt_TPROXY.h',
446+	'linux/netfilter/xt_addrtype.h',
447+	'linux/netfilter/xt_bpf.h',
448+	'linux/netfilter/xt_cgroup.h',
449+	'linux/netfilter/xt_cluster.h',
450+	'linux/netfilter/xt_comment.h',
451+	'linux/netfilter/xt_connbytes.h',
452+	'linux/netfilter/xt_connlabel.h',
453+	'linux/netfilter/xt_connlimit.h',
454+	'linux/netfilter/xt_connmark.h',
455+	'linux/netfilter/xt_conntrack.h',
456+	'linux/netfilter/xt_cpu.h',
457+	'linux/netfilter/xt_dccp.h',
458+	'linux/netfilter/xt_devgroup.h',
459+	'linux/netfilter/xt_dscp.h',
460+	'linux/netfilter/xt_ecn.h',
461+	'linux/netfilter/xt_esp.h',
462+	'linux/netfilter/xt_hashlimit.h',
463+	'linux/netfilter/xt_helper.h',
464+	'linux/netfilter/xt_ipcomp.h',
465+	'linux/netfilter/xt_iprange.h',
466+	'linux/netfilter/xt_ipvs.h',
467+	'linux/netfilter/xt_l2tp.h',
468+	'linux/netfilter/xt_length.h',
469+	'linux/netfilter/xt_limit.h',
470+	'linux/netfilter/xt_mac.h',
471+	'linux/netfilter/xt_mark.h',
472+	'linux/netfilter/xt_multiport.h',
473+	'linux/netfilter/xt_nfacct.h',
474+	'linux/netfilter/xt_osf.h',
475+	'linux/netfilter/xt_owner.h',
476+	'linux/netfilter/xt_physdev.h',
477+	'linux/netfilter/xt_pkttype.h',
478+	'linux/netfilter/xt_policy.h',
479+	'linux/netfilter/xt_quota.h',
480+	'linux/netfilter/xt_rateest.h',
481+	'linux/netfilter/xt_realm.h',
482+	'linux/netfilter/xt_recent.h',
483+	'linux/netfilter/xt_rpfilter.h',
484+	'linux/netfilter/xt_sctp.h',
485+	'linux/netfilter/xt_set.h',
486+	'linux/netfilter/xt_socket.h',
487+	'linux/netfilter/xt_state.h',
488+	'linux/netfilter/xt_statistic.h',
489+	'linux/netfilter/xt_string.h',
490+	'linux/netfilter/xt_tcpmss.h',
491+	'linux/netfilter/xt_tcpudp.h',
492+	'linux/netfilter/xt_time.h',
493+	'linux/netfilter/xt_u32.h',
494+	'linux/netfilter_arp.h',
495+	'linux/netfilter_arp/arp_tables.h',
496+	'linux/netfilter_arp/arpt_mangle.h',
497+	'linux/netfilter_bridge.h',
498+	'linux/netfilter_bridge/ebt_802_3.h',
499+	'linux/netfilter_bridge/ebt_among.h',
500+	'linux/netfilter_bridge/ebt_arp.h',
501+	'linux/netfilter_bridge/ebt_arpreply.h',
502+	'linux/netfilter_bridge/ebt_ip.h',
503+	'linux/netfilter_bridge/ebt_ip6.h',
504+	'linux/netfilter_bridge/ebt_limit.h',
505+	'linux/netfilter_bridge/ebt_log.h',
506+	'linux/netfilter_bridge/ebt_mark_m.h',
507+	'linux/netfilter_bridge/ebt_mark_t.h',
508+	'linux/netfilter_bridge/ebt_nat.h',
509+	'linux/netfilter_bridge/ebt_nflog.h',
510+	'linux/netfilter_bridge/ebt_pkttype.h',
511+	'linux/netfilter_bridge/ebt_redirect.h',
512+	'linux/netfilter_bridge/ebt_stp.h',
513+	'linux/netfilter_bridge/ebt_vlan.h',
514+	'linux/netfilter_bridge/ebtables.h',
515+	'linux/netfilter_ipv4.h',
516+	'linux/netfilter_ipv4/ip_tables.h',
517+	'linux/netfilter_ipv4/ipt_CLUSTERIP.h',
518+	'linux/netfilter_ipv4/ipt_ECN.h',
519+	'linux/netfilter_ipv4/ipt_LOG.h',
520+	'linux/netfilter_ipv4/ipt_REJECT.h',
521+	'linux/netfilter_ipv4/ipt_TTL.h',
522+	'linux/netfilter_ipv4/ipt_ah.h',
523+	'linux/netfilter_ipv4/ipt_ecn.h',
524+	'linux/netfilter_ipv4/ipt_ttl.h',
525+	'linux/netfilter_ipv6.h',
526+	'linux/netfilter_ipv6/ip6_tables.h',
527+	'linux/netfilter_ipv6/ip6t_HL.h',
528+	'linux/netfilter_ipv6/ip6t_LOG.h',
529+	'linux/netfilter_ipv6/ip6t_NPT.h',
530+	'linux/netfilter_ipv6/ip6t_REJECT.h',
531+	'linux/netfilter_ipv6/ip6t_ah.h',
532+	'linux/netfilter_ipv6/ip6t_frag.h',
533+	'linux/netfilter_ipv6/ip6t_hl.h',
534+	'linux/netfilter_ipv6/ip6t_ipv6header.h',
535+	'linux/netfilter_ipv6/ip6t_mh.h',
536+	'linux/netfilter_ipv6/ip6t_opts.h',
537+	'linux/netfilter_ipv6/ip6t_rt.h',
538+	'linux/netfilter_ipv6/ip6t_srh.h',
539+	'linux/netlink.h',
540+	'linux/netlink_diag.h',
541+	'linux/netrom.h',
542+	'linux/nexthop.h',
543+	'linux/nfc.h',
544+	'linux/nfs.h',
545+	'linux/nfs2.h',
546+	'linux/nfs3.h',
547+	'linux/nfs4.h',
548+	'linux/nfs4_mount.h',
549+	'linux/nfs_fs.h',
550+	'linux/nfs_idmap.h',
551+	'linux/nfs_mount.h',
552+	'linux/nfsacl.h',
553+	'linux/nfsd/cld.h',
554+	'linux/nfsd/debug.h',
555+	'linux/nfsd/export.h',
556+	'linux/nfsd/stats.h',
557+	'linux/nilfs2_api.h',
558+	'linux/nilfs2_ondisk.h',
559+	'linux/nitro_enclaves.h',
560+	'linux/nl80211-vnd-intel.h',
561+	'linux/nl80211.h',
562+	'linux/nsfs.h',
563+	'linux/nubus.h',
564+	'linux/nvme_ioctl.h',
565+	'linux/nvram.h',
566+	'linux/omap3isp.h',
567+	'linux/omapfb.h',
568+	'linux/oom.h',
569+	'linux/openat2.h',
570+	'linux/openvswitch.h',
571+	'linux/packet_diag.h',
572+	'linux/param.h',
573+	'linux/parport.h',
574+	'linux/patchkey.h',
575+	'linux/pci.h',
576+	'linux/pci_regs.h',
577+	'linux/pcitest.h',
578+	'linux/perf_event.h',
579+	'linux/personality.h',
580+	'linux/pfkeyv2.h',
581+	'linux/pfrut.h',
582+	'linux/pg.h',
583+	'linux/phantom.h',
584+	'linux/phonet.h',
585+	'linux/pidfd.h',
586+	'linux/pkt_cls.h',
587+	'linux/pkt_sched.h',
588+	'linux/pktcdvd.h',
589+	'linux/pmu.h',
590+	'linux/poll.h',
591+	'linux/posix_acl.h',
592+	'linux/posix_acl_xattr.h',
593+	'linux/posix_types.h',
594+	'linux/ppdev.h',
595+	'linux/ppp-comp.h',
596+	'linux/ppp-ioctl.h',
597+	'linux/ppp_defs.h',
598+	'linux/pps.h',
599+	'linux/pr.h',
600+	'linux/prctl.h',
601+	'linux/psample.h',
602+	'linux/psci.h',
603+	'linux/psp-sev.h',
604+	'linux/ptp_clock.h',
605+	'linux/ptrace.h',
606+	'linux/qemu_fw_cfg.h',
607+	'linux/qnx4_fs.h',
608+	'linux/qnxtypes.h',
609+	'linux/qrtr.h',
610+	'linux/quota.h',
611+	'linux/radeonfb.h',
612+	'linux/raid/md_p.h',
613+	'linux/raid/md_u.h',
614+	'linux/random.h',
615+	'linux/rds.h',
616+	'linux/reboot.h',
617+	'linux/reiserfs_fs.h',
618+	'linux/reiserfs_xattr.h',
619+	'linux/remoteproc_cdev.h',
620+	'linux/resource.h',
621+	'linux/rfkill.h',
622+	'linux/rio_cm_cdev.h',
623+	'linux/rio_mport_cdev.h',
624+	'linux/rkisp1-config.h',
625+	'linux/romfs_fs.h',
626+	'linux/rose.h',
627+	'linux/route.h',
628+	'linux/rpl.h',
629+	'linux/rpl_iptunnel.h',
630+	'linux/rpmsg.h',
631+	'linux/rpmsg_types.h',
632+	'linux/rseq.h',
633+	'linux/rtc.h',
634+	'linux/rtnetlink.h',
635+	'linux/rxrpc.h',
636+	'linux/scc.h',
637+	'linux/sched.h',
638+	'linux/sched/types.h',
639+	'linux/scif_ioctl.h',
640+	'linux/screen_info.h',
641+	'linux/sctp.h',
642+	'linux/seccomp.h',
643+	'linux/securebits.h',
644+	'linux/sed-opal.h',
645+	'linux/seg6.h',
646+	'linux/seg6_genl.h',
647+	'linux/seg6_hmac.h',
648+	'linux/seg6_iptunnel.h',
649+	'linux/seg6_local.h',
650+	'linux/selinux_netlink.h',
651+	'linux/sem.h',
652+	'linux/serial.h',
653+	'linux/serial_core.h',
654+	'linux/serial_reg.h',
655+	'linux/serio.h',
656+	'linux/sev-guest.h',
657+	'linux/shm.h',
658+	'linux/signal.h',
659+	'linux/signalfd.h',
660+	'linux/smc.h',
661+	'linux/smc_diag.h',
662+	'linux/smiapp.h',
663+	'linux/snmp.h',
664+	'linux/sock_diag.h',
665+	'linux/socket.h',
666+	'linux/sockios.h',
667+	'linux/sonet.h',
668+	'linux/sonypi.h',
669+	'linux/sound.h',
670+	'linux/soundcard.h',
671+	'linux/spi/spi.h',
672+	'linux/spi/spidev.h',
673+	'linux/stat.h',
674+	'linux/stddef.h',
675+	'linux/stm.h',
676+	'linux/string.h',
677+	'linux/sunrpc/debug.h',
678+	'linux/surface_aggregator/cdev.h',
679+	'linux/surface_aggregator/dtx.h',
680+	'linux/suspend_ioctls.h',
681+	'linux/swab.h',
682+	'linux/switchtec_ioctl.h',
683+	'linux/sync_file.h',
684+	'linux/synclink.h',
685+	'linux/sysctl.h',
686+	'linux/sysinfo.h',
687+	'linux/target_core_user.h',
688+	'linux/taskstats.h',
689+	'linux/tc_act/tc_bpf.h',
690+	'linux/tc_act/tc_connmark.h',
691+	'linux/tc_act/tc_csum.h',
692+	'linux/tc_act/tc_ct.h',
693+	'linux/tc_act/tc_ctinfo.h',
694+	'linux/tc_act/tc_defact.h',
695+	'linux/tc_act/tc_gact.h',
696+	'linux/tc_act/tc_gate.h',
697+	'linux/tc_act/tc_ife.h',
698+	'linux/tc_act/tc_ipt.h',
699+	'linux/tc_act/tc_mirred.h',
700+	'linux/tc_act/tc_mpls.h',
701+	'linux/tc_act/tc_nat.h',
702+	'linux/tc_act/tc_pedit.h',
703+	'linux/tc_act/tc_sample.h',
704+	'linux/tc_act/tc_skbedit.h',
705+	'linux/tc_act/tc_skbmod.h',
706+	'linux/tc_act/tc_tunnel_key.h',
707+	'linux/tc_act/tc_vlan.h',
708+	'linux/tc_ematch/tc_em_cmp.h',
709+	'linux/tc_ematch/tc_em_ipt.h',
710+	'linux/tc_ematch/tc_em_meta.h',
711+	'linux/tc_ematch/tc_em_nbyte.h',
712+	'linux/tc_ematch/tc_em_text.h',
713+	'linux/tcp.h',
714+	'linux/tcp_metrics.h',
715+	'linux/tdx-guest.h',
716+	'linux/tee.h',
717+	'linux/termios.h',
718+	'linux/thermal.h',
719+	'linux/time.h',
720+	'linux/time_types.h',
721+	'linux/timerfd.h',
722+	'linux/times.h',
723+	'linux/timex.h',
724+	'linux/tiocl.h',
725+	'linux/tipc.h',
726+	'linux/tipc_config.h',
727+	'linux/tipc_netlink.h',
728+	'linux/tipc_sockets_diag.h',
729+	'linux/tls.h',
730+	'linux/toshiba.h',
731+	'linux/tty.h',
732+	'linux/tty_flags.h',
733+	'linux/types.h',
734+	'linux/ublk_cmd.h',
735+	'linux/udf_fs_i.h',
736+	'linux/udmabuf.h',
737+	'linux/udp.h',
738+	'linux/uhid.h',
739+	'linux/uinput.h',
740+	'linux/uio.h',
741+	'linux/uleds.h',
742+	'linux/ultrasound.h',
743+	'linux/um_timetravel.h',
744+	'linux/un.h',
745+	'linux/unistd.h',
746+	'linux/unix_diag.h',
747+	'linux/usb/audio.h',
748+	'linux/usb/cdc-wdm.h',
749+	'linux/usb/cdc.h',
750+	'linux/usb/ch11.h',
751+	'linux/usb/ch9.h',
752+	'linux/usb/charger.h',
753+	'linux/usb/functionfs.h',
754+	'linux/usb/g_printer.h',
755+	'linux/usb/g_uvc.h',
756+	'linux/usb/gadgetfs.h',
757+	'linux/usb/midi.h',
758+	'linux/usb/raw_gadget.h',
759+	'linux/usb/tmc.h',
760+	'linux/usb/video.h',
761+	'linux/usbdevice_fs.h',
762+	'linux/usbip.h',
763+	'linux/user_events.h',
764+	'linux/userfaultfd.h',
765+	'linux/userio.h',
766+	'linux/utime.h',
767+	'linux/utsname.h',
768+	'linux/uuid.h',
769+	'linux/uvcvideo.h',
770+	'linux/v4l2-common.h',
771+	'linux/v4l2-controls.h',
772+	'linux/v4l2-dv-timings.h',
773+	'linux/v4l2-mediabus.h',
774+	'linux/v4l2-subdev.h',
775+	'linux/vbox_err.h',
776+	'linux/vbox_vmmdev_types.h',
777+	'linux/vboxguest.h',
778+	'linux/vdpa.h',
779+	'linux/vduse.h',
780+	'linux/veth.h',
781+	'linux/vfio.h',
782+	'linux/vfio_ccw.h',
783+	'linux/vfio_zdev.h',
784+	'linux/vhost.h',
785+	'linux/vhost_types.h',
786+	'linux/videodev2.h',
787+	'linux/virtio_9p.h',
788+	'linux/virtio_balloon.h',
789+	'linux/virtio_blk.h',
790+	'linux/virtio_bt.h',
791+	'linux/virtio_config.h',
792+	'linux/virtio_console.h',
793+	'linux/virtio_crypto.h',
794+	'linux/virtio_fs.h',
795+	'linux/virtio_gpio.h',
796+	'linux/virtio_gpu.h',
797+	'linux/virtio_i2c.h',
798+	'linux/virtio_ids.h',
799+	'linux/virtio_input.h',
800+	'linux/virtio_iommu.h',
801+	'linux/virtio_mem.h',
802+	'linux/virtio_mmio.h',
803+	'linux/virtio_net.h',
804+	'linux/virtio_pci.h',
805+	'linux/virtio_pcidev.h',
806+	'linux/virtio_pmem.h',
807+	'linux/virtio_ring.h',
808+	'linux/virtio_rng.h',
809+	'linux/virtio_scmi.h',
810+	'linux/virtio_scsi.h',
811+	'linux/virtio_snd.h',
812+	'linux/virtio_types.h',
813+	'linux/virtio_vsock.h',
814+	'linux/vm_sockets.h',
815+	'linux/vm_sockets_diag.h',
816+	'linux/vmcore.h',
817+	'linux/vsockmon.h',
818+	'linux/vt.h',
819+	'linux/vtpm_proxy.h',
820+	'linux/wait.h',
821+	'linux/watch_queue.h',
822+	'linux/watchdog.h',
823+	'linux/wireguard.h',
824+	'linux/wireless.h',
825+	'linux/wmi.h',
826+	'linux/wwan.h',
827+	'linux/x25.h',
828+	'linux/xattr.h',
829+	'linux/xdp_diag.h',
830+	'linux/xfrm.h',
831+	'linux/xilinx-v4l2-controls.h',
832+	'linux/zorro.h',
833+	'linux/zorro_ids.h',
834+	'misc/cxl.h',
835+	'misc/fastrpc.h',
836+	'misc/ocxl.h',
837+	'misc/pvpanic.h',
838+	'misc/uacce/hisi_qm.h',
839+	'misc/uacce/uacce.h',
840+	'misc/xilinx_sdfec.h',
841+	'mtd/inftl-user.h',
842+	'mtd/mtd-abi.h',
843+	'mtd/mtd-user.h',
844+	'mtd/nftl-user.h',
845+	'mtd/ubi-user.h',
846+	'rdma/bnxt_re-abi.h',
847+	'rdma/cxgb4-abi.h',
848+	'rdma/efa-abi.h',
849+	'rdma/erdma-abi.h',
850+	'rdma/hfi/hfi1_ioctl.h',
851+	'rdma/hfi/hfi1_user.h',
852+	'rdma/hns-abi.h',
853+	'rdma/ib_user_ioctl_cmds.h',
854+	'rdma/ib_user_ioctl_verbs.h',
855+	'rdma/ib_user_mad.h',
856+	'rdma/ib_user_sa.h',
857+	'rdma/ib_user_verbs.h',
858+	'rdma/irdma-abi.h',
859+	'rdma/mana-abi.h',
860+	'rdma/mlx4-abi.h',
861+	'rdma/mlx5-abi.h',
862+	'rdma/mlx5_user_ioctl_cmds.h',
863+	'rdma/mlx5_user_ioctl_verbs.h',
864+	'rdma/mthca-abi.h',
865+	'rdma/ocrdma-abi.h',
866+	'rdma/qedr-abi.h',
867+	'rdma/rdma_netlink.h',
868+	'rdma/rdma_user_cm.h',
869+	'rdma/rdma_user_ioctl.h',
870+	'rdma/rdma_user_ioctl_cmds.h',
871+	'rdma/rdma_user_rxe.h',
872+	'rdma/rvt-abi.h',
873+	'rdma/siw-abi.h',
874+	'rdma/vmw_pvrdma-abi.h',
875+	'scsi/cxlflash_ioctl.h',
876+	'scsi/fc/fc_els.h',
877+	'scsi/fc/fc_fs.h',
878+	'scsi/fc/fc_gs.h',
879+	'scsi/fc/fc_ns.h',
880+	'scsi/scsi_bsg_fc.h',
881+	'scsi/scsi_bsg_mpi3mr.h',
882+	'scsi/scsi_bsg_ufs.h',
883+	'scsi/scsi_netlink.h',
884+	'scsi/scsi_netlink_fc.h',
885+	'sound/asequencer.h',
886+	'sound/asoc.h',
887+	'sound/asound.h',
888+	'sound/asound_fm.h',
889+	'sound/compress_offload.h',
890+	'sound/compress_params.h',
891+	'sound/emu10k1.h',
892+	'sound/firewire.h',
893+	'sound/hdsp.h',
894+	'sound/hdspm.h',
895+	'sound/intel/avs/tokens.h',
896+	'sound/sb16_csp.h',
897+	'sound/sfnt_info.h',
898+	'sound/skl-tplg-interface.h',
899+	'sound/snd_ar_tokens.h',
900+	'sound/snd_sst_tokens.h',
901+	'sound/sof/abi.h',
902+	'sound/sof/fw.h',
903+	'sound/sof/header.h',
904+	'sound/sof/tokens.h',
905+	'sound/tlv.h',
906+	'sound/usb_stream.h',
907+	'video/edid.h',
908+	'video/sisfb.h',
909+	'video/uvesafb.h',
910+	'xen/evtchn.h',
911+	'xen/gntalloc.h',
912+	'xen/gntdev.h',
913+	'xen/privcmd.h',
914+}
+27, -0
 1@@ -0,0 +1,27 @@
 2+set -e
 3+
 4+dir=$1
 5+shift
 6+
 7+cd "$dir"
 8+
 9+if [ -e src ] ; then
10+        rm -rf src
11+fi
12+
13+if ! sh "$OLDPWD/scripts/checksum.sh" -c sha256 2>/dev/null ; then
14+        curl -L -K url -O
15+        sh "$OLDPWD/scripts/checksum.sh" -c sha256
16+fi
17+
18+read -r _ archive <sha256
19+sh "$OLDPWD/scripts/extract.sh" "$archive" -s ',^[^/]*,src,' \
20+	'linux-*/Makefile' \
21+	'linux-*/arch/*/include/uapi' \
22+	'linux-*/arch/*/syscalls' \
23+	'linux-*/include/uapi' \
24+	'linux-*/scripts/unifdef.c'
25+
26+if [ -d patch ] ; then
27+	git apply -v --whitespace=nowarn --directory "$dir/src" patch/*
28+fi
+97, -0
 1@@ -0,0 +1,97 @@
 2+local arch = ({
 3+	aarch64='arm64',
 4+	x86_64='x86',
 5+})[config.target.platform:match('[^-]*')]
 6+sub('tools.ninja', function()
 7+	toolchain(config.host)
 8+	exe('unifdef', {'scripts/unifdef.c'})
 9+end)
10+
11+rule('header', 'sed -E -f $dir/header.sed $in >$out.tmp && { $outdir/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__ $out.tmp >$out; [ $$? -le 1 ]; } && rm $out.tmp')
12+rule('wrapper', [[printf '#include <asm-generic/%s>\n' $file >$out]])
13+
14+local function process(outdir, srcdir, files)
15+	local outs = {}
16+	for i, file in ipairs(files) do
17+		local out = outdir..'/'..file
18+		outs[i] = out
19+		build('header', out, {srcdir..'/'..file, '|', '$dir/header.sed', '$outdir/unifdef'})
20+	end
21+	return outs
22+end
23+
24+local mandatory = {
25+	-- <awk '$1 == "mandatory-y" {printf "\\t'\'%s\'',\\n", $3}' src/include/uapi/asm-generic/Kbuild
26+	'auxvec.h',
27+	'bitsperlong.h',
28+	'bpf_perf_event.h',
29+	'byteorder.h',
30+	'errno.h',
31+	'fcntl.h',
32+	'ioctl.h',
33+	'ioctls.h',
34+	'ipcbuf.h',
35+	'mman.h',
36+	'msgbuf.h',
37+	'param.h',
38+	'poll.h',
39+	'posix_types.h',
40+	'ptrace.h',
41+	'resource.h',
42+	'sembuf.h',
43+	'setup.h',
44+	'shmbuf.h',
45+	'sigcontext.h',
46+	'siginfo.h',
47+	'signal.h',
48+	'socket.h',
49+	'sockios.h',
50+	'stat.h',
51+	'statfs.h',
52+	'swab.h',
53+	'termbits.h',
54+	'termios.h',
55+	'types.h',
56+	'unistd.h',
57+}
58+
59+local basefiles = load('base.lua')
60+local archfiles = load(arch..'.lua')
61+
62+build('awk', '$outdir/include/linux/version.h', {'$srcdir/Makefile', '|', '$dir/version.awk'}, {
63+	expr='-f $dir/version.awk',
64+})
65+
66+pkg.hdrs = {
67+	'$outdir/include/linux/version.h',
68+	process('$outdir/include', '$srcdir/include/uapi', basefiles),
69+	process('$outdir/include', '$srcdir/arch/'..arch..'/include/uapi', archfiles),
70+	install=true,
71+}
72+
73+for _, file in ipairs(archfiles) do
74+	archfiles[file] = true
75+end
76+for _, file in ipairs(mandatory) do
77+	if not archfiles['asm/'..file] then
78+		local out = '$outdir/include/asm/'..file
79+		build('wrapper', out, nil, {file=file})
80+		table.insert(pkg.hdrs, out)
81+	end
82+end
83+
84+for _, spec in ipairs(archfiles.unistd) do
85+	local out = '$outdir/include/asm/'..spec.dst
86+	build('awk', out, {'$srcdir/'..spec.src, '|', '$dir/unistd.awk'}, {
87+		expr={
88+			'-v arch='..arch,
89+			'-v file='..spec.dst,
90+			string.format([[-v abi='%s']], spec.abi),
91+			'-v off='..(spec.off or ''),
92+			'-f $dir/unistd.awk',
93+		},
94+	})
95+	table.insert(pkg.hdrs, out)
96+end
97+
98+fetch 'local'
+7, -0
1@@ -0,0 +1,7 @@
2+# scripts/headers_install.sh
3+s/([[:space:](])(__user|__force|__iomem)[[:space:]]/\1/g
4+s/__attribute_const__([[:space:]]|$)/\1/g
5+s@^#include <linux/compiler(_types)?.h>@@
6+s/(^|[^a-zA-Z0-9])__packed([^a-zA-Z0-9_]|$)/\1__attribute__((packed))\2/g
7+s/(^|[[:space:](])(inline|asm|volatile)([[:space:](]|$)/\1__\2__\3/g
8+s@#(ifndef|define|endif[[:space:]]*/[*])[[:space:]]*_UAPI@#\1 @
+32, -0
 1@@ -0,0 +1,32 @@
 2+From 0043f6d3073da1b4adc0cdfd9bf1768a58034353 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 17 Jun 2019 20:11:17 -0700
 5+Subject: [PATCH] Only use inline asm in headers on GNU-compatible compilers
 6+
 7+---
 8+ arch/x86/include/uapi/asm/swab.h | 4 ++++
 9+ 1 file changed, 4 insertions(+)
10+
11+diff --git a/arch/x86/include/uapi/asm/swab.h b/arch/x86/include/uapi/asm/swab.h
12+index cd3fd8ddbe9a..2074e5d7d94d 100644
13+--- a/arch/x86/include/uapi/asm/swab.h
14++++ b/arch/x86/include/uapi/asm/swab.h
15+@@ -5,6 +5,8 @@
16+ #include <linux/types.h>
17+ #include <linux/compiler.h>
18+ 
19++#ifdef __GNUC__
20++
21+ static inline __attribute_const__ __u32 __arch_swab32(__u32 val)
22+ {
23+ 	asm("bswapl %0" : "=r" (val) : "0" (val));
24+@@ -34,4 +36,6 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 val)
25+ }
26+ #define __arch_swab64 __arch_swab64
27+ 
28++#endif /* __GNUC__ */
29++
30+ #endif /* _ASM_X86_SWAB_H */
31+-- 
32+2.25.0
33+
+32, -0
 1@@ -0,0 +1,32 @@
 2+From e373a645de1b2e57878dc17420dad3d0464694e6 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 2 Jun 2020 03:56:03 -0700
 5+Subject: [PATCH] Revert change of BPF_F_* to enum constants
 6+
 7+---
 8+ include/uapi/linux/bpf.h | 8 +++-----
 9+ 1 file changed, 3 insertions(+), 5 deletions(-)
10+
11+diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
12+index c994ff5b157c..ed8261560f2b 100644
13+--- a/include/uapi/linux/bpf.h
14++++ b/include/uapi/linux/bpf.h
15+@@ -5850,12 +5850,10 @@ enum {
16+ /* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and
17+  * BPF_FUNC_perf_event_read_value flags.
18+  */
19+-enum {
20+-	BPF_F_INDEX_MASK		= 0xffffffffULL,
21+-	BPF_F_CURRENT_CPU		= BPF_F_INDEX_MASK,
22++#define BPF_F_INDEX_MASK		0xffffffffULL
23++#define BPF_F_CURRENT_CPU		BPF_F_INDEX_MASK
24+ /* BPF_FUNC_perf_event_output for sk_buff input context. */
25+-	BPF_F_CTXLEN_MASK		= (0xfffffULL << 32),
26+-};
27++#define BPF_F_CTXLEN_MASK		(0xfffffULL << 32)
28+ 
29+ /* Current network namespace */
30+ enum {
31+-- 
32+2.37.3
33+
+77, -0
 1@@ -0,0 +1,77 @@
 2+From 4d7aad2421c783cf57f359638197f0ad2a32a287 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 30 Aug 2021 19:26:32 -0700
 5+Subject: [PATCH] Prevent zero-length array members in asound.h
 6+
 7+---
 8+ include/uapi/sound/asound.h | 31 +++++++++++++++++++++----------
 9+ 1 file changed, 21 insertions(+), 10 deletions(-)
10+
11+diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
12+index 0aa955aa8246..2e7ca9236c7a 100644
13+--- a/include/uapi/sound/asound.h
14++++ b/include/uapi/sound/asound.h
15+@@ -550,22 +550,30 @@ struct __snd_pcm_sync_ptr {
16+ 	} c;
17+ };
18+ 
19++#if __BITS_PER_LONG == 32
20+ #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
21+-typedef char __pad_before_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
22+-typedef char __pad_after_uframe[0];
23++#define __PAD_BEFORE_UFRAME(x) char x[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
24+ #endif
25+ 
26+ #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
27+-typedef char __pad_before_uframe[0];
28+-typedef char __pad_after_uframe[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
29++#define __PAD_AFTER_UFRAME(x) char x[sizeof(__u64) - sizeof(snd_pcm_uframes_t)];
30++#endif
31++#endif
32++
33++#ifndef __PAD_BEFORE_UFRAME
34++#define __PAD_BEFORE_UFRAME(x)
35++#endif
36++
37++#ifndef __PAD_AFTER_UFRAME
38++#define __PAD_AFTER_UFRAME(x)
39+ #endif
40+ 
41+ struct __snd_pcm_mmap_status64 {
42+ 	snd_pcm_state_t state;		/* RO: state - SNDRV_PCM_STATE_XXXX */
43+ 	__u32 pad1;			/* Needed for 64 bit alignment */
44+-	__pad_before_uframe __pad1;
45++	__PAD_BEFORE_UFRAME(__pad1)
46+ 	snd_pcm_uframes_t hw_ptr;	/* RO: hw ptr (0...boundary-1) */
47+-	__pad_after_uframe __pad2;
48++	__PAD_AFTER_UFRAME(__pad2)
49+ 	struct __snd_timespec64 tstamp;	/* Timestamp */
50+ 	snd_pcm_state_t suspended_state;/* RO: suspended stream state */
51+ 	__u32 pad3;			/* Needed for 64 bit alignment */
52+@@ -573,16 +581,19 @@ struct __snd_pcm_mmap_status64 {
53+ };
54+ 
55+ struct __snd_pcm_mmap_control64 {
56+-	__pad_before_uframe __pad1;
57++	__PAD_BEFORE_UFRAME(__pad1)
58+ 	snd_pcm_uframes_t appl_ptr;	 /* RW: appl ptr (0...boundary-1) */
59+-	__pad_before_uframe __pad2;	 // This should be __pad_after_uframe, but binary
60++	__PAD_BEFORE_UFRAME(__pad2)	 // This should be __pad_after_uframe, but binary
61+ 					 // backwards compatibility constraints prevent a fix.
62+ 
63+-	__pad_before_uframe __pad3;
64++	__PAD_BEFORE_UFRAME(__pad3)
65+ 	snd_pcm_uframes_t  avail_min;	 /* RW: min available frames for wakeup */
66+-	__pad_after_uframe __pad4;
67++	__PAD_AFTER_UFRAME(__pad4)
68+ };
69+ 
70++#undef __PAD_BEFORE_UFRAME
71++#undef __PAD_AFTER_UFRAME
72++
73+ struct __snd_pcm_sync_ptr64 {
74+ 	__u32 flags;
75+ 	__u32 pad1;
76+-- 
77+2.37.3
78+
+32, -0
 1@@ -0,0 +1,32 @@
 2+From 3685e3c0cb5029b4e17eee6a53d2214190738c24 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 2 Dec 2021 14:49:08 -0800
 5+Subject: [PATCH] Make struct bpf_timer include a named member
 6+
 7+A struct without any named members is undefined behavior by C11
 8+6.7.2.1p8.
 9+
10+Signed-off-by: Michael Forney <mforney@mforney.org>
11+---
12+ include/uapi/linux/bpf.h | 5 ++---
13+ 1 file changed, 2 insertions(+), 3 deletions(-)
14+
15+diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
16+index ed8261560f2b..fb60bc7bb305 100644
17+--- a/include/uapi/linux/bpf.h
18++++ b/include/uapi/linux/bpf.h
19+@@ -6968,9 +6968,8 @@ struct bpf_spin_lock {
20+ };
21+ 
22+ struct bpf_timer {
23+-	__u64 :64;
24+-	__u64 :64;
25+-} __attribute__((aligned(8)));
26++	__u64	reserved[2];
27++};
28+ 
29+ struct bpf_dynptr {
30+ 	__u64 :64;
31+-- 
32+2.37.3
33+
+26, -0
 1@@ -0,0 +1,26 @@
 2+From c421db7540796882a53d9b533862da16d7810ec3 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 18 Feb 2022 01:51:13 -0800
 5+Subject: [PATCH] nfc: uapi: remove stray semicolon in struct declaration
 6+
 7+Signed-off-by: Michael Forney <mforney@mforney.org>
 8+---
 9+ include/uapi/linux/nfc.h | 2 +-
10+ 1 file changed, 1 insertion(+), 1 deletion(-)
11+
12+diff --git a/include/uapi/linux/nfc.h b/include/uapi/linux/nfc.h
13+index 4fa4e979e948..8ab0833ed192 100644
14+--- a/include/uapi/linux/nfc.h
15++++ b/include/uapi/linux/nfc.h
16+@@ -277,7 +277,7 @@ struct sockaddr_nfc_llcp {
17+ 	__u32 nfc_protocol;
18+ 	__u8 dsap; /* Destination SAP, if known */
19+ 	__u8 ssap; /* Source SAP to be bound to */
20+-	char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */;
21++	char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */
22+ 	__kernel_size_t service_name_len;
23+ };
24+ 
25+-- 
26+2.34.1
27+
+1, -0
1@@ -0,0 +1 @@
2+8fa0588f0c2ceca44cac77a0e39ba48c9f00a6b9dc69761c02a5d3efac8da7f3  linux-6.4.tar.xz
+18, -0
 1@@ -0,0 +1,18 @@
 2+BEGIN {
 3+	guard = toupper("_ASM_" arch "_" file)
 4+	gsub(/[^A-Za-z0-9_]/, "_", guard)
 5+	print "#ifndef " guard
 6+	print "#define " guard " 1"
 7+	print ""
 8+}
 9+
10+$0 ~ /^[^#]+/ && $2 ~ "^(" abi ")$" {
11+	if (off != "")
12+		$1 = "(" off " + " $1 ")"
13+	print "#define __NR_" $3, $1
14+}
15+
16+END {
17+	print ""
18+	print "#endif /* " guard " */"
19+}
+1, -0
1@@ -0,0 +1 @@
2+url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.tar.xz"
+1, -0
1@@ -0,0 +1 @@
2+6.4 r0
+8, -0
1@@ -0,0 +1,8 @@
2+/^VERSION = /    { version = $3 }
3+/^PATCHLEVEL = / { patchlevel = $3 }
4+/^SUBLEVEL = /   { sublevel = $3 }
5+
6+END {
7+	print "#define LINUX_VERSION_CODE " (version * 65536 + patchlevel * 256 + sublevel)
8+	print "#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))"
9+}
+68, -0
 1@@ -0,0 +1,68 @@
 2+return {
 3+	-- <cd src/arch/x86/include/uapi && find * -name '*.h' -exec printf "\t'%s',\n" {} + | LC_COLLATE=C sort
 4+	'asm/a.out.h',
 5+	'asm/amd_hsmp.h',
 6+	'asm/auxvec.h',
 7+	'asm/bitsperlong.h',
 8+	'asm/boot.h',
 9+	'asm/bootparam.h',
10+	'asm/byteorder.h',
11+	'asm/debugreg.h',
12+	'asm/e820.h',
13+	'asm/hw_breakpoint.h',
14+	'asm/hwcap2.h',
15+	'asm/ist.h',
16+	'asm/kvm.h',
17+	'asm/kvm_para.h',
18+	'asm/kvm_perf.h',
19+	'asm/ldt.h',
20+	'asm/mce.h',
21+	'asm/mman.h',
22+	'asm/msgbuf.h',
23+	'asm/msr.h',
24+	'asm/mtrr.h',
25+	'asm/perf_regs.h',
26+	'asm/posix_types.h',
27+	'asm/posix_types_32.h',
28+	'asm/posix_types_64.h',
29+	'asm/posix_types_x32.h',
30+	'asm/prctl.h',
31+	'asm/processor-flags.h',
32+	'asm/ptrace-abi.h',
33+	'asm/ptrace.h',
34+	'asm/sembuf.h',
35+	'asm/setup.h',
36+	'asm/sgx.h',
37+	'asm/shmbuf.h',
38+	'asm/sigcontext.h',
39+	'asm/sigcontext32.h',
40+	'asm/siginfo.h',
41+	'asm/signal.h',
42+	'asm/stat.h',
43+	'asm/statfs.h',
44+	'asm/svm.h',
45+	'asm/swab.h',
46+	'asm/ucontext.h',
47+	'asm/unistd.h',
48+	'asm/vm86.h',
49+	'asm/vmx.h',
50+	'asm/vsyscall.h',
51+	unistd={
52+		{
53+			dst='unistd_32.h',
54+			src='arch/x86/entry/syscalls/syscall_32.tbl',
55+			abi='i386',
56+		},
57+		{
58+			dst='unistd_x32.h',
59+			src='arch/x86/entry/syscalls/syscall_64.tbl',
60+			abi='common|x32',
61+			off='__X32_SYSCALL_BIT',
62+		},
63+		{
64+			dst='unistd_64.h',
65+			src='arch/x86/entry/syscalls/syscall_64.tbl',
66+			abi='common|64',
67+		},
68+	},
69+}
+2, -0
1@@ -0,0 +1,2 @@
2+/lpeg-1.0.2.tar.gz
3+/src
+17, -0
 1@@ -0,0 +1,17 @@
 2+cflags{
 3+	'-std=c99',
 4+	'-D NDEBUG',
 5+	'-isystem $builddir/pkg/lua/include',
 6+}
 7+
 8+pkg.deps = {'pkg/lua/headers'}
 9+
10+lib('liblpeg.a', {
11+	'lpvm.c',
12+	'lpcap.c',
13+	'lptree.c',
14+	'lpcode.c',
15+	'lpprint.c',
16+})
17+
18+fetch 'curl'
+1, -0
1@@ -0,0 +1 @@
2+48d66576051b6c78388faad09b70493093264588fcd0f258ddaab1cdd4a15ffe  lpeg-1.0.2.tar.gz
+1, -0
1@@ -0,0 +1 @@
2+url = "http://www.inf.puc-rio.br/~roberto/lpeg/lpeg-1.0.2.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+1.0.2 r0
+2, -0
1@@ -0,0 +1,2 @@
2+/lua-5.2.4.tar.gz
3+/src
+26, -0
 1@@ -0,0 +1,26 @@
 2+cflags{
 3+	'-std=c99', '-Wall', '-Wextra', '-Wpedantic', '-Wno-implicit-fallthrough',
 4+	'-D _DEFAULT_SOURCE',
 5+	'-D LUA_USE_POSIX',
 6+}
 7+
 8+pkg.hdrs = {
 9+	copy('$outdir/include', '$srcdir/src', {'lua.h', 'luaconf.h', 'lualib.h', 'lauxlib.h'}),
10+	install=true,
11+}
12+
13+lib('liblua.a', [[src/(
14+	lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c
15+	lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c
16+	ltm.c lundump.c lvm.c lzio.c
17+	lauxlib.c lbaselib.c lbitlib.c lcorolib.c ldblib.c liolib.c
18+	lmathlib.c loslib.c lstrlib.c ltablib.c loadlib.c linit.c
19+)]])
20+file('lib/liblua.a', '644', '$outdir/liblua.a')
21+
22+exe('lua', {'src/lua.c', 'liblua.a'})
23+file('bin/lua5.2', '755', '$outdir/lua')
24+sym('bin/lua', 'lua5.2')
25+man{'doc/lua.1'}
26+
27+fetch 'curl'
+1, -0
1@@ -0,0 +1 @@
2+b9e2e4aad6789b3b63a056d442f7b39f0ecfca3ae0f1fc0ae4e9614401b69f4b  lua-5.2.4.tar.gz
+1, -0
1@@ -0,0 +1 @@
2+url = "http://www.lua.org/ftp/lua-5.2.4.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+5.2.4 r0
+2, -0
1@@ -0,0 +1,2 @@
2+/make-4.3.tar.gz
3+/src
+394, -0
  1@@ -0,0 +1,394 @@
  2+#define INCLUDEDIR "/include"
  3+#define LIBDIR "/lib"
  4+#define LOCALEDIR "/share/locale"
  5+
  6+/* #undef AC_APPLE_UNIVERSAL_BUILD */
  7+/* #undef BITSIZEOF_PTRDIFF_T */
  8+/* #undef BITSIZEOF_SIG_ATOMIC_T */
  9+/* #undef BITSIZEOF_SIZE_T */
 10+/* #undef BITSIZEOF_WCHAR_T */
 11+/* #undef BITSIZEOF_WINT_T */
 12+/* #undef CLOSEDIR_VOID */
 13+/* #undef CRAY_STACKSEG_END */
 14+/* #undef C_ALLOCA */
 15+/* #undef DGUX */
 16+/* #undef DOUBLE_SLASH_IS_DISTINCT_ROOT */
 17+/* #undef ENABLE_NLS */
 18+/* #undef FCNTL_DUPFD_BUGGY */
 19+#define FILE_TIMESTAMP_HI_RES 1
 20+#define GNULIB_FSCANF 1
 21+#define GNULIB_MSVC_NOTHROW 1
 22+/* #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU */
 23+#define GNULIB_SCANF 1
 24+#define GNULIB_STRERROR 1
 25+#define GNULIB_TEST_ACCESS 1
 26+#define GNULIB_TEST_CLOSE 1
 27+#define GNULIB_TEST_DUP2 1
 28+#define GNULIB_TEST_FCNTL 1
 29+#define GNULIB_TEST_GETDTABLESIZE 1
 30+#define GNULIB_TEST_GETLOADAVG 1
 31+#define GNULIB_TEST_MALLOC_POSIX 1
 32+#define GNULIB_TEST_STPCPY 1
 33+#define GNULIB_TEST_STRERROR 1
 34+#define HAVE_ALLOCA 1
 35+#define HAVE_ALLOCA_H 1
 36+#define HAVE_ATEXIT 1
 37+/* #undef HAVE_CASE_INSENSITIVE_FS */
 38+/* #undef HAVE_CFLOCALECOPYCURRENT */
 39+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
 40+#define HAVE_CLOCK_GETTIME 1
 41+/* #undef HAVE_DCGETTEXT */
 42+#define HAVE_DECL_BSD_SIGNAL 1
 43+#define HAVE_DECL_DLERROR 1
 44+#define HAVE_DECL_DLOPEN 1
 45+#define HAVE_DECL_DLSYM 1
 46+#define HAVE_DECL_GETDTABLESIZE 1
 47+#define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
 48+#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 1
 49+#define HAVE_DECL_STRERROR_R 1
 50+#define HAVE_DECL_SYS_SIGLIST 0
 51+#define HAVE_DECL__SYS_SIGLIST 0
 52+#define HAVE_DECL___ARGV 0
 53+#define HAVE_DECL___SYS_SIGLIST 0
 54+#define HAVE_DIRENT_H 1
 55+/* #undef HAVE_DOS_PATHS */
 56+#define HAVE_DUP 1
 57+#define HAVE_DUP2 1
 58+#define HAVE_FCNTL 1
 59+#define HAVE_FCNTL_H 1
 60+#define HAVE_FDOPEN 1
 61+#define HAVE_FORK 1
 62+#define HAVE_GETCWD 1
 63+#define HAVE_GETDTABLESIZE 1
 64+/* #undef HAVE_GETEXECNAME */
 65+#define HAVE_GETGROUPS 1
 66+/* #undef HAVE_GETHOSTBYNAME */
 67+/* #undef HAVE_GETHOSTNAME */
 68+/* #undef HAVE_GETPROGNAME */
 69+#define HAVE_GETRLIMIT 1
 70+/* #undef HAVE_GETTEXT */
 71+#define HAVE_GETTIMEOFDAY 1
 72+/* #undef HAVE_GUILE */
 73+#define HAVE_ICONV 1
 74+#define HAVE_INTTYPES_H 1
 75+#define HAVE_ISATTY 1
 76+/* #undef HAVE_LIBDGC */
 77+/* #undef HAVE_LIBKSTAT */
 78+/* #undef HAVE_LIBPERFSTAT */
 79+#define HAVE_LIMITS_H 1
 80+#define HAVE_LOCALE_H 1
 81+#define HAVE_LONG_LONG_INT 1
 82+#define HAVE_LSTAT 1
 83+/* #undef HAVE_MACH_MACH_H */
 84+#define HAVE_MALLOC_POSIX 1
 85+#define HAVE_MEMORY_H 1
 86+#define HAVE_MEMRCHR 1
 87+#define HAVE_MKSTEMP 1
 88+#define HAVE_MKTEMP 1
 89+/* #undef HAVE_MSVC_INVALID_PARAMETER_HANDLER */
 90+/* #undef HAVE_NDIR_H */
 91+/* #undef HAVE_NLIST_H */
 92+#define HAVE_PIPE 1
 93+#define HAVE_POSIX_SPAWN 1
 94+#define HAVE_POSIX_SPAWNATTR_SETSIGMASK 1
 95+#define HAVE_PSELECT 1
 96+/* #undef HAVE_PSTAT_GETDYNAMIC */
 97+#define HAVE_READLINK 1
 98+#define HAVE_REALPATH 1
 99+#define HAVE_SA_RESTART 1
100+/* #undef HAVE_SETDTABLESIZE */
101+#define HAVE_SETEGID 1
102+#define HAVE_SETEUID 1
103+#define HAVE_SETLINEBUF 1
104+#define HAVE_SETREGID 1
105+#define HAVE_SETREUID 1
106+#define HAVE_SETRLIMIT 1
107+#define HAVE_SETVBUF 1
108+#define HAVE_SIGACTION 1
109+/* #undef HAVE_SIGNED_SIG_ATOMIC_T */
110+/* #undef HAVE_SIGNED_WCHAR_T */
111+/* #undef HAVE_SIGNED_WINT_T */
112+/* #undef HAVE_SIGSETMASK */
113+/* #undef HAVE_SOCKET */
114+#define HAVE_SPAWN_H 1
115+#define HAVE_STDINT_H 1
116+#define HAVE_STDLIB_H 1
117+#define HAVE_STPCPY 1
118+#define HAVE_STRCASECMP 1
119+/* #undef HAVE_STRCMPI */
120+#define HAVE_STRCOLL 1
121+#define HAVE_STRDUP 1
122+#define HAVE_STRERROR_R 1
123+/* #undef HAVE_STRICMP */
124+#define HAVE_STRINGS_H 1
125+#define HAVE_STRING_H 1
126+#define HAVE_STRNCASECMP 1
127+/* #undef HAVE_STRNCMPI */
128+#define HAVE_STRNDUP 1
129+/* #undef HAVE_STRNICMP */
130+#define HAVE_STRSIGNAL 1
131+#define HAVE_STRUCT_DIRENT_D_TYPE 1
132+/* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */
133+#define HAVE_SYMLINK 1
134+/* #undef HAVE_SYS_BITYPES_H */
135+/* #undef HAVE_SYS_DIR_H */
136+#define HAVE_SYS_FILE_H 1
137+/* #undef HAVE_SYS_INTTYPES_H */
138+/* #undef HAVE_SYS_LOADAVG_H */
139+/* #undef HAVE_SYS_NDIR_H */
140+#define HAVE_SYS_PARAM_H 1
141+#define HAVE_SYS_RESOURCE_H 1
142+#define HAVE_SYS_SELECT_H 1
143+#define HAVE_SYS_SOCKET_H 1
144+#define HAVE_SYS_STAT_H 1
145+#define HAVE_SYS_TIMEB_H 1
146+#define HAVE_SYS_TIME_H 1
147+#define HAVE_SYS_TYPES_H 1
148+#define HAVE_SYS_WAIT_H 1
149+#define HAVE_TTYNAME 1
150+#define HAVE_UINTMAX_T 1
151+#define HAVE_UMASK 1
152+/* #undef HAVE_UNION_WAIT */
153+#define HAVE_UNISTD_H 1
154+#define HAVE_UNSIGNED_LONG_LONG_INT 1
155+/* #undef HAVE_VAR___PROGNAME */
156+#define HAVE_VFORK 1
157+/* #undef HAVE_VFORK_H */
158+#define HAVE_WAIT3 1
159+#define HAVE_WAITPID 1
160+#define HAVE_WCHAR_H 1
161+#define HAVE_WCHAR_T 1
162+/* #undef HAVE_WINSOCK2_H */
163+#define HAVE_WINT_T 1
164+#define HAVE_WORKING_FORK 1
165+#define HAVE_WORKING_O_NOATIME 1
166+#define HAVE_WORKING_O_NOFOLLOW 1
167+#define HAVE_WORKING_VFORK 1
168+#define HAVE__BOOL 1
169+/* #undef HAVE__SET_INVALID_PARAMETER_HANDLER */
170+#define MAKE_HOST "x86_64-pc-linux-musl"
171+#define MAKE_JOBSERVER 1
172+#define MAKE_LOAD 1
173+#define MAKE_SYMLINKS 1
174+#ifndef __USE_MINGW_ANSI_STDIO
175+# define __USE_MINGW_ANSI_STDIO 1
176+#endif
177+/* #undef N_NAME_POINTER */
178+#define PACKAGE "make"
179+#define PACKAGE_BUGREPORT "bug-make@gnu.org"
180+#define PACKAGE_NAME "GNU make"
181+#define PACKAGE_STRING "GNU make 4.3"
182+#define PACKAGE_TARNAME "make"
183+#define PACKAGE_URL "http://www.gnu.org/software/make/"
184+#define PACKAGE_VERSION "4.3"
185+#define PATH_SEPARATOR_CHAR ':'
186+/* #undef PTRDIFF_T_SUFFIX */
187+/* #undef REPLACE_STRERROR_0 */
188+#define RETSIGTYPE void
189+#define SCCS_GET "get"
190+/* #undef SCCS_GET_MINUS_G */
191+/* #undef SIG_ATOMIC_T_SUFFIX */
192+/* #undef SIZE_T_SUFFIX */
193+/* #undef STACK_DIRECTION */
194+/* #undef STAT_MACROS_BROKEN */
195+#define STDC_HEADERS 1
196+/* #undef STRERROR_R_CHAR_P */
197+#define ST_MTIM_NSEC st_mtim.tv_nsec
198+/* #undef SVR4 */
199+#define TIME_WITH_SYS_TIME 1
200+/* #undef UMAX */
201+/* #undef UMAX4_3 */
202+#define USE_POSIX_SPAWN 1
203+#ifndef _ALL_SOURCE
204+# define _ALL_SOURCE 1
205+#endif
206+#ifndef _DARWIN_C_SOURCE
207+# define _DARWIN_C_SOURCE 1
208+#endif
209+#ifndef _GNU_SOURCE
210+# define _GNU_SOURCE 1
211+#endif
212+#ifndef _NETBSD_SOURCE
213+# define _NETBSD_SOURCE 1
214+#endif
215+#ifndef _OPENBSD_SOURCE
216+# define _OPENBSD_SOURCE 1
217+#endif
218+#ifndef _POSIX_PTHREAD_SEMANTICS
219+# define _POSIX_PTHREAD_SEMANTICS 1
220+#endif
221+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
222+# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
223+#endif
224+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
225+# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
226+#endif
227+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
228+# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
229+#endif
230+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
231+# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
232+#endif
233+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
234+# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
235+#endif
236+#ifndef __STDC_WANT_LIB_EXT2__
237+# define __STDC_WANT_LIB_EXT2__ 1
238+#endif
239+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
240+# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
241+#endif
242+#ifndef _TANDEM_SOURCE
243+# define _TANDEM_SOURCE 1
244+#endif
245+#ifndef _XOPEN_SOURCE
246+/* # undef _XOPEN_SOURCE */
247+#endif
248+#ifndef _HPUX_ALT_XOPEN_SOCKET_API
249+# define _HPUX_ALT_XOPEN_SOCKET_API 1
250+#endif
251+#ifndef __EXTENSIONS__
252+# define __EXTENSIONS__ 1
253+#endif
254+#define VERSION "4.3"
255+/* #undef WCHAR_T_SUFFIX */
256+/* #undef WINDOWS32 */
257+/* #undef WINT_T_SUFFIX */
258+/* #undef WITH_DMALLOC */
259+#if defined AC_APPLE_UNIVERSAL_BUILD
260+# if defined __BIG_ENDIAN__
261+#  define WORDS_BIGENDIAN 1
262+# endif
263+#else
264+# ifndef WORDS_BIGENDIAN
265+/* #  undef WORDS_BIGENDIAN */
266+# endif
267+#endif
268+#ifndef _DARWIN_USE_64_BIT_INODE
269+# define _DARWIN_USE_64_BIT_INODE 1
270+#endif
271+/* #undef _FILE_OFFSET_BITS */
272+/* #undef _LARGE_FILES */
273+/* #undef _MINIX */
274+#define _NETBSD_SOURCE 1
275+#ifndef _Noreturn
276+# if (defined __cplusplus \
277+      && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
278+          || (defined _MSC_VER && 1900 <= _MSC_VER)) \
279+      && 0)
280+#  define _Noreturn [[noreturn]]
281+# elif ((!defined __cplusplus || defined __clang__) \
282+        && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0)  \
283+            || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)))
284+# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
285+#  define _Noreturn __attribute__ ((__noreturn__))
286+# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
287+#  define _Noreturn __declspec (noreturn)
288+# else
289+#  define _Noreturn
290+# endif
291+#endif
292+/* #undef _POSIX_1_SOURCE */
293+/* #undef _POSIX_SOURCE */
294+#define _USE_STD_STAT 1
295+/* #undef __STDC_CONSTANT_MACROS */
296+/* #undef __STDC_LIMIT_MACROS */
297+#define _GL_ASYNC_SAFE
298+/* #undef const */
299+/* #undef eaccess */
300+#if (((defined __APPLE__ && defined __MACH__) \
301+      || defined __DragonFly__ || defined __FreeBSD__) \
302+     && (defined __header_inline \
303+         ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
304+            && ! defined __clang__) \
305+         : ((! defined _DONT_USE_CTYPE_INLINE_ \
306+             && (defined __GNUC__ || defined __cplusplus)) \
307+            || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
308+                && defined __GNUC__ && ! defined __cplusplus))))
309+# define _GL_EXTERN_INLINE_STDHEADER_BUG
310+#endif
311+#if ((__GNUC__ \
312+      ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
313+      : (199901L <= __STDC_VERSION__ \
314+         && !defined __HP_cc \
315+         && !defined __PGI \
316+         && !(defined __SUNPRO_C && __STDC__))) \
317+     && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
318+# define _GL_INLINE inline
319+# define _GL_EXTERN_INLINE extern inline
320+# define _GL_EXTERN_INLINE_IN_USE
321+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
322+       && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
323+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
324+#  define _GL_INLINE extern inline __attribute__ ((__gnu_inline__))
325+# else
326+#  define _GL_INLINE extern inline
327+# endif
328+# define _GL_EXTERN_INLINE extern
329+# define _GL_EXTERN_INLINE_IN_USE
330+#else
331+# define _GL_INLINE static _GL_UNUSED
332+# define _GL_EXTERN_INLINE static _GL_UNUSED
333+#endif
334+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
335+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
336+#  define _GL_INLINE_HEADER_CONST_PRAGMA
337+# else
338+#  define _GL_INLINE_HEADER_CONST_PRAGMA \
339+     _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
340+# endif
341+# define _GL_INLINE_HEADER_BEGIN \
342+    _Pragma ("GCC diagnostic push") \
343+    _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
344+    _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
345+    _GL_INLINE_HEADER_CONST_PRAGMA
346+# define _GL_INLINE_HEADER_END \
347+    _Pragma ("GCC diagnostic pop")
348+#else
349+# define _GL_INLINE_HEADER_BEGIN
350+# define _GL_INLINE_HEADER_END
351+#endif
352+/* #undef gid_t */
353+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
354+# define __GNUC_STDC_INLINE__ 1
355+#endif
356+/* #undef mode_t */
357+/* #undef off_t */
358+/* #undef pid_t */
359+#define restrict __restrict
360+#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
361+# define _Restrict
362+# define __restrict__
363+#endif
364+/* #undef size_t */
365+/* #undef ssize_t */
366+/* #undef uid_t */
367+/* #undef uintmax_t */
368+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
369+# define _GL_UNUSED __attribute__ ((__unused__))
370+#else
371+# define _GL_UNUSED
372+#endif
373+#define _UNUSED_PARAMETER_ _GL_UNUSED
374+#if !defined __cplusplus || __GNUC__ > 4 \
375+    || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
376+# define _GL_UNUSED_LABEL _GL_UNUSED
377+#else
378+# define _GL_UNUSED_LABEL
379+#endif
380+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
381+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
382+#else
383+# define _GL_ATTRIBUTE_PURE /* empty */
384+#endif
385+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
386+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
387+#else
388+# define _GL_ATTRIBUTE_CONST /* empty */
389+#endif
390+#if 3 <= __GNUC__
391+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
392+#else
393+# define _GL_ATTRIBUTE_MALLOC /* empty */
394+#endif
395+/* #undef vfork */
+45, -0
 1@@ -0,0 +1,45 @@
 2+cflags{
 3+	'-std=c99', '-Wno-return-local-addr',
 4+	'-D HAVE_CONFIG_H',
 5+	'-I $dir',
 6+	'-I $srcdir/src',
 7+	'-I $srcdir/lib',
 8+	'-I $outdir',
 9+}
10+
11+build('copy', '$outdir/fnmatch.h', '$srcdir/lib/fnmatch.in.h')
12+build('copy', '$outdir/glob.h', '$srcdir/lib/glob.in.h')
13+
14+pkg.deps = {
15+	'$outdir/fnmatch.h',
16+	'$outdir/glob.h',
17+}
18+
19+lib('libgnu.a', [[
20+	lib/(
21+		concat-filename.c exitfail.c findprog-in.c fnmatch.c
22+		glob.c xalloc-die.c xconcat-filename.c
23+	)
24+]])
25+
26+exe('make', [[
27+	src/(
28+		ar.c arscan.c commands.c
29+		default.c dir.c expand.c
30+		file.c function.c getopt.c
31+		getopt1.c guile.c
32+		hash.c implicit.c job.c
33+		load.c loadapi.c main.c misc.c
34+		output.c read.c remake.c
35+		rule.c signame.c strcache.c
36+		variable.c version.c vpath.c
37+
38+		posixos.c
39+		remote-stub.c
40+	)
41+	libgnu.a
42+]])
43+file('bin/make', '755', '$outdir/make')
44+man{'doc/make.1'}
45+
46+fetch 'curl'
+1, -0
1@@ -0,0 +1 @@
2+e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19  make-4.3.tar.gz
+1, -0
1@@ -0,0 +1 @@
2+url = "http://ftp.gnu.org/gnu/make/make-4.3.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+4.3 r0
+2, -0
1@@ -0,0 +1,2 @@
2+/man-pages-posix-2017-a.tar.gz
3+/src
+2, -0
1@@ -0,0 +1,2 @@
2+man(lines('manpages.txt'))
3+fetch 'curl'
+1140, -0
   1@@ -0,0 +1,1140 @@
   2+# 2,<cd src && find man?p -type f | LC_COLLATE=C sort
   3+man0p/aio.h.0p
   4+man0p/arpa_inet.h.0p
   5+man0p/assert.h.0p
   6+man0p/complex.h.0p
   7+man0p/cpio.h.0p
   8+man0p/ctype.h.0p
   9+man0p/dirent.h.0p
  10+man0p/dlfcn.h.0p
  11+man0p/errno.h.0p
  12+man0p/fcntl.h.0p
  13+man0p/fenv.h.0p
  14+man0p/float.h.0p
  15+man0p/fmtmsg.h.0p
  16+man0p/fnmatch.h.0p
  17+man0p/ftw.h.0p
  18+man0p/glob.h.0p
  19+man0p/grp.h.0p
  20+man0p/iconv.h.0p
  21+man0p/inttypes.h.0p
  22+man0p/iso646.h.0p
  23+man0p/langinfo.h.0p
  24+man0p/libgen.h.0p
  25+man0p/limits.h.0p
  26+man0p/locale.h.0p
  27+man0p/math.h.0p
  28+man0p/monetary.h.0p
  29+man0p/mqueue.h.0p
  30+man0p/ndbm.h.0p
  31+man0p/net_if.h.0p
  32+man0p/netdb.h.0p
  33+man0p/netinet_in.h.0p
  34+man0p/netinet_tcp.h.0p
  35+man0p/nl_types.h.0p
  36+man0p/poll.h.0p
  37+man0p/pthread.h.0p
  38+man0p/pwd.h.0p
  39+man0p/regex.h.0p
  40+man0p/sched.h.0p
  41+man0p/search.h.0p
  42+man0p/semaphore.h.0p
  43+man0p/setjmp.h.0p
  44+man0p/signal.h.0p
  45+man0p/spawn.h.0p
  46+man0p/stdarg.h.0p
  47+man0p/stdbool.h.0p
  48+man0p/stddef.h.0p
  49+man0p/stdint.h.0p
  50+man0p/stdio.h.0p
  51+man0p/stdlib.h.0p
  52+man0p/string.h.0p
  53+man0p/strings.h.0p
  54+man0p/stropts.h.0p
  55+man0p/sys_ipc.h.0p
  56+man0p/sys_mman.h.0p
  57+man0p/sys_msg.h.0p
  58+man0p/sys_resource.h.0p
  59+man0p/sys_select.h.0p
  60+man0p/sys_sem.h.0p
  61+man0p/sys_shm.h.0p
  62+man0p/sys_socket.h.0p
  63+man0p/sys_stat.h.0p
  64+man0p/sys_statvfs.h.0p
  65+man0p/sys_time.h.0p
  66+man0p/sys_times.h.0p
  67+man0p/sys_types.h.0p
  68+man0p/sys_uio.h.0p
  69+man0p/sys_un.h.0p
  70+man0p/sys_utsname.h.0p
  71+man0p/sys_wait.h.0p
  72+man0p/syslog.h.0p
  73+man0p/tar.h.0p
  74+man0p/termios.h.0p
  75+man0p/tgmath.h.0p
  76+man0p/time.h.0p
  77+man0p/trace.h.0p
  78+man0p/ulimit.h.0p
  79+man0p/unistd.h.0p
  80+man0p/utime.h.0p
  81+man0p/utmpx.h.0p
  82+man0p/wchar.h.0p
  83+man0p/wctype.h.0p
  84+man0p/wordexp.h.0p
  85+man1p/admin.1p
  86+man1p/alias.1p
  87+man1p/ar.1p
  88+man1p/asa.1p
  89+man1p/at.1p
  90+man1p/awk.1p
  91+man1p/basename.1p
  92+man1p/batch.1p
  93+man1p/bc.1p
  94+man1p/bg.1p
  95+man1p/break.1p
  96+man1p/c99.1p
  97+man1p/cal.1p
  98+man1p/cat.1p
  99+man1p/cd.1p
 100+man1p/cflow.1p
 101+man1p/chgrp.1p
 102+man1p/chmod.1p
 103+man1p/chown.1p
 104+man1p/cksum.1p
 105+man1p/cmp.1p
 106+man1p/colon.1p
 107+man1p/comm.1p
 108+man1p/command.1p
 109+man1p/compress.1p
 110+man1p/continue.1p
 111+man1p/cp.1p
 112+man1p/crontab.1p
 113+man1p/csplit.1p
 114+man1p/ctags.1p
 115+man1p/cut.1p
 116+man1p/cxref.1p
 117+man1p/date.1p
 118+man1p/dd.1p
 119+man1p/delta.1p
 120+man1p/df.1p
 121+man1p/diff.1p
 122+man1p/dirname.1p
 123+man1p/dot.1p
 124+man1p/du.1p
 125+man1p/echo.1p
 126+man1p/ed.1p
 127+man1p/env.1p
 128+man1p/eval.1p
 129+man1p/ex.1p
 130+man1p/exec.1p
 131+man1p/exit.1p
 132+man1p/expand.1p
 133+man1p/export.1p
 134+man1p/expr.1p
 135+man1p/false.1p
 136+man1p/fc.1p
 137+man1p/fg.1p
 138+man1p/file.1p
 139+man1p/find.1p
 140+man1p/fold.1p
 141+man1p/fort77.1p
 142+man1p/fuser.1p
 143+man1p/gencat.1p
 144+man1p/get.1p
 145+man1p/getconf.1p
 146+man1p/getopts.1p
 147+man1p/grep.1p
 148+man1p/hash.1p
 149+man1p/head.1p
 150+man1p/iconv.1p
 151+man1p/id.1p
 152+man1p/ipcrm.1p
 153+man1p/ipcs.1p
 154+man1p/jobs.1p
 155+man1p/join.1p
 156+man1p/kill.1p
 157+man1p/lex.1p
 158+man1p/link.1p
 159+man1p/ln.1p
 160+man1p/locale.1p
 161+man1p/localedef.1p
 162+man1p/logger.1p
 163+man1p/logname.1p
 164+man1p/lp.1p
 165+man1p/ls.1p
 166+man1p/m4.1p
 167+man1p/mailx.1p
 168+man1p/make.1p
 169+man1p/man.1p
 170+man1p/mesg.1p
 171+man1p/mkdir.1p
 172+man1p/mkfifo.1p
 173+man1p/more.1p
 174+man1p/mv.1p
 175+man1p/newgrp.1p
 176+man1p/nice.1p
 177+man1p/nl.1p
 178+man1p/nm.1p
 179+man1p/nohup.1p
 180+man1p/od.1p
 181+man1p/paste.1p
 182+man1p/patch.1p
 183+man1p/pathchk.1p
 184+man1p/pax.1p
 185+man1p/pr.1p
 186+man1p/printf.1p
 187+man1p/prs.1p
 188+man1p/ps.1p
 189+man1p/pwd.1p
 190+man1p/qalter.1p
 191+man1p/qdel.1p
 192+man1p/qhold.1p
 193+man1p/qmove.1p
 194+man1p/qmsg.1p
 195+man1p/qrerun.1p
 196+man1p/qrls.1p
 197+man1p/qselect.1p
 198+man1p/qsig.1p
 199+man1p/qstat.1p
 200+man1p/qsub.1p
 201+man1p/read.1p
 202+man1p/readonly.1p
 203+man1p/renice.1p
 204+man1p/return.1p
 205+man1p/rm.1p
 206+man1p/rmdel.1p
 207+man1p/rmdir.1p
 208+man1p/sact.1p
 209+man1p/sccs.1p
 210+man1p/sed.1p
 211+man1p/set.1p
 212+man1p/sh.1p
 213+man1p/shift.1p
 214+man1p/sleep.1p
 215+man1p/sort.1p
 216+man1p/split.1p
 217+man1p/strings.1p
 218+man1p/strip.1p
 219+man1p/stty.1p
 220+man1p/tabs.1p
 221+man1p/tail.1p
 222+man1p/talk.1p
 223+man1p/tee.1p
 224+man1p/test.1p
 225+man1p/time.1p
 226+man1p/times.1p
 227+man1p/touch.1p
 228+man1p/tput.1p
 229+man1p/tr.1p
 230+man1p/trap.1p
 231+man1p/true.1p
 232+man1p/tsort.1p
 233+man1p/tty.1p
 234+man1p/type.1p
 235+man1p/ulimit.1p
 236+man1p/umask.1p
 237+man1p/unalias.1p
 238+man1p/uname.1p
 239+man1p/uncompress.1p
 240+man1p/unexpand.1p
 241+man1p/unget.1p
 242+man1p/uniq.1p
 243+man1p/unlink.1p
 244+man1p/unset.1p
 245+man1p/uucp.1p
 246+man1p/uudecode.1p
 247+man1p/uuencode.1p
 248+man1p/uustat.1p
 249+man1p/uux.1p
 250+man1p/val.1p
 251+man1p/vi.1p
 252+man1p/wait.1p
 253+man1p/wc.1p
 254+man1p/what.1p
 255+man1p/who.1p
 256+man1p/write.1p
 257+man1p/xargs.1p
 258+man1p/yacc.1p
 259+man1p/zcat.1p
 260+man3p/FD_CLR.3p
 261+man3p/_Exit.3p
 262+man3p/_longjmp.3p
 263+man3p/_tolower.3p
 264+man3p/_toupper.3p
 265+man3p/a64l.3p
 266+man3p/abort.3p
 267+man3p/abs.3p
 268+man3p/accept.3p
 269+man3p/access.3p
 270+man3p/acos.3p
 271+man3p/acosh.3p
 272+man3p/acosl.3p
 273+man3p/aio_cancel.3p
 274+man3p/aio_error.3p
 275+man3p/aio_fsync.3p
 276+man3p/aio_read.3p
 277+man3p/aio_return.3p
 278+man3p/aio_suspend.3p
 279+man3p/aio_write.3p
 280+man3p/alarm.3p
 281+man3p/alphasort.3p
 282+man3p/asctime.3p
 283+man3p/asin.3p
 284+man3p/asinh.3p
 285+man3p/asinl.3p
 286+man3p/assert.3p
 287+man3p/atan.3p
 288+man3p/atan2.3p
 289+man3p/atanf.3p
 290+man3p/atanh.3p
 291+man3p/atanl.3p
 292+man3p/atexit.3p
 293+man3p/atof.3p
 294+man3p/atoi.3p
 295+man3p/atol.3p
 296+man3p/basename.3p
 297+man3p/bind.3p
 298+man3p/bsearch.3p
 299+man3p/btowc.3p
 300+man3p/cabs.3p
 301+man3p/cacos.3p
 302+man3p/cacosh.3p
 303+man3p/cacosl.3p
 304+man3p/calloc.3p
 305+man3p/carg.3p
 306+man3p/casin.3p
 307+man3p/casinh.3p
 308+man3p/casinl.3p
 309+man3p/catan.3p
 310+man3p/catanh.3p
 311+man3p/catanl.3p
 312+man3p/catclose.3p
 313+man3p/catgets.3p
 314+man3p/catopen.3p
 315+man3p/cbrt.3p
 316+man3p/ccos.3p
 317+man3p/ccosh.3p
 318+man3p/ccosl.3p
 319+man3p/ceil.3p
 320+man3p/cexp.3p
 321+man3p/cfgetispeed.3p
 322+man3p/cfgetospeed.3p
 323+man3p/cfsetispeed.3p
 324+man3p/cfsetospeed.3p
 325+man3p/chdir.3p
 326+man3p/chmod.3p
 327+man3p/chown.3p
 328+man3p/cimag.3p
 329+man3p/clearerr.3p
 330+man3p/clock.3p
 331+man3p/clock_getcpuclockid.3p
 332+man3p/clock_getres.3p
 333+man3p/clock_nanosleep.3p
 334+man3p/clock_settime.3p
 335+man3p/clog.3p
 336+man3p/close.3p
 337+man3p/closedir.3p
 338+man3p/closelog.3p
 339+man3p/confstr.3p
 340+man3p/conj.3p
 341+man3p/connect.3p
 342+man3p/copysign.3p
 343+man3p/cos.3p
 344+man3p/cosh.3p
 345+man3p/cosl.3p
 346+man3p/cpow.3p
 347+man3p/cproj.3p
 348+man3p/creal.3p
 349+man3p/creat.3p
 350+man3p/crypt.3p
 351+man3p/csin.3p
 352+man3p/csinh.3p
 353+man3p/csinl.3p
 354+man3p/csqrt.3p
 355+man3p/ctan.3p
 356+man3p/ctanh.3p
 357+man3p/ctanl.3p
 358+man3p/ctermid.3p
 359+man3p/ctime.3p
 360+man3p/daylight.3p
 361+man3p/dbm_clearerr.3p
 362+man3p/difftime.3p
 363+man3p/dirfd.3p
 364+man3p/dirname.3p
 365+man3p/div.3p
 366+man3p/dlclose.3p
 367+man3p/dlerror.3p
 368+man3p/dlopen.3p
 369+man3p/dlsym.3p
 370+man3p/dprintf.3p
 371+man3p/drand48.3p
 372+man3p/dup.3p
 373+man3p/duplocale.3p
 374+man3p/encrypt.3p
 375+man3p/endgrent.3p
 376+man3p/endhostent.3p
 377+man3p/endnetent.3p
 378+man3p/endprotoent.3p
 379+man3p/endpwent.3p
 380+man3p/endservent.3p
 381+man3p/endutxent.3p
 382+man3p/environ.3p
 383+man3p/erand48.3p
 384+man3p/erf.3p
 385+man3p/erfc.3p
 386+man3p/erff.3p
 387+man3p/errno.3p
 388+man3p/exec.3p
 389+man3p/exit.3p
 390+man3p/exp.3p
 391+man3p/exp2.3p
 392+man3p/expm1.3p
 393+man3p/fabs.3p
 394+man3p/faccessat.3p
 395+man3p/fattach.3p
 396+man3p/fchdir.3p
 397+man3p/fchmod.3p
 398+man3p/fchmodat.3p
 399+man3p/fchown.3p
 400+man3p/fchownat.3p
 401+man3p/fclose.3p
 402+man3p/fcntl.3p
 403+man3p/fdatasync.3p
 404+man3p/fdetach.3p
 405+man3p/fdim.3p
 406+man3p/fdopen.3p
 407+man3p/fdopendir.3p
 408+man3p/feclearexcept.3p
 409+man3p/fegetenv.3p
 410+man3p/fegetexceptflag.3p
 411+man3p/fegetround.3p
 412+man3p/feholdexcept.3p
 413+man3p/feof.3p
 414+man3p/feraiseexcept.3p
 415+man3p/ferror.3p
 416+man3p/fesetenv.3p
 417+man3p/fesetexceptflag.3p
 418+man3p/fesetround.3p
 419+man3p/fetestexcept.3p
 420+man3p/feupdateenv.3p
 421+man3p/fexecve.3p
 422+man3p/fflush.3p
 423+man3p/ffs.3p
 424+man3p/fgetc.3p
 425+man3p/fgetpos.3p
 426+man3p/fgets.3p
 427+man3p/fgetwc.3p
 428+man3p/fgetws.3p
 429+man3p/fileno.3p
 430+man3p/flockfile.3p
 431+man3p/floor.3p
 432+man3p/fma.3p
 433+man3p/fmax.3p
 434+man3p/fmemopen.3p
 435+man3p/fmin.3p
 436+man3p/fmod.3p
 437+man3p/fmtmsg.3p
 438+man3p/fnmatch.3p
 439+man3p/fopen.3p
 440+man3p/fork.3p
 441+man3p/fpathconf.3p
 442+man3p/fpclassify.3p
 443+man3p/fprintf.3p
 444+man3p/fputc.3p
 445+man3p/fputs.3p
 446+man3p/fputwc.3p
 447+man3p/fputws.3p
 448+man3p/fread.3p
 449+man3p/free.3p
 450+man3p/freeaddrinfo.3p
 451+man3p/freelocale.3p
 452+man3p/freopen.3p
 453+man3p/frexp.3p
 454+man3p/fscanf.3p
 455+man3p/fseek.3p
 456+man3p/fsetpos.3p
 457+man3p/fstat.3p
 458+man3p/fstatat.3p
 459+man3p/fstatvfs.3p
 460+man3p/fsync.3p
 461+man3p/ftell.3p
 462+man3p/ftok.3p
 463+man3p/ftruncate.3p
 464+man3p/ftrylockfile.3p
 465+man3p/ftw.3p
 466+man3p/funlockfile.3p
 467+man3p/futimens.3p
 468+man3p/fwide.3p
 469+man3p/fwprintf.3p
 470+man3p/fwrite.3p
 471+man3p/fwscanf.3p
 472+man3p/gai_strerror.3p
 473+man3p/getaddrinfo.3p
 474+man3p/getc.3p
 475+man3p/getc_unlocked.3p
 476+man3p/getchar.3p
 477+man3p/getchar_unlocked.3p
 478+man3p/getcwd.3p
 479+man3p/getdate.3p
 480+man3p/getdelim.3p
 481+man3p/getegid.3p
 482+man3p/getenv.3p
 483+man3p/geteuid.3p
 484+man3p/getgid.3p
 485+man3p/getgrent.3p
 486+man3p/getgrgid.3p
 487+man3p/getgrnam.3p
 488+man3p/getgroups.3p
 489+man3p/gethostent.3p
 490+man3p/gethostid.3p
 491+man3p/gethostname.3p
 492+man3p/getitimer.3p
 493+man3p/getline.3p
 494+man3p/getlogin.3p
 495+man3p/getmsg.3p
 496+man3p/getnameinfo.3p
 497+man3p/getnetbyaddr.3p
 498+man3p/getopt.3p
 499+man3p/getpeername.3p
 500+man3p/getpgid.3p
 501+man3p/getpgrp.3p
 502+man3p/getpid.3p
 503+man3p/getpmsg.3p
 504+man3p/getppid.3p
 505+man3p/getpriority.3p
 506+man3p/getprotobyname.3p
 507+man3p/getpwent.3p
 508+man3p/getpwnam.3p
 509+man3p/getpwuid.3p
 510+man3p/getrlimit.3p
 511+man3p/getrusage.3p
 512+man3p/gets.3p
 513+man3p/getservbyname.3p
 514+man3p/getsid.3p
 515+man3p/getsockname.3p
 516+man3p/getsockopt.3p
 517+man3p/getsubopt.3p
 518+man3p/gettimeofday.3p
 519+man3p/getuid.3p
 520+man3p/getutxent.3p
 521+man3p/getwc.3p
 522+man3p/getwchar.3p
 523+man3p/glob.3p
 524+man3p/gmtime.3p
 525+man3p/grantpt.3p
 526+man3p/hcreate.3p
 527+man3p/htonl.3p
 528+man3p/hypot.3p
 529+man3p/iconv.3p
 530+man3p/iconv_close.3p
 531+man3p/iconv_open.3p
 532+man3p/if_freenameindex.3p
 533+man3p/if_indextoname.3p
 534+man3p/if_nameindex.3p
 535+man3p/if_nametoindex.3p
 536+man3p/ilogb.3p
 537+man3p/imaxabs.3p
 538+man3p/imaxdiv.3p
 539+man3p/inet_addr.3p
 540+man3p/inet_ntop.3p
 541+man3p/initstate.3p
 542+man3p/insque.3p
 543+man3p/ioctl.3p
 544+man3p/isalnum.3p
 545+man3p/isalpha.3p
 546+man3p/isascii.3p
 547+man3p/isastream.3p
 548+man3p/isatty.3p
 549+man3p/isblank.3p
 550+man3p/iscntrl.3p
 551+man3p/isdigit.3p
 552+man3p/isfinite.3p
 553+man3p/isgraph.3p
 554+man3p/isgreater.3p
 555+man3p/isgreaterequal.3p
 556+man3p/isinf.3p
 557+man3p/isless.3p
 558+man3p/islessequal.3p
 559+man3p/islessgreater.3p
 560+man3p/islower.3p
 561+man3p/isnan.3p
 562+man3p/isnormal.3p
 563+man3p/isprint.3p
 564+man3p/ispunct.3p
 565+man3p/isspace.3p
 566+man3p/isunordered.3p
 567+man3p/isupper.3p
 568+man3p/iswalnum.3p
 569+man3p/iswalpha.3p
 570+man3p/iswblank.3p
 571+man3p/iswcntrl.3p
 572+man3p/iswctype.3p
 573+man3p/iswdigit.3p
 574+man3p/iswgraph.3p
 575+man3p/iswlower.3p
 576+man3p/iswprint.3p
 577+man3p/iswpunct.3p
 578+man3p/iswspace.3p
 579+man3p/iswupper.3p
 580+man3p/iswxdigit.3p
 581+man3p/isxdigit.3p
 582+man3p/j0.3p
 583+man3p/jrand48.3p
 584+man3p/kill.3p
 585+man3p/killpg.3p
 586+man3p/l64a.3p
 587+man3p/labs.3p
 588+man3p/lchown.3p
 589+man3p/lcong48.3p
 590+man3p/ldexp.3p
 591+man3p/ldiv.3p
 592+man3p/lfind.3p
 593+man3p/lgamma.3p
 594+man3p/link.3p
 595+man3p/lio_listio.3p
 596+man3p/listen.3p
 597+man3p/llabs.3p
 598+man3p/lldiv.3p
 599+man3p/llrint.3p
 600+man3p/llround.3p
 601+man3p/localeconv.3p
 602+man3p/localtime.3p
 603+man3p/lockf.3p
 604+man3p/log.3p
 605+man3p/log10.3p
 606+man3p/log1p.3p
 607+man3p/log2.3p
 608+man3p/logb.3p
 609+man3p/logf.3p
 610+man3p/longjmp.3p
 611+man3p/lrand48.3p
 612+man3p/lrint.3p
 613+man3p/lround.3p
 614+man3p/lsearch.3p
 615+man3p/lseek.3p
 616+man3p/lstat.3p
 617+man3p/malloc.3p
 618+man3p/mblen.3p
 619+man3p/mbrlen.3p
 620+man3p/mbrtowc.3p
 621+man3p/mbsinit.3p
 622+man3p/mbsrtowcs.3p
 623+man3p/mbstowcs.3p
 624+man3p/mbtowc.3p
 625+man3p/memccpy.3p
 626+man3p/memchr.3p
 627+man3p/memcmp.3p
 628+man3p/memcpy.3p
 629+man3p/memmove.3p
 630+man3p/memset.3p
 631+man3p/mkdir.3p
 632+man3p/mkdtemp.3p
 633+man3p/mkfifo.3p
 634+man3p/mknod.3p
 635+man3p/mkstemp.3p
 636+man3p/mktime.3p
 637+man3p/mlock.3p
 638+man3p/mlockall.3p
 639+man3p/mmap.3p
 640+man3p/modf.3p
 641+man3p/mprotect.3p
 642+man3p/mq_close.3p
 643+man3p/mq_getattr.3p
 644+man3p/mq_notify.3p
 645+man3p/mq_open.3p
 646+man3p/mq_receive.3p
 647+man3p/mq_send.3p
 648+man3p/mq_setattr.3p
 649+man3p/mq_timedreceive.3p
 650+man3p/mq_timedsend.3p
 651+man3p/mq_unlink.3p
 652+man3p/mrand48.3p
 653+man3p/msgctl.3p
 654+man3p/msgget.3p
 655+man3p/msgrcv.3p
 656+man3p/msgsnd.3p
 657+man3p/msync.3p
 658+man3p/munlock.3p
 659+man3p/munlockall.3p
 660+man3p/munmap.3p
 661+man3p/nan.3p
 662+man3p/nanosleep.3p
 663+man3p/nearbyint.3p
 664+man3p/newlocale.3p
 665+man3p/nextafter.3p
 666+man3p/nftw.3p
 667+man3p/nice.3p
 668+man3p/nl_langinfo.3p
 669+man3p/nrand48.3p
 670+man3p/ntohl.3p
 671+man3p/open.3p
 672+man3p/open_memstream.3p
 673+man3p/openat.3p
 674+man3p/opendir.3p
 675+man3p/openlog.3p
 676+man3p/optarg.3p
 677+man3p/pathconf.3p
 678+man3p/pause.3p
 679+man3p/pclose.3p
 680+man3p/perror.3p
 681+man3p/pipe.3p
 682+man3p/poll.3p
 683+man3p/popen.3p
 684+man3p/posix_fadvise.3p
 685+man3p/posix_fallocate.3p
 686+man3p/posix_madvise.3p
 687+man3p/posix_mem_offset.3p
 688+man3p/posix_memalign.3p
 689+man3p/posix_openpt.3p
 690+man3p/posix_spawn.3p
 691+man3p/posix_spawn_file_actions_addclose.3p
 692+man3p/posix_spawn_file_actions_adddup2.3p
 693+man3p/posix_spawn_file_actions_addopen.3p
 694+man3p/posix_spawn_file_actions_destroy.3p
 695+man3p/posix_spawnattr_destroy.3p
 696+man3p/posix_spawnattr_getflags.3p
 697+man3p/posix_spawnattr_getpgroup.3p
 698+man3p/posix_spawnattr_getschedparam.3p
 699+man3p/posix_spawnattr_getschedpolicy.3p
 700+man3p/posix_spawnattr_getsigdefault.3p
 701+man3p/posix_spawnattr_getsigmask.3p
 702+man3p/posix_spawnattr_init.3p
 703+man3p/posix_spawnattr_setflags.3p
 704+man3p/posix_spawnattr_setpgroup.3p
 705+man3p/posix_spawnattr_setschedparam.3p
 706+man3p/posix_spawnattr_setschedpolicy.3p
 707+man3p/posix_spawnattr_setsigdefault.3p
 708+man3p/posix_spawnattr_setsigmask.3p
 709+man3p/posix_spawnp.3p
 710+man3p/posix_trace_attr_destroy.3p
 711+man3p/posix_trace_attr_getclockres.3p
 712+man3p/posix_trace_attr_getinherited.3p
 713+man3p/posix_trace_attr_getlogsize.3p
 714+man3p/posix_trace_attr_getname.3p
 715+man3p/posix_trace_attr_getstreamfullpolicy.3p
 716+man3p/posix_trace_attr_getstreamsize.3p
 717+man3p/posix_trace_attr_init.3p
 718+man3p/posix_trace_attr_setinherited.3p
 719+man3p/posix_trace_attr_setlogsize.3p
 720+man3p/posix_trace_attr_setname.3p
 721+man3p/posix_trace_attr_setstreamfullpolicy.3p
 722+man3p/posix_trace_attr_setstreamsize.3p
 723+man3p/posix_trace_clear.3p
 724+man3p/posix_trace_close.3p
 725+man3p/posix_trace_create.3p
 726+man3p/posix_trace_event.3p
 727+man3p/posix_trace_eventid_equal.3p
 728+man3p/posix_trace_eventid_open.3p
 729+man3p/posix_trace_eventset_add.3p
 730+man3p/posix_trace_eventtypelist_getnext_id.3p
 731+man3p/posix_trace_flush.3p
 732+man3p/posix_trace_get_attr.3p
 733+man3p/posix_trace_get_filter.3p
 734+man3p/posix_trace_get_status.3p
 735+man3p/posix_trace_getnext_event.3p
 736+man3p/posix_trace_open.3p
 737+man3p/posix_trace_set_filter.3p
 738+man3p/posix_trace_shutdown.3p
 739+man3p/posix_trace_start.3p
 740+man3p/posix_trace_timedgetnext_event.3p
 741+man3p/posix_trace_trid_eventid_open.3p
 742+man3p/posix_trace_trygetnext_event.3p
 743+man3p/posix_typed_mem_get_info.3p
 744+man3p/posix_typed_mem_open.3p
 745+man3p/pow.3p
 746+man3p/pread.3p
 747+man3p/printf.3p
 748+man3p/pselect.3p
 749+man3p/psiginfo.3p
 750+man3p/pthread_atfork.3p
 751+man3p/pthread_attr_destroy.3p
 752+man3p/pthread_attr_getdetachstate.3p
 753+man3p/pthread_attr_getguardsize.3p
 754+man3p/pthread_attr_getinheritsched.3p
 755+man3p/pthread_attr_getschedparam.3p
 756+man3p/pthread_attr_getschedpolicy.3p
 757+man3p/pthread_attr_getscope.3p
 758+man3p/pthread_attr_getstack.3p
 759+man3p/pthread_attr_getstacksize.3p
 760+man3p/pthread_attr_init.3p
 761+man3p/pthread_attr_setdetachstate.3p
 762+man3p/pthread_attr_setguardsize.3p
 763+man3p/pthread_attr_setinheritsched.3p
 764+man3p/pthread_attr_setschedparam.3p
 765+man3p/pthread_attr_setschedpolicy.3p
 766+man3p/pthread_attr_setscope.3p
 767+man3p/pthread_attr_setstack.3p
 768+man3p/pthread_attr_setstacksize.3p
 769+man3p/pthread_barrier_destroy.3p
 770+man3p/pthread_barrier_wait.3p
 771+man3p/pthread_barrierattr_destroy.3p
 772+man3p/pthread_barrierattr_getpshared.3p
 773+man3p/pthread_barrierattr_init.3p
 774+man3p/pthread_barrierattr_setpshared.3p
 775+man3p/pthread_cancel.3p
 776+man3p/pthread_cleanup_pop.3p
 777+man3p/pthread_cond_broadcast.3p
 778+man3p/pthread_cond_destroy.3p
 779+man3p/pthread_cond_signal.3p
 780+man3p/pthread_cond_timedwait.3p
 781+man3p/pthread_condattr_destroy.3p
 782+man3p/pthread_condattr_getclock.3p
 783+man3p/pthread_condattr_getpshared.3p
 784+man3p/pthread_condattr_init.3p
 785+man3p/pthread_condattr_setclock.3p
 786+man3p/pthread_condattr_setpshared.3p
 787+man3p/pthread_create.3p
 788+man3p/pthread_detach.3p
 789+man3p/pthread_equal.3p
 790+man3p/pthread_exit.3p
 791+man3p/pthread_getconcurrency.3p
 792+man3p/pthread_getcpuclockid.3p
 793+man3p/pthread_getschedparam.3p
 794+man3p/pthread_getspecific.3p
 795+man3p/pthread_join.3p
 796+man3p/pthread_key_create.3p
 797+man3p/pthread_key_delete.3p
 798+man3p/pthread_kill.3p
 799+man3p/pthread_mutex_consistent.3p
 800+man3p/pthread_mutex_destroy.3p
 801+man3p/pthread_mutex_getprioceiling.3p
 802+man3p/pthread_mutex_init.3p
 803+man3p/pthread_mutex_lock.3p
 804+man3p/pthread_mutex_setprioceiling.3p
 805+man3p/pthread_mutex_timedlock.3p
 806+man3p/pthread_mutex_trylock.3p
 807+man3p/pthread_mutexattr_destroy.3p
 808+man3p/pthread_mutexattr_getprioceiling.3p
 809+man3p/pthread_mutexattr_getprotocol.3p
 810+man3p/pthread_mutexattr_getpshared.3p
 811+man3p/pthread_mutexattr_getrobust.3p
 812+man3p/pthread_mutexattr_gettype.3p
 813+man3p/pthread_mutexattr_init.3p
 814+man3p/pthread_mutexattr_setprioceiling.3p
 815+man3p/pthread_mutexattr_setprotocol.3p
 816+man3p/pthread_mutexattr_setpshared.3p
 817+man3p/pthread_mutexattr_setrobust.3p
 818+man3p/pthread_mutexattr_settype.3p
 819+man3p/pthread_once.3p
 820+man3p/pthread_rwlock_destroy.3p
 821+man3p/pthread_rwlock_rdlock.3p
 822+man3p/pthread_rwlock_timedrdlock.3p
 823+man3p/pthread_rwlock_timedwrlock.3p
 824+man3p/pthread_rwlock_tryrdlock.3p
 825+man3p/pthread_rwlock_trywrlock.3p
 826+man3p/pthread_rwlock_unlock.3p
 827+man3p/pthread_rwlock_wrlock.3p
 828+man3p/pthread_rwlockattr_destroy.3p
 829+man3p/pthread_rwlockattr_getpshared.3p
 830+man3p/pthread_rwlockattr_init.3p
 831+man3p/pthread_rwlockattr_setpshared.3p
 832+man3p/pthread_self.3p
 833+man3p/pthread_setcancelstate.3p
 834+man3p/pthread_setconcurrency.3p
 835+man3p/pthread_setschedparam.3p
 836+man3p/pthread_setschedprio.3p
 837+man3p/pthread_setspecific.3p
 838+man3p/pthread_sigmask.3p
 839+man3p/pthread_spin_destroy.3p
 840+man3p/pthread_spin_lock.3p
 841+man3p/pthread_spin_unlock.3p
 842+man3p/pthread_testcancel.3p
 843+man3p/ptsname.3p
 844+man3p/putc.3p
 845+man3p/putc_unlocked.3p
 846+man3p/putchar.3p
 847+man3p/putchar_unlocked.3p
 848+man3p/putenv.3p
 849+man3p/putmsg.3p
 850+man3p/puts.3p
 851+man3p/pututxline.3p
 852+man3p/putwc.3p
 853+man3p/putwchar.3p
 854+man3p/pwrite.3p
 855+man3p/qsort.3p
 856+man3p/raise.3p
 857+man3p/rand.3p
 858+man3p/random.3p
 859+man3p/read.3p
 860+man3p/readdir.3p
 861+man3p/readlink.3p
 862+man3p/readv.3p
 863+man3p/realloc.3p
 864+man3p/realpath.3p
 865+man3p/recv.3p
 866+man3p/recvfrom.3p
 867+man3p/recvmsg.3p
 868+man3p/regcomp.3p
 869+man3p/remainder.3p
 870+man3p/remove.3p
 871+man3p/remque.3p
 872+man3p/remquo.3p
 873+man3p/rename.3p
 874+man3p/rewind.3p
 875+man3p/rewinddir.3p
 876+man3p/rint.3p
 877+man3p/rmdir.3p
 878+man3p/round.3p
 879+man3p/scalbln.3p
 880+man3p/scandir.3p
 881+man3p/scanf.3p
 882+man3p/sched_get_priority_max.3p
 883+man3p/sched_getparam.3p
 884+man3p/sched_getscheduler.3p
 885+man3p/sched_rr_get_interval.3p
 886+man3p/sched_setparam.3p
 887+man3p/sched_setscheduler.3p
 888+man3p/sched_yield.3p
 889+man3p/seed48.3p
 890+man3p/seekdir.3p
 891+man3p/select.3p
 892+man3p/sem_close.3p
 893+man3p/sem_destroy.3p
 894+man3p/sem_getvalue.3p
 895+man3p/sem_init.3p
 896+man3p/sem_open.3p
 897+man3p/sem_post.3p
 898+man3p/sem_timedwait.3p
 899+man3p/sem_trywait.3p
 900+man3p/sem_unlink.3p
 901+man3p/sem_wait.3p
 902+man3p/semctl.3p
 903+man3p/semget.3p
 904+man3p/semop.3p
 905+man3p/send.3p
 906+man3p/sendmsg.3p
 907+man3p/sendto.3p
 908+man3p/setbuf.3p
 909+man3p/setegid.3p
 910+man3p/setenv.3p
 911+man3p/seteuid.3p
 912+man3p/setgid.3p
 913+man3p/setgrent.3p
 914+man3p/sethostent.3p
 915+man3p/setitimer.3p
 916+man3p/setjmp.3p
 917+man3p/setkey.3p
 918+man3p/setlocale.3p
 919+man3p/setlogmask.3p
 920+man3p/setnetent.3p
 921+man3p/setpgid.3p
 922+man3p/setpgrp.3p
 923+man3p/setpriority.3p
 924+man3p/setprotoent.3p
 925+man3p/setpwent.3p
 926+man3p/setregid.3p
 927+man3p/setreuid.3p
 928+man3p/setrlimit.3p
 929+man3p/setservent.3p
 930+man3p/setsid.3p
 931+man3p/setsockopt.3p
 932+man3p/setstate.3p
 933+man3p/setuid.3p
 934+man3p/setutxent.3p
 935+man3p/setvbuf.3p
 936+man3p/shm_open.3p
 937+man3p/shm_unlink.3p
 938+man3p/shmat.3p
 939+man3p/shmctl.3p
 940+man3p/shmdt.3p
 941+man3p/shmget.3p
 942+man3p/shutdown.3p
 943+man3p/sigaction.3p
 944+man3p/sigaddset.3p
 945+man3p/sigaltstack.3p
 946+man3p/sigdelset.3p
 947+man3p/sigemptyset.3p
 948+man3p/sigfillset.3p
 949+man3p/sighold.3p
 950+man3p/siginterrupt.3p
 951+man3p/sigismember.3p
 952+man3p/siglongjmp.3p
 953+man3p/signal.3p
 954+man3p/signbit.3p
 955+man3p/signgam.3p
 956+man3p/sigpause.3p
 957+man3p/sigpending.3p
 958+man3p/sigprocmask.3p
 959+man3p/sigqueue.3p
 960+man3p/sigrelse.3p
 961+man3p/sigsetjmp.3p
 962+man3p/sigsuspend.3p
 963+man3p/sigtimedwait.3p
 964+man3p/sigwait.3p
 965+man3p/sigwaitinfo.3p
 966+man3p/sin.3p
 967+man3p/sinh.3p
 968+man3p/sinl.3p
 969+man3p/sleep.3p
 970+man3p/snprintf.3p
 971+man3p/sockatmark.3p
 972+man3p/socket.3p
 973+man3p/socketpair.3p
 974+man3p/sprintf.3p
 975+man3p/sqrt.3p
 976+man3p/srand.3p
 977+man3p/srand48.3p
 978+man3p/srandom.3p
 979+man3p/sscanf.3p
 980+man3p/stat.3p
 981+man3p/statvfs.3p
 982+man3p/stdin.3p
 983+man3p/stpcpy.3p
 984+man3p/stpncpy.3p
 985+man3p/strcasecmp.3p
 986+man3p/strcat.3p
 987+man3p/strchr.3p
 988+man3p/strcmp.3p
 989+man3p/strcoll.3p
 990+man3p/strcpy.3p
 991+man3p/strcspn.3p
 992+man3p/strdup.3p
 993+man3p/strerror.3p
 994+man3p/strfmon.3p
 995+man3p/strftime.3p
 996+man3p/strlen.3p
 997+man3p/strncasecmp.3p
 998+man3p/strncat.3p
 999+man3p/strncmp.3p
1000+man3p/strncpy.3p
1001+man3p/strndup.3p
1002+man3p/strnlen.3p
1003+man3p/strpbrk.3p
1004+man3p/strptime.3p
1005+man3p/strrchr.3p
1006+man3p/strsignal.3p
1007+man3p/strspn.3p
1008+man3p/strstr.3p
1009+man3p/strtod.3p
1010+man3p/strtoimax.3p
1011+man3p/strtok.3p
1012+man3p/strtol.3p
1013+man3p/strtold.3p
1014+man3p/strtoll.3p
1015+man3p/strtoul.3p
1016+man3p/strtoumax.3p
1017+man3p/strxfrm.3p
1018+man3p/swab.3p
1019+man3p/swprintf.3p
1020+man3p/swscanf.3p
1021+man3p/symlink.3p
1022+man3p/sync.3p
1023+man3p/sysconf.3p
1024+man3p/syslog.3p
1025+man3p/system.3p
1026+man3p/tan.3p
1027+man3p/tanh.3p
1028+man3p/tanl.3p
1029+man3p/tcdrain.3p
1030+man3p/tcflow.3p
1031+man3p/tcflush.3p
1032+man3p/tcgetattr.3p
1033+man3p/tcgetpgrp.3p
1034+man3p/tcgetsid.3p
1035+man3p/tcsendbreak.3p
1036+man3p/tcsetattr.3p
1037+man3p/tcsetpgrp.3p
1038+man3p/tdelete.3p
1039+man3p/telldir.3p
1040+man3p/tempnam.3p
1041+man3p/tfind.3p
1042+man3p/tgamma.3p
1043+man3p/time.3p
1044+man3p/timer_create.3p
1045+man3p/timer_delete.3p
1046+man3p/timer_getoverrun.3p
1047+man3p/times.3p
1048+man3p/timezone.3p
1049+man3p/tmpfile.3p
1050+man3p/tmpnam.3p
1051+man3p/toascii.3p
1052+man3p/tolower.3p
1053+man3p/toupper.3p
1054+man3p/towctrans.3p
1055+man3p/towlower.3p
1056+man3p/towupper.3p
1057+man3p/trunc.3p
1058+man3p/truncate.3p
1059+man3p/truncf.3p
1060+man3p/tsearch.3p
1061+man3p/ttyname.3p
1062+man3p/twalk.3p
1063+man3p/tzset.3p
1064+man3p/ulimit.3p
1065+man3p/umask.3p
1066+man3p/uname.3p
1067+man3p/ungetc.3p
1068+man3p/ungetwc.3p
1069+man3p/unlink.3p
1070+man3p/unlockpt.3p
1071+man3p/unsetenv.3p
1072+man3p/uselocale.3p
1073+man3p/utime.3p
1074+man3p/utimensat.3p
1075+man3p/va_arg.3p
1076+man3p/vfprintf.3p
1077+man3p/vfscanf.3p
1078+man3p/vfwprintf.3p
1079+man3p/vfwscanf.3p
1080+man3p/vprintf.3p
1081+man3p/vscanf.3p
1082+man3p/vsnprintf.3p
1083+man3p/vsscanf.3p
1084+man3p/vswprintf.3p
1085+man3p/vswscanf.3p
1086+man3p/vwprintf.3p
1087+man3p/vwscanf.3p
1088+man3p/wait.3p
1089+man3p/waitid.3p
1090+man3p/waitpid.3p
1091+man3p/wcpcpy.3p
1092+man3p/wcpncpy.3p
1093+man3p/wcrtomb.3p
1094+man3p/wcscasecmp.3p
1095+man3p/wcscat.3p
1096+man3p/wcschr.3p
1097+man3p/wcscmp.3p
1098+man3p/wcscoll.3p
1099+man3p/wcscpy.3p
1100+man3p/wcscspn.3p
1101+man3p/wcsdup.3p
1102+man3p/wcsftime.3p
1103+man3p/wcslen.3p
1104+man3p/wcsncasecmp.3p
1105+man3p/wcsncat.3p
1106+man3p/wcsncmp.3p
1107+man3p/wcsncpy.3p
1108+man3p/wcsnlen.3p
1109+man3p/wcsnrtombs.3p
1110+man3p/wcspbrk.3p
1111+man3p/wcsrchr.3p
1112+man3p/wcsrtombs.3p
1113+man3p/wcsspn.3p
1114+man3p/wcsstr.3p
1115+man3p/wcstod.3p
1116+man3p/wcstoimax.3p
1117+man3p/wcstok.3p
1118+man3p/wcstol.3p
1119+man3p/wcstold.3p
1120+man3p/wcstoll.3p
1121+man3p/wcstombs.3p
1122+man3p/wcstoul.3p
1123+man3p/wcstoumax.3p
1124+man3p/wcswidth.3p
1125+man3p/wcsxfrm.3p
1126+man3p/wctob.3p
1127+man3p/wctomb.3p
1128+man3p/wctrans.3p
1129+man3p/wctype.3p
1130+man3p/wcwidth.3p
1131+man3p/wmemchr.3p
1132+man3p/wmemcmp.3p
1133+man3p/wmemcpy.3p
1134+man3p/wmemmove.3p
1135+man3p/wmemset.3p
1136+man3p/wordexp.3p
1137+man3p/wprintf.3p
1138+man3p/write.3p
1139+man3p/writev.3p
1140+man3p/wscanf.3p
1141+man3p/y0.3p
+1, -0
1@@ -0,0 +1 @@
2+8ba538e91db62622c507e34899e1e7d560e870505c00cd4d7f8d5048e54d056e  man-pages-posix-2017-a.tar.gz
+1, -0
1@@ -0,0 +1 @@
2+url = "https://www.kernel.org/pub/linux/docs/man-pages/man-pages-posix/man-pages-posix-2017-a.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+2017a r0
+2, -0
1@@ -0,0 +1,2 @@
2+/mandoc-1.14.6.tar.gz
3+/src
+45, -0
 1@@ -0,0 +1,45 @@
 2+#define MAN_CONF_FILE "/etc/man.conf"
 3+#define MANPATH_BASE "/share/man"
 4+#define MANPATH_DEFAULT "/share/man"
 5+#define OSENUM MANDOC_OS_OTHER
 6+#define UTF8_LOCALE "C.UTF-8"
 7+#define EFTYPE EINVAL
 8+#define HAVE_DIRENT_NAMLEN 0
 9+#define HAVE_ENDIAN 1
10+#define HAVE_ERR 1
11+#define HAVE_FTS 0
12+#define HAVE_FTS_COMPARE_CONST 0
13+#define HAVE_GETLINE 1
14+#define HAVE_GETSUBOPT 1
15+#define HAVE_ISBLANK 1
16+#define HAVE_LESS_T 1
17+#define HAVE_MKDTEMP 1
18+#define HAVE_MKSTEMPS 1
19+#define HAVE_NTOHL 1
20+#define HAVE_PLEDGE 0
21+#define HAVE_PROGNAME 1
22+#define HAVE_REALLOCARRAY 1
23+#define HAVE_RECALLOCARRAY 1
24+#define HAVE_REWB_BSD 0
25+#define HAVE_REWB_SYSV 1
26+#define HAVE_SANDBOX_INIT 0
27+#define HAVE_STRCASESTR 1
28+#define HAVE_STRINGLIST 0
29+#define HAVE_STRLCAT 1
30+#define HAVE_STRLCPY 1
31+#define HAVE_STRNDUP 1
32+#define HAVE_STRPTIME 1
33+#define HAVE_STRSEP 1
34+#define HAVE_STRTONUM 1
35+#define HAVE_SYS_ENDIAN 0
36+#define HAVE_VASPRINTF 1
37+#define HAVE_WCHAR 1
38+#define HAVE_OHASH 0
39+#define NEED_XPG4_2 0
40+#define BINM_APROPOS "apropos"
41+#define BINM_CATMAN "catman"
42+#define BINM_MAKEWHATIS "makewhatis"
43+#define BINM_MAN "man"
44+#define BINM_SOELIM "soelim"
45+#define BINM_WHATIS "whatis"
46+#define BINM_PAGER "less"
+118, -0
  1@@ -0,0 +1,118 @@
  2+cflags{
  3+	'-I $dir',
  4+	'-isystem $basedir/pkg/openbsd/include',
  5+	'-isystem $builddir/pkg/zlib/include',
  6+}
  7+
  8+lib('libmandoc.a', {
  9+	'man.c',
 10+	'man_macro.c',
 11+	'man_validate.c',
 12+
 13+	'arch.c',
 14+	'att.c',
 15+	'lib.c',
 16+	'mdoc.c',
 17+	'mdoc_argv.c',
 18+	'mdoc_macro.c',
 19+	'mdoc_state.c',
 20+	'mdoc_validate.c',
 21+	'st.c',
 22+
 23+	'eqn.c',
 24+	'roff.c',
 25+	'roff_validate.c',
 26+	'tbl.c',
 27+	'tbl_data.c',
 28+	'tbl_layout.c',
 29+	'tbl_opts.c',
 30+
 31+	'chars.c',
 32+	'mandoc.c',
 33+	'mandoc_aux.c',
 34+	'mandoc_msg.c',
 35+	'mandoc_ohash.c',
 36+	'mandoc_xr.c',
 37+	'msec.c',
 38+	'preconv.c',
 39+	'read.c',
 40+	'tag.c',
 41+
 42+	'compat_fts.c',
 43+	'compat_ohash.c',
 44+}, {'pkg/zlib/headers'})
 45+
 46+exe('mandoc', {
 47+	'main.c',
 48+	'manpath.c',
 49+	'mdoc_man.c',
 50+	'mdoc_markdown.c',
 51+	'out.c',
 52+	'tree.c',
 53+
 54+	'eqn_html.c',
 55+	'html.c',
 56+	'man_html.c',
 57+	'mdoc_html.c',
 58+	'roff_html.c',
 59+	'tbl_html.c',
 60+
 61+	'eqn_term.c',
 62+	'man_term.c',
 63+	'mdoc_term.c',
 64+	'roff_term.c',
 65+	'term.c',
 66+	'term_ascii.c',
 67+	'term_ps.c',
 68+	'term_tab.c',
 69+	'term_tag.c',
 70+	'tbl_term.c',
 71+
 72+	'dbm.c',
 73+	'dbm_map.c',
 74+	'mansearch.c',
 75+
 76+	'dba.c',
 77+	'dba_array.c',
 78+	'dba_read.c',
 79+	'dba_write.c',
 80+	'mandocdb.c',
 81+
 82+	'libmandoc.a',
 83+	'$builddir/pkg/openbsd/libbsd.a',
 84+	'$builddir/pkg/zlib/libz.a',
 85+})
 86+file('bin/mandoc', '755', '$outdir/mandoc')
 87+for _, cmd in ipairs{'apropos', 'man', 'whatis', 'makewhatis'} do
 88+	sym('bin/'..cmd, 'mandoc')
 89+end
 90+
 91+exe('demandoc', {
 92+	'demandoc.c',
 93+	'libmandoc.a',
 94+	'$builddir/pkg/openbsd/libbsd.a',
 95+	'$builddir/pkg/zlib/libz.a',
 96+})
 97+file('bin/demandoc', '755', '$outdir/demandoc')
 98+
 99+man{
100+	'mandoc.1',
101+	'demandoc.1',
102+	'man.1',
103+	'apropos.1',
104+
105+	'man.conf.5',
106+	'mandoc.db.5',
107+
108+	'man.7',
109+	'mdoc.7',
110+	'roff.7',
111+	'eqn.7',
112+	'tbl.7',
113+	'mandoc_char.7',
114+
115+	'makewhatis.8',
116+}
117+sym('share/man/man1/whatis.1.gz', 'apropos.1.gz')
118+
119+fetch 'curl'
+1, -0
1@@ -0,0 +1 @@
2+8bf0d570f01e70a6e124884088870cbed7537f36328d512909eb10cd53179d9c  mandoc-1.14.6.tar.gz
+1, -0
1@@ -0,0 +1 @@
2+url = "http://mandoc.bsd.lv/snapshots/mandoc-1.14.6.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+1.14.6 r0
+64, -0
 1@@ -0,0 +1,64 @@
 2+return {
 3+	srcs={
 4+		-- <cd src && printf "\t\t'%s',\n" src/*/aarch64/*.[csS]
 5+		'src/fenv/aarch64/fenv.s',
 6+		'src/ldso/aarch64/dlsym.s',
 7+		'src/ldso/aarch64/tlsdesc.s',
 8+		'src/math/aarch64/ceil.c',
 9+		'src/math/aarch64/ceilf.c',
10+		'src/math/aarch64/fabs.c',
11+		'src/math/aarch64/fabsf.c',
12+		'src/math/aarch64/floor.c',
13+		'src/math/aarch64/floorf.c',
14+		'src/math/aarch64/fma.c',
15+		'src/math/aarch64/fmaf.c',
16+		'src/math/aarch64/fmax.c',
17+		'src/math/aarch64/fmaxf.c',
18+		'src/math/aarch64/fmin.c',
19+		'src/math/aarch64/fminf.c',
20+		'src/math/aarch64/llrint.c',
21+		'src/math/aarch64/llrintf.c',
22+		'src/math/aarch64/llround.c',
23+		'src/math/aarch64/llroundf.c',
24+		'src/math/aarch64/lrint.c',
25+		'src/math/aarch64/lrintf.c',
26+		'src/math/aarch64/lround.c',
27+		'src/math/aarch64/lroundf.c',
28+		'src/math/aarch64/nearbyint.c',
29+		'src/math/aarch64/nearbyintf.c',
30+		'src/math/aarch64/rint.c',
31+		'src/math/aarch64/rintf.c',
32+		'src/math/aarch64/round.c',
33+		'src/math/aarch64/roundf.c',
34+		'src/math/aarch64/sqrt.c',
35+		'src/math/aarch64/sqrtf.c',
36+		'src/math/aarch64/trunc.c',
37+		'src/math/aarch64/truncf.c',
38+		'src/process/aarch64/vfork.s',
39+		'src/setjmp/aarch64/longjmp.s',
40+		'src/setjmp/aarch64/setjmp.s',
41+		'src/signal/aarch64/restore.s',
42+		'src/signal/aarch64/sigsetjmp.s',
43+		'src/string/aarch64/memcpy.S',
44+		'src/string/aarch64/memset.S',
45+		'src/thread/aarch64/__set_thread_area.s',
46+		'src/thread/aarch64/__unmapself.s',
47+		'src/thread/aarch64/clone.s',
48+		'src/thread/aarch64/syscall_cp.s',
49+	},
50+	bits={
51+		-- <cd src/arch/aarch64/bits && printf "\t\t'%s',\n" *.h
52+		'fcntl.h',
53+		'fenv.h',
54+		'float.h',
55+		'hwcap.h',
56+		'mman.h',
57+		'posix.h',
58+		'reg.h',
59+		'setjmp.h',
60+		'signal.h',
61+		'stat.h',
62+		'stdint.h',
63+		'user.h',
64+	},
65+}
+1565, -0
   1@@ -0,0 +1,1565 @@
   2+return {
   3+	srcs={
   4+		-- <cd src && printf "\t\t'%s',\n" src/*/*.c src/malloc/mallocng/*.c
   5+		'src/aio/aio.c',
   6+		'src/aio/aio_suspend.c',
   7+		'src/aio/lio_listio.c',
   8+		'src/complex/__cexp.c',
   9+		'src/complex/__cexpf.c',
  10+		'src/complex/cabs.c',
  11+		'src/complex/cabsf.c',
  12+		'src/complex/cabsl.c',
  13+		'src/complex/cacos.c',
  14+		'src/complex/cacosf.c',
  15+		'src/complex/cacosh.c',
  16+		'src/complex/cacoshf.c',
  17+		'src/complex/cacoshl.c',
  18+		'src/complex/cacosl.c',
  19+		'src/complex/carg.c',
  20+		'src/complex/cargf.c',
  21+		'src/complex/cargl.c',
  22+		'src/complex/casin.c',
  23+		'src/complex/casinf.c',
  24+		'src/complex/casinh.c',
  25+		'src/complex/casinhf.c',
  26+		'src/complex/casinhl.c',
  27+		'src/complex/casinl.c',
  28+		'src/complex/catan.c',
  29+		'src/complex/catanf.c',
  30+		'src/complex/catanh.c',
  31+		'src/complex/catanhf.c',
  32+		'src/complex/catanhl.c',
  33+		'src/complex/catanl.c',
  34+		'src/complex/ccos.c',
  35+		'src/complex/ccosf.c',
  36+		'src/complex/ccosh.c',
  37+		'src/complex/ccoshf.c',
  38+		'src/complex/ccoshl.c',
  39+		'src/complex/ccosl.c',
  40+		'src/complex/cexp.c',
  41+		'src/complex/cexpf.c',
  42+		'src/complex/cexpl.c',
  43+		'src/complex/cimag.c',
  44+		'src/complex/cimagf.c',
  45+		'src/complex/cimagl.c',
  46+		'src/complex/clog.c',
  47+		'src/complex/clogf.c',
  48+		'src/complex/clogl.c',
  49+		'src/complex/conj.c',
  50+		'src/complex/conjf.c',
  51+		'src/complex/conjl.c',
  52+		'src/complex/cpow.c',
  53+		'src/complex/cpowf.c',
  54+		'src/complex/cpowl.c',
  55+		'src/complex/cproj.c',
  56+		'src/complex/cprojf.c',
  57+		'src/complex/cprojl.c',
  58+		'src/complex/creal.c',
  59+		'src/complex/crealf.c',
  60+		'src/complex/creall.c',
  61+		'src/complex/csin.c',
  62+		'src/complex/csinf.c',
  63+		'src/complex/csinh.c',
  64+		'src/complex/csinhf.c',
  65+		'src/complex/csinhl.c',
  66+		'src/complex/csinl.c',
  67+		'src/complex/csqrt.c',
  68+		'src/complex/csqrtf.c',
  69+		'src/complex/csqrtl.c',
  70+		'src/complex/ctan.c',
  71+		'src/complex/ctanf.c',
  72+		'src/complex/ctanh.c',
  73+		'src/complex/ctanhf.c',
  74+		'src/complex/ctanhl.c',
  75+		'src/complex/ctanl.c',
  76+		'src/conf/confstr.c',
  77+		'src/conf/fpathconf.c',
  78+		'src/conf/legacy.c',
  79+		'src/conf/pathconf.c',
  80+		'src/conf/sysconf.c',
  81+		'src/crypt/crypt.c',
  82+		'src/crypt/crypt_blowfish.c',
  83+		'src/crypt/crypt_des.c',
  84+		'src/crypt/crypt_md5.c',
  85+		'src/crypt/crypt_r.c',
  86+		'src/crypt/crypt_sha256.c',
  87+		'src/crypt/crypt_sha512.c',
  88+		'src/crypt/encrypt.c',
  89+		'src/ctype/__ctype_b_loc.c',
  90+		'src/ctype/__ctype_get_mb_cur_max.c',
  91+		'src/ctype/__ctype_tolower_loc.c',
  92+		'src/ctype/__ctype_toupper_loc.c',
  93+		'src/ctype/isalnum.c',
  94+		'src/ctype/isalpha.c',
  95+		'src/ctype/isascii.c',
  96+		'src/ctype/isblank.c',
  97+		'src/ctype/iscntrl.c',
  98+		'src/ctype/isdigit.c',
  99+		'src/ctype/isgraph.c',
 100+		'src/ctype/islower.c',
 101+		'src/ctype/isprint.c',
 102+		'src/ctype/ispunct.c',
 103+		'src/ctype/isspace.c',
 104+		'src/ctype/isupper.c',
 105+		'src/ctype/iswalnum.c',
 106+		'src/ctype/iswalpha.c',
 107+		'src/ctype/iswblank.c',
 108+		'src/ctype/iswcntrl.c',
 109+		'src/ctype/iswctype.c',
 110+		'src/ctype/iswdigit.c',
 111+		'src/ctype/iswgraph.c',
 112+		'src/ctype/iswlower.c',
 113+		'src/ctype/iswprint.c',
 114+		'src/ctype/iswpunct.c',
 115+		'src/ctype/iswspace.c',
 116+		'src/ctype/iswupper.c',
 117+		'src/ctype/iswxdigit.c',
 118+		'src/ctype/isxdigit.c',
 119+		'src/ctype/toascii.c',
 120+		'src/ctype/tolower.c',
 121+		'src/ctype/toupper.c',
 122+		'src/ctype/towctrans.c',
 123+		'src/ctype/wcswidth.c',
 124+		'src/ctype/wctrans.c',
 125+		'src/ctype/wcwidth.c',
 126+		'src/dirent/alphasort.c',
 127+		'src/dirent/closedir.c',
 128+		'src/dirent/dirfd.c',
 129+		'src/dirent/fdopendir.c',
 130+		'src/dirent/opendir.c',
 131+		'src/dirent/readdir.c',
 132+		'src/dirent/readdir_r.c',
 133+		'src/dirent/rewinddir.c',
 134+		'src/dirent/scandir.c',
 135+		'src/dirent/seekdir.c',
 136+		'src/dirent/telldir.c',
 137+		'src/dirent/versionsort.c',
 138+		'src/env/__environ.c',
 139+		'src/env/__init_tls.c',
 140+		'src/env/__libc_start_main.c',
 141+		'src/env/__reset_tls.c',
 142+		'src/env/__stack_chk_fail.c',
 143+		'src/env/clearenv.c',
 144+		'src/env/getenv.c',
 145+		'src/env/putenv.c',
 146+		'src/env/secure_getenv.c',
 147+		'src/env/setenv.c',
 148+		'src/env/unsetenv.c',
 149+		'src/errno/__errno_location.c',
 150+		'src/errno/strerror.c',
 151+		'src/exit/_Exit.c',
 152+		'src/exit/abort.c',
 153+		'src/exit/abort_lock.c',
 154+		'src/exit/assert.c',
 155+		'src/exit/at_quick_exit.c',
 156+		'src/exit/atexit.c',
 157+		'src/exit/exit.c',
 158+		'src/exit/quick_exit.c',
 159+		'src/fcntl/creat.c',
 160+		'src/fcntl/fcntl.c',
 161+		'src/fcntl/open.c',
 162+		'src/fcntl/openat.c',
 163+		'src/fcntl/posix_fadvise.c',
 164+		'src/fcntl/posix_fallocate.c',
 165+		'src/fenv/__flt_rounds.c',
 166+		'src/fenv/fegetexceptflag.c',
 167+		'src/fenv/feholdexcept.c',
 168+		'src/fenv/fenv.c',
 169+		'src/fenv/fesetexceptflag.c',
 170+		'src/fenv/fesetround.c',
 171+		'src/fenv/feupdateenv.c',
 172+		'src/internal/defsysinfo.c',
 173+		'src/internal/floatscan.c',
 174+		'src/internal/intscan.c',
 175+		'src/internal/libc.c',
 176+		'src/internal/procfdname.c',
 177+		'src/internal/shgetc.c',
 178+		'src/internal/syscall_ret.c',
 179+		'src/internal/vdso.c',
 180+		'src/internal/version.c',
 181+		'src/ipc/ftok.c',
 182+		'src/ipc/msgctl.c',
 183+		'src/ipc/msgget.c',
 184+		'src/ipc/msgrcv.c',
 185+		'src/ipc/msgsnd.c',
 186+		'src/ipc/semctl.c',
 187+		'src/ipc/semget.c',
 188+		'src/ipc/semop.c',
 189+		'src/ipc/semtimedop.c',
 190+		'src/ipc/shmat.c',
 191+		'src/ipc/shmctl.c',
 192+		'src/ipc/shmdt.c',
 193+		'src/ipc/shmget.c',
 194+		'src/ldso/__dlsym.c',
 195+		'src/ldso/dl_iterate_phdr.c',
 196+		'src/ldso/dladdr.c',
 197+		'src/ldso/dlclose.c',
 198+		'src/ldso/dlerror.c',
 199+		'src/ldso/dlinfo.c',
 200+		'src/ldso/dlopen.c',
 201+		'src/ldso/dlsym.c',
 202+		'src/ldso/tlsdesc.c',
 203+		'src/legacy/cuserid.c',
 204+		'src/legacy/daemon.c',
 205+		'src/legacy/err.c',
 206+		'src/legacy/euidaccess.c',
 207+		'src/legacy/ftw.c',
 208+		'src/legacy/futimes.c',
 209+		'src/legacy/getdtablesize.c',
 210+		'src/legacy/getloadavg.c',
 211+		'src/legacy/getpagesize.c',
 212+		'src/legacy/getpass.c',
 213+		'src/legacy/getusershell.c',
 214+		'src/legacy/isastream.c',
 215+		'src/legacy/lutimes.c',
 216+		'src/legacy/ulimit.c',
 217+		'src/legacy/utmpx.c',
 218+		'src/legacy/valloc.c',
 219+		'src/linux/adjtime.c',
 220+		'src/linux/adjtimex.c',
 221+		'src/linux/arch_prctl.c',
 222+		'src/linux/brk.c',
 223+		'src/linux/cache.c',
 224+		'src/linux/cap.c',
 225+		'src/linux/chroot.c',
 226+		'src/linux/clock_adjtime.c',
 227+		'src/linux/clone.c',
 228+		'src/linux/copy_file_range.c',
 229+		'src/linux/epoll.c',
 230+		'src/linux/eventfd.c',
 231+		'src/linux/fallocate.c',
 232+		'src/linux/fanotify.c',
 233+		'src/linux/flock.c',
 234+		'src/linux/getdents.c',
 235+		'src/linux/getrandom.c',
 236+		'src/linux/gettid.c',
 237+		'src/linux/inotify.c',
 238+		'src/linux/ioperm.c',
 239+		'src/linux/iopl.c',
 240+		'src/linux/klogctl.c',
 241+		'src/linux/membarrier.c',
 242+		'src/linux/memfd_create.c',
 243+		'src/linux/mlock2.c',
 244+		'src/linux/module.c',
 245+		'src/linux/mount.c',
 246+		'src/linux/name_to_handle_at.c',
 247+		'src/linux/open_by_handle_at.c',
 248+		'src/linux/personality.c',
 249+		'src/linux/pivot_root.c',
 250+		'src/linux/ppoll.c',
 251+		'src/linux/prctl.c',
 252+		'src/linux/prlimit.c',
 253+		'src/linux/process_vm.c',
 254+		'src/linux/ptrace.c',
 255+		'src/linux/quotactl.c',
 256+		'src/linux/readahead.c',
 257+		'src/linux/reboot.c',
 258+		'src/linux/remap_file_pages.c',
 259+		'src/linux/sbrk.c',
 260+		'src/linux/sendfile.c',
 261+		'src/linux/setfsgid.c',
 262+		'src/linux/setfsuid.c',
 263+		'src/linux/setgroups.c',
 264+		'src/linux/sethostname.c',
 265+		'src/linux/setns.c',
 266+		'src/linux/settimeofday.c',
 267+		'src/linux/signalfd.c',
 268+		'src/linux/splice.c',
 269+		'src/linux/stime.c',
 270+		'src/linux/swap.c',
 271+		'src/linux/sync_file_range.c',
 272+		'src/linux/syncfs.c',
 273+		'src/linux/sysinfo.c',
 274+		'src/linux/tee.c',
 275+		'src/linux/timerfd.c',
 276+		'src/linux/unshare.c',
 277+		'src/linux/utimes.c',
 278+		'src/linux/vhangup.c',
 279+		'src/linux/vmsplice.c',
 280+		'src/linux/wait3.c',
 281+		'src/linux/wait4.c',
 282+		'src/linux/xattr.c',
 283+		'src/locale/__lctrans.c',
 284+		'src/locale/__mo_lookup.c',
 285+		'src/locale/bind_textdomain_codeset.c',
 286+		'src/locale/c_locale.c',
 287+		'src/locale/catclose.c',
 288+		'src/locale/catgets.c',
 289+		'src/locale/catopen.c',
 290+		'src/locale/dcngettext.c',
 291+		'src/locale/duplocale.c',
 292+		'src/locale/freelocale.c',
 293+		'src/locale/iconv.c',
 294+		'src/locale/iconv_close.c',
 295+		'src/locale/langinfo.c',
 296+		'src/locale/locale_map.c',
 297+		'src/locale/localeconv.c',
 298+		'src/locale/newlocale.c',
 299+		'src/locale/pleval.c',
 300+		'src/locale/setlocale.c',
 301+		'src/locale/strcoll.c',
 302+		'src/locale/strfmon.c',
 303+		'src/locale/strtod_l.c',
 304+		'src/locale/strxfrm.c',
 305+		'src/locale/textdomain.c',
 306+		'src/locale/uselocale.c',
 307+		'src/locale/wcscoll.c',
 308+		'src/locale/wcsxfrm.c',
 309+		'src/malloc/calloc.c',
 310+		'src/malloc/free.c',
 311+		'src/malloc/libc_calloc.c',
 312+		'src/malloc/lite_malloc.c',
 313+		'src/malloc/memalign.c',
 314+		'src/malloc/posix_memalign.c',
 315+		'src/malloc/realloc.c',
 316+		'src/malloc/reallocarray.c',
 317+		'src/malloc/replaced.c',
 318+		'src/math/__cos.c',
 319+		'src/math/__cosdf.c',
 320+		'src/math/__cosl.c',
 321+		'src/math/__expo2.c',
 322+		'src/math/__expo2f.c',
 323+		'src/math/__fpclassify.c',
 324+		'src/math/__fpclassifyf.c',
 325+		'src/math/__fpclassifyl.c',
 326+		'src/math/__invtrigl.c',
 327+		'src/math/__isgreaterequall.c',
 328+		'src/math/__isgreaterl.c',
 329+		'src/math/__islessequall.c',
 330+		'src/math/__islessgreaterl.c',
 331+		'src/math/__islessl.c',
 332+		'src/math/__math_divzero.c',
 333+		'src/math/__math_divzerof.c',
 334+		'src/math/__math_invalid.c',
 335+		'src/math/__math_invalidf.c',
 336+		'src/math/__math_invalidl.c',
 337+		'src/math/__math_oflow.c',
 338+		'src/math/__math_oflowf.c',
 339+		'src/math/__math_uflow.c',
 340+		'src/math/__math_uflowf.c',
 341+		'src/math/__math_xflow.c',
 342+		'src/math/__math_xflowf.c',
 343+		'src/math/__polevll.c',
 344+		'src/math/__rem_pio2.c',
 345+		'src/math/__rem_pio2_large.c',
 346+		'src/math/__rem_pio2f.c',
 347+		'src/math/__rem_pio2l.c',
 348+		'src/math/__signbit.c',
 349+		'src/math/__signbitf.c',
 350+		'src/math/__signbitl.c',
 351+		'src/math/__sin.c',
 352+		'src/math/__sindf.c',
 353+		'src/math/__sinl.c',
 354+		'src/math/__tan.c',
 355+		'src/math/__tandf.c',
 356+		'src/math/__tanl.c',
 357+		'src/math/acos.c',
 358+		'src/math/acosf.c',
 359+		'src/math/acosh.c',
 360+		'src/math/acoshf.c',
 361+		'src/math/acoshl.c',
 362+		'src/math/acosl.c',
 363+		'src/math/asin.c',
 364+		'src/math/asinf.c',
 365+		'src/math/asinh.c',
 366+		'src/math/asinhf.c',
 367+		'src/math/asinhl.c',
 368+		'src/math/asinl.c',
 369+		'src/math/atan.c',
 370+		'src/math/atan2.c',
 371+		'src/math/atan2f.c',
 372+		'src/math/atan2l.c',
 373+		'src/math/atanf.c',
 374+		'src/math/atanh.c',
 375+		'src/math/atanhf.c',
 376+		'src/math/atanhl.c',
 377+		'src/math/atanl.c',
 378+		'src/math/cbrt.c',
 379+		'src/math/cbrtf.c',
 380+		'src/math/cbrtl.c',
 381+		'src/math/ceil.c',
 382+		'src/math/ceilf.c',
 383+		'src/math/ceill.c',
 384+		'src/math/copysign.c',
 385+		'src/math/copysignf.c',
 386+		'src/math/copysignl.c',
 387+		'src/math/cos.c',
 388+		'src/math/cosf.c',
 389+		'src/math/cosh.c',
 390+		'src/math/coshf.c',
 391+		'src/math/coshl.c',
 392+		'src/math/cosl.c',
 393+		'src/math/erf.c',
 394+		'src/math/erff.c',
 395+		'src/math/erfl.c',
 396+		'src/math/exp.c',
 397+		'src/math/exp10.c',
 398+		'src/math/exp10f.c',
 399+		'src/math/exp10l.c',
 400+		'src/math/exp2.c',
 401+		'src/math/exp2f.c',
 402+		'src/math/exp2f_data.c',
 403+		'src/math/exp2l.c',
 404+		'src/math/exp_data.c',
 405+		'src/math/expf.c',
 406+		'src/math/expl.c',
 407+		'src/math/expm1.c',
 408+		'src/math/expm1f.c',
 409+		'src/math/expm1l.c',
 410+		'src/math/fabs.c',
 411+		'src/math/fabsf.c',
 412+		'src/math/fabsl.c',
 413+		'src/math/fdim.c',
 414+		'src/math/fdimf.c',
 415+		'src/math/fdiml.c',
 416+		'src/math/finite.c',
 417+		'src/math/finitef.c',
 418+		'src/math/floor.c',
 419+		'src/math/floorf.c',
 420+		'src/math/floorl.c',
 421+		'src/math/fma.c',
 422+		'src/math/fmaf.c',
 423+		'src/math/fmal.c',
 424+		'src/math/fmax.c',
 425+		'src/math/fmaxf.c',
 426+		'src/math/fmaxl.c',
 427+		'src/math/fmin.c',
 428+		'src/math/fminf.c',
 429+		'src/math/fminl.c',
 430+		'src/math/fmod.c',
 431+		'src/math/fmodf.c',
 432+		'src/math/fmodl.c',
 433+		'src/math/frexp.c',
 434+		'src/math/frexpf.c',
 435+		'src/math/frexpl.c',
 436+		'src/math/hypot.c',
 437+		'src/math/hypotf.c',
 438+		'src/math/hypotl.c',
 439+		'src/math/ilogb.c',
 440+		'src/math/ilogbf.c',
 441+		'src/math/ilogbl.c',
 442+		'src/math/j0.c',
 443+		'src/math/j0f.c',
 444+		'src/math/j1.c',
 445+		'src/math/j1f.c',
 446+		'src/math/jn.c',
 447+		'src/math/jnf.c',
 448+		'src/math/ldexp.c',
 449+		'src/math/ldexpf.c',
 450+		'src/math/ldexpl.c',
 451+		'src/math/lgamma.c',
 452+		'src/math/lgamma_r.c',
 453+		'src/math/lgammaf.c',
 454+		'src/math/lgammaf_r.c',
 455+		'src/math/lgammal.c',
 456+		'src/math/llrint.c',
 457+		'src/math/llrintf.c',
 458+		'src/math/llrintl.c',
 459+		'src/math/llround.c',
 460+		'src/math/llroundf.c',
 461+		'src/math/llroundl.c',
 462+		'src/math/log.c',
 463+		'src/math/log10.c',
 464+		'src/math/log10f.c',
 465+		'src/math/log10l.c',
 466+		'src/math/log1p.c',
 467+		'src/math/log1pf.c',
 468+		'src/math/log1pl.c',
 469+		'src/math/log2.c',
 470+		'src/math/log2_data.c',
 471+		'src/math/log2f.c',
 472+		'src/math/log2f_data.c',
 473+		'src/math/log2l.c',
 474+		'src/math/log_data.c',
 475+		'src/math/logb.c',
 476+		'src/math/logbf.c',
 477+		'src/math/logbl.c',
 478+		'src/math/logf.c',
 479+		'src/math/logf_data.c',
 480+		'src/math/logl.c',
 481+		'src/math/lrint.c',
 482+		'src/math/lrintf.c',
 483+		'src/math/lrintl.c',
 484+		'src/math/lround.c',
 485+		'src/math/lroundf.c',
 486+		'src/math/lroundl.c',
 487+		'src/math/modf.c',
 488+		'src/math/modff.c',
 489+		'src/math/modfl.c',
 490+		'src/math/nan.c',
 491+		'src/math/nanf.c',
 492+		'src/math/nanl.c',
 493+		'src/math/nearbyint.c',
 494+		'src/math/nearbyintf.c',
 495+		'src/math/nearbyintl.c',
 496+		'src/math/nextafter.c',
 497+		'src/math/nextafterf.c',
 498+		'src/math/nextafterl.c',
 499+		'src/math/nexttoward.c',
 500+		'src/math/nexttowardf.c',
 501+		'src/math/nexttowardl.c',
 502+		'src/math/pow.c',
 503+		'src/math/pow_data.c',
 504+		'src/math/powf.c',
 505+		'src/math/powf_data.c',
 506+		'src/math/powl.c',
 507+		'src/math/remainder.c',
 508+		'src/math/remainderf.c',
 509+		'src/math/remainderl.c',
 510+		'src/math/remquo.c',
 511+		'src/math/remquof.c',
 512+		'src/math/remquol.c',
 513+		'src/math/rint.c',
 514+		'src/math/rintf.c',
 515+		'src/math/rintl.c',
 516+		'src/math/round.c',
 517+		'src/math/roundf.c',
 518+		'src/math/roundl.c',
 519+		'src/math/scalb.c',
 520+		'src/math/scalbf.c',
 521+		'src/math/scalbln.c',
 522+		'src/math/scalblnf.c',
 523+		'src/math/scalblnl.c',
 524+		'src/math/scalbn.c',
 525+		'src/math/scalbnf.c',
 526+		'src/math/scalbnl.c',
 527+		'src/math/signgam.c',
 528+		'src/math/significand.c',
 529+		'src/math/significandf.c',
 530+		'src/math/sin.c',
 531+		'src/math/sincos.c',
 532+		'src/math/sincosf.c',
 533+		'src/math/sincosl.c',
 534+		'src/math/sinf.c',
 535+		'src/math/sinh.c',
 536+		'src/math/sinhf.c',
 537+		'src/math/sinhl.c',
 538+		'src/math/sinl.c',
 539+		'src/math/sqrt.c',
 540+		'src/math/sqrt_data.c',
 541+		'src/math/sqrtf.c',
 542+		'src/math/sqrtl.c',
 543+		'src/math/tan.c',
 544+		'src/math/tanf.c',
 545+		'src/math/tanh.c',
 546+		'src/math/tanhf.c',
 547+		'src/math/tanhl.c',
 548+		'src/math/tanl.c',
 549+		'src/math/tgamma.c',
 550+		'src/math/tgammaf.c',
 551+		'src/math/tgammal.c',
 552+		'src/math/trunc.c',
 553+		'src/math/truncf.c',
 554+		'src/math/truncl.c',
 555+		'src/misc/a64l.c',
 556+		'src/misc/basename.c',
 557+		'src/misc/dirname.c',
 558+		'src/misc/ffs.c',
 559+		'src/misc/ffsl.c',
 560+		'src/misc/ffsll.c',
 561+		'src/misc/fmtmsg.c',
 562+		'src/misc/forkpty.c',
 563+		'src/misc/get_current_dir_name.c',
 564+		'src/misc/getauxval.c',
 565+		'src/misc/getdomainname.c',
 566+		'src/misc/getentropy.c',
 567+		'src/misc/gethostid.c',
 568+		'src/misc/getopt.c',
 569+		'src/misc/getopt_long.c',
 570+		'src/misc/getpriority.c',
 571+		'src/misc/getresgid.c',
 572+		'src/misc/getresuid.c',
 573+		'src/misc/getrlimit.c',
 574+		'src/misc/getrusage.c',
 575+		'src/misc/getsubopt.c',
 576+		'src/misc/initgroups.c',
 577+		'src/misc/ioctl.c',
 578+		'src/misc/issetugid.c',
 579+		'src/misc/lockf.c',
 580+		'src/misc/login_tty.c',
 581+		'src/misc/mntent.c',
 582+		'src/misc/nftw.c',
 583+		'src/misc/openpty.c',
 584+		'src/misc/ptsname.c',
 585+		'src/misc/pty.c',
 586+		'src/misc/realpath.c',
 587+		'src/misc/setdomainname.c',
 588+		'src/misc/setpriority.c',
 589+		'src/misc/setrlimit.c',
 590+		'src/misc/syscall.c',
 591+		'src/misc/syslog.c',
 592+		'src/misc/uname.c',
 593+		'src/misc/wordexp.c',
 594+		'src/mman/madvise.c',
 595+		'src/mman/mincore.c',
 596+		'src/mman/mlock.c',
 597+		'src/mman/mlockall.c',
 598+		'src/mman/mmap.c',
 599+		'src/mman/mprotect.c',
 600+		'src/mman/mremap.c',
 601+		'src/mman/msync.c',
 602+		'src/mman/munlock.c',
 603+		'src/mman/munlockall.c',
 604+		'src/mman/munmap.c',
 605+		'src/mman/posix_madvise.c',
 606+		'src/mman/shm_open.c',
 607+		'src/mq/mq_close.c',
 608+		'src/mq/mq_getattr.c',
 609+		'src/mq/mq_notify.c',
 610+		'src/mq/mq_open.c',
 611+		'src/mq/mq_receive.c',
 612+		'src/mq/mq_send.c',
 613+		'src/mq/mq_setattr.c',
 614+		'src/mq/mq_timedreceive.c',
 615+		'src/mq/mq_timedsend.c',
 616+		'src/mq/mq_unlink.c',
 617+		'src/multibyte/btowc.c',
 618+		'src/multibyte/c16rtomb.c',
 619+		'src/multibyte/c32rtomb.c',
 620+		'src/multibyte/internal.c',
 621+		'src/multibyte/mblen.c',
 622+		'src/multibyte/mbrlen.c',
 623+		'src/multibyte/mbrtoc16.c',
 624+		'src/multibyte/mbrtoc32.c',
 625+		'src/multibyte/mbrtowc.c',
 626+		'src/multibyte/mbsinit.c',
 627+		'src/multibyte/mbsnrtowcs.c',
 628+		'src/multibyte/mbsrtowcs.c',
 629+		'src/multibyte/mbstowcs.c',
 630+		'src/multibyte/mbtowc.c',
 631+		'src/multibyte/wcrtomb.c',
 632+		'src/multibyte/wcsnrtombs.c',
 633+		'src/multibyte/wcsrtombs.c',
 634+		'src/multibyte/wcstombs.c',
 635+		'src/multibyte/wctob.c',
 636+		'src/multibyte/wctomb.c',
 637+		'src/network/accept.c',
 638+		'src/network/accept4.c',
 639+		'src/network/bind.c',
 640+		'src/network/connect.c',
 641+		'src/network/dn_comp.c',
 642+		'src/network/dn_expand.c',
 643+		'src/network/dn_skipname.c',
 644+		'src/network/dns_parse.c',
 645+		'src/network/ent.c',
 646+		'src/network/ether.c',
 647+		'src/network/freeaddrinfo.c',
 648+		'src/network/gai_strerror.c',
 649+		'src/network/getaddrinfo.c',
 650+		'src/network/gethostbyaddr.c',
 651+		'src/network/gethostbyaddr_r.c',
 652+		'src/network/gethostbyname.c',
 653+		'src/network/gethostbyname2.c',
 654+		'src/network/gethostbyname2_r.c',
 655+		'src/network/gethostbyname_r.c',
 656+		'src/network/getifaddrs.c',
 657+		'src/network/getnameinfo.c',
 658+		'src/network/getpeername.c',
 659+		'src/network/getservbyname.c',
 660+		'src/network/getservbyname_r.c',
 661+		'src/network/getservbyport.c',
 662+		'src/network/getservbyport_r.c',
 663+		'src/network/getsockname.c',
 664+		'src/network/getsockopt.c',
 665+		'src/network/h_errno.c',
 666+		'src/network/herror.c',
 667+		'src/network/hstrerror.c',
 668+		'src/network/htonl.c',
 669+		'src/network/htons.c',
 670+		'src/network/if_freenameindex.c',
 671+		'src/network/if_indextoname.c',
 672+		'src/network/if_nameindex.c',
 673+		'src/network/if_nametoindex.c',
 674+		'src/network/in6addr_any.c',
 675+		'src/network/in6addr_loopback.c',
 676+		'src/network/inet_addr.c',
 677+		'src/network/inet_aton.c',
 678+		'src/network/inet_legacy.c',
 679+		'src/network/inet_ntoa.c',
 680+		'src/network/inet_ntop.c',
 681+		'src/network/inet_pton.c',
 682+		'src/network/listen.c',
 683+		'src/network/lookup_ipliteral.c',
 684+		'src/network/lookup_name.c',
 685+		'src/network/lookup_serv.c',
 686+		'src/network/netlink.c',
 687+		'src/network/netname.c',
 688+		'src/network/ns_parse.c',
 689+		'src/network/ntohl.c',
 690+		'src/network/ntohs.c',
 691+		'src/network/proto.c',
 692+		'src/network/recv.c',
 693+		'src/network/recvfrom.c',
 694+		'src/network/recvmmsg.c',
 695+		'src/network/recvmsg.c',
 696+		'src/network/res_init.c',
 697+		'src/network/res_mkquery.c',
 698+		'src/network/res_msend.c',
 699+		'src/network/res_query.c',
 700+		'src/network/res_querydomain.c',
 701+		'src/network/res_send.c',
 702+		'src/network/res_state.c',
 703+		'src/network/resolvconf.c',
 704+		'src/network/send.c',
 705+		'src/network/sendmmsg.c',
 706+		'src/network/sendmsg.c',
 707+		'src/network/sendto.c',
 708+		'src/network/serv.c',
 709+		'src/network/setsockopt.c',
 710+		'src/network/shutdown.c',
 711+		'src/network/sockatmark.c',
 712+		'src/network/socket.c',
 713+		'src/network/socketpair.c',
 714+		'src/passwd/fgetgrent.c',
 715+		'src/passwd/fgetpwent.c',
 716+		'src/passwd/fgetspent.c',
 717+		'src/passwd/getgr_a.c',
 718+		'src/passwd/getgr_r.c',
 719+		'src/passwd/getgrent.c',
 720+		'src/passwd/getgrent_a.c',
 721+		'src/passwd/getgrouplist.c',
 722+		'src/passwd/getpw_a.c',
 723+		'src/passwd/getpw_r.c',
 724+		'src/passwd/getpwent.c',
 725+		'src/passwd/getpwent_a.c',
 726+		'src/passwd/getspent.c',
 727+		'src/passwd/getspnam.c',
 728+		'src/passwd/getspnam_r.c',
 729+		'src/passwd/lckpwdf.c',
 730+		'src/passwd/nscd_query.c',
 731+		'src/passwd/putgrent.c',
 732+		'src/passwd/putpwent.c',
 733+		'src/passwd/putspent.c',
 734+		'src/prng/__rand48_step.c',
 735+		'src/prng/__seed48.c',
 736+		'src/prng/drand48.c',
 737+		'src/prng/lcong48.c',
 738+		'src/prng/lrand48.c',
 739+		'src/prng/mrand48.c',
 740+		'src/prng/rand.c',
 741+		'src/prng/rand_r.c',
 742+		'src/prng/random.c',
 743+		'src/prng/seed48.c',
 744+		'src/prng/srand48.c',
 745+		'src/process/_Fork.c',
 746+		'src/process/execl.c',
 747+		'src/process/execle.c',
 748+		'src/process/execlp.c',
 749+		'src/process/execv.c',
 750+		'src/process/execve.c',
 751+		'src/process/execvp.c',
 752+		'src/process/fexecve.c',
 753+		'src/process/fork.c',
 754+		'src/process/posix_spawn.c',
 755+		'src/process/posix_spawn_file_actions_addchdir.c',
 756+		'src/process/posix_spawn_file_actions_addclose.c',
 757+		'src/process/posix_spawn_file_actions_adddup2.c',
 758+		'src/process/posix_spawn_file_actions_addfchdir.c',
 759+		'src/process/posix_spawn_file_actions_addopen.c',
 760+		'src/process/posix_spawn_file_actions_destroy.c',
 761+		'src/process/posix_spawn_file_actions_init.c',
 762+		'src/process/posix_spawnattr_destroy.c',
 763+		'src/process/posix_spawnattr_getflags.c',
 764+		'src/process/posix_spawnattr_getpgroup.c',
 765+		'src/process/posix_spawnattr_getsigdefault.c',
 766+		'src/process/posix_spawnattr_getsigmask.c',
 767+		'src/process/posix_spawnattr_init.c',
 768+		'src/process/posix_spawnattr_sched.c',
 769+		'src/process/posix_spawnattr_setflags.c',
 770+		'src/process/posix_spawnattr_setpgroup.c',
 771+		'src/process/posix_spawnattr_setsigdefault.c',
 772+		'src/process/posix_spawnattr_setsigmask.c',
 773+		'src/process/posix_spawnp.c',
 774+		'src/process/system.c',
 775+		'src/process/vfork.c',
 776+		'src/process/wait.c',
 777+		'src/process/waitid.c',
 778+		'src/process/waitpid.c',
 779+		'src/regex/fnmatch.c',
 780+		'src/regex/glob.c',
 781+		'src/regex/regcomp.c',
 782+		'src/regex/regerror.c',
 783+		'src/regex/regexec.c',
 784+		'src/regex/tre-mem.c',
 785+		'src/sched/affinity.c',
 786+		'src/sched/sched_cpucount.c',
 787+		'src/sched/sched_get_priority_max.c',
 788+		'src/sched/sched_getcpu.c',
 789+		'src/sched/sched_getparam.c',
 790+		'src/sched/sched_getscheduler.c',
 791+		'src/sched/sched_rr_get_interval.c',
 792+		'src/sched/sched_setparam.c',
 793+		'src/sched/sched_setscheduler.c',
 794+		'src/sched/sched_yield.c',
 795+		'src/search/hsearch.c',
 796+		'src/search/insque.c',
 797+		'src/search/lsearch.c',
 798+		'src/search/tdelete.c',
 799+		'src/search/tdestroy.c',
 800+		'src/search/tfind.c',
 801+		'src/search/tsearch.c',
 802+		'src/search/twalk.c',
 803+		'src/select/poll.c',
 804+		'src/select/pselect.c',
 805+		'src/select/select.c',
 806+		'src/setjmp/longjmp.c',
 807+		'src/setjmp/setjmp.c',
 808+		'src/signal/block.c',
 809+		'src/signal/getitimer.c',
 810+		'src/signal/kill.c',
 811+		'src/signal/killpg.c',
 812+		'src/signal/psiginfo.c',
 813+		'src/signal/psignal.c',
 814+		'src/signal/raise.c',
 815+		'src/signal/restore.c',
 816+		'src/signal/setitimer.c',
 817+		'src/signal/sigaction.c',
 818+		'src/signal/sigaddset.c',
 819+		'src/signal/sigaltstack.c',
 820+		'src/signal/sigandset.c',
 821+		'src/signal/sigdelset.c',
 822+		'src/signal/sigemptyset.c',
 823+		'src/signal/sigfillset.c',
 824+		'src/signal/sighold.c',
 825+		'src/signal/sigignore.c',
 826+		'src/signal/siginterrupt.c',
 827+		'src/signal/sigisemptyset.c',
 828+		'src/signal/sigismember.c',
 829+		'src/signal/siglongjmp.c',
 830+		'src/signal/signal.c',
 831+		'src/signal/sigorset.c',
 832+		'src/signal/sigpause.c',
 833+		'src/signal/sigpending.c',
 834+		'src/signal/sigprocmask.c',
 835+		'src/signal/sigqueue.c',
 836+		'src/signal/sigrelse.c',
 837+		'src/signal/sigrtmax.c',
 838+		'src/signal/sigrtmin.c',
 839+		'src/signal/sigset.c',
 840+		'src/signal/sigsetjmp.c',
 841+		'src/signal/sigsetjmp_tail.c',
 842+		'src/signal/sigsuspend.c',
 843+		'src/signal/sigtimedwait.c',
 844+		'src/signal/sigwait.c',
 845+		'src/signal/sigwaitinfo.c',
 846+		'src/stat/__xstat.c',
 847+		'src/stat/chmod.c',
 848+		'src/stat/fchmod.c',
 849+		'src/stat/fchmodat.c',
 850+		'src/stat/fstat.c',
 851+		'src/stat/fstatat.c',
 852+		'src/stat/futimens.c',
 853+		'src/stat/futimesat.c',
 854+		'src/stat/lchmod.c',
 855+		'src/stat/lstat.c',
 856+		'src/stat/mkdir.c',
 857+		'src/stat/mkdirat.c',
 858+		'src/stat/mkfifo.c',
 859+		'src/stat/mkfifoat.c',
 860+		'src/stat/mknod.c',
 861+		'src/stat/mknodat.c',
 862+		'src/stat/stat.c',
 863+		'src/stat/statvfs.c',
 864+		'src/stat/umask.c',
 865+		'src/stat/utimensat.c',
 866+		'src/stdio/__fclose_ca.c',
 867+		'src/stdio/__fdopen.c',
 868+		'src/stdio/__fmodeflags.c',
 869+		'src/stdio/__fopen_rb_ca.c',
 870+		'src/stdio/__lockfile.c',
 871+		'src/stdio/__overflow.c',
 872+		'src/stdio/__stdio_close.c',
 873+		'src/stdio/__stdio_exit.c',
 874+		'src/stdio/__stdio_read.c',
 875+		'src/stdio/__stdio_seek.c',
 876+		'src/stdio/__stdio_write.c',
 877+		'src/stdio/__stdout_write.c',
 878+		'src/stdio/__toread.c',
 879+		'src/stdio/__towrite.c',
 880+		'src/stdio/__uflow.c',
 881+		'src/stdio/asprintf.c',
 882+		'src/stdio/clearerr.c',
 883+		'src/stdio/dprintf.c',
 884+		'src/stdio/ext.c',
 885+		'src/stdio/ext2.c',
 886+		'src/stdio/fclose.c',
 887+		'src/stdio/feof.c',
 888+		'src/stdio/ferror.c',
 889+		'src/stdio/fflush.c',
 890+		'src/stdio/fgetc.c',
 891+		'src/stdio/fgetln.c',
 892+		'src/stdio/fgetpos.c',
 893+		'src/stdio/fgets.c',
 894+		'src/stdio/fgetwc.c',
 895+		'src/stdio/fgetws.c',
 896+		'src/stdio/fileno.c',
 897+		'src/stdio/flockfile.c',
 898+		'src/stdio/fmemopen.c',
 899+		'src/stdio/fopen.c',
 900+		'src/stdio/fopencookie.c',
 901+		'src/stdio/fprintf.c',
 902+		'src/stdio/fputc.c',
 903+		'src/stdio/fputs.c',
 904+		'src/stdio/fputwc.c',
 905+		'src/stdio/fputws.c',
 906+		'src/stdio/fread.c',
 907+		'src/stdio/freopen.c',
 908+		'src/stdio/fscanf.c',
 909+		'src/stdio/fseek.c',
 910+		'src/stdio/fsetpos.c',
 911+		'src/stdio/ftell.c',
 912+		'src/stdio/ftrylockfile.c',
 913+		'src/stdio/funlockfile.c',
 914+		'src/stdio/fwide.c',
 915+		'src/stdio/fwprintf.c',
 916+		'src/stdio/fwrite.c',
 917+		'src/stdio/fwscanf.c',
 918+		'src/stdio/getc.c',
 919+		'src/stdio/getc_unlocked.c',
 920+		'src/stdio/getchar.c',
 921+		'src/stdio/getchar_unlocked.c',
 922+		'src/stdio/getdelim.c',
 923+		'src/stdio/getline.c',
 924+		'src/stdio/gets.c',
 925+		'src/stdio/getw.c',
 926+		'src/stdio/getwc.c',
 927+		'src/stdio/getwchar.c',
 928+		'src/stdio/ofl.c',
 929+		'src/stdio/ofl_add.c',
 930+		'src/stdio/open_memstream.c',
 931+		'src/stdio/open_wmemstream.c',
 932+		'src/stdio/pclose.c',
 933+		'src/stdio/perror.c',
 934+		'src/stdio/popen.c',
 935+		'src/stdio/printf.c',
 936+		'src/stdio/putc.c',
 937+		'src/stdio/putc_unlocked.c',
 938+		'src/stdio/putchar.c',
 939+		'src/stdio/putchar_unlocked.c',
 940+		'src/stdio/puts.c',
 941+		'src/stdio/putw.c',
 942+		'src/stdio/putwc.c',
 943+		'src/stdio/putwchar.c',
 944+		'src/stdio/remove.c',
 945+		'src/stdio/rename.c',
 946+		'src/stdio/rewind.c',
 947+		'src/stdio/scanf.c',
 948+		'src/stdio/setbuf.c',
 949+		'src/stdio/setbuffer.c',
 950+		'src/stdio/setlinebuf.c',
 951+		'src/stdio/setvbuf.c',
 952+		'src/stdio/snprintf.c',
 953+		'src/stdio/sprintf.c',
 954+		'src/stdio/sscanf.c',
 955+		'src/stdio/stderr.c',
 956+		'src/stdio/stdin.c',
 957+		'src/stdio/stdout.c',
 958+		'src/stdio/swprintf.c',
 959+		'src/stdio/swscanf.c',
 960+		'src/stdio/tempnam.c',
 961+		'src/stdio/tmpfile.c',
 962+		'src/stdio/tmpnam.c',
 963+		'src/stdio/ungetc.c',
 964+		'src/stdio/ungetwc.c',
 965+		'src/stdio/vasprintf.c',
 966+		'src/stdio/vdprintf.c',
 967+		'src/stdio/vfprintf.c',
 968+		'src/stdio/vfscanf.c',
 969+		'src/stdio/vfwprintf.c',
 970+		'src/stdio/vfwscanf.c',
 971+		'src/stdio/vprintf.c',
 972+		'src/stdio/vscanf.c',
 973+		'src/stdio/vsnprintf.c',
 974+		'src/stdio/vsprintf.c',
 975+		'src/stdio/vsscanf.c',
 976+		'src/stdio/vswprintf.c',
 977+		'src/stdio/vswscanf.c',
 978+		'src/stdio/vwprintf.c',
 979+		'src/stdio/vwscanf.c',
 980+		'src/stdio/wprintf.c',
 981+		'src/stdio/wscanf.c',
 982+		'src/stdlib/abs.c',
 983+		'src/stdlib/atof.c',
 984+		'src/stdlib/atoi.c',
 985+		'src/stdlib/atol.c',
 986+		'src/stdlib/atoll.c',
 987+		'src/stdlib/bsearch.c',
 988+		'src/stdlib/div.c',
 989+		'src/stdlib/ecvt.c',
 990+		'src/stdlib/fcvt.c',
 991+		'src/stdlib/gcvt.c',
 992+		'src/stdlib/imaxabs.c',
 993+		'src/stdlib/imaxdiv.c',
 994+		'src/stdlib/labs.c',
 995+		'src/stdlib/ldiv.c',
 996+		'src/stdlib/llabs.c',
 997+		'src/stdlib/lldiv.c',
 998+		'src/stdlib/qsort.c',
 999+		'src/stdlib/qsort_nr.c',
1000+		'src/stdlib/strtod.c',
1001+		'src/stdlib/strtol.c',
1002+		'src/stdlib/wcstod.c',
1003+		'src/stdlib/wcstol.c',
1004+		'src/string/bcmp.c',
1005+		'src/string/bcopy.c',
1006+		'src/string/bzero.c',
1007+		'src/string/explicit_bzero.c',
1008+		'src/string/index.c',
1009+		'src/string/memccpy.c',
1010+		'src/string/memchr.c',
1011+		'src/string/memcmp.c',
1012+		'src/string/memcpy.c',
1013+		'src/string/memmem.c',
1014+		'src/string/memmove.c',
1015+		'src/string/mempcpy.c',
1016+		'src/string/memrchr.c',
1017+		'src/string/memset.c',
1018+		'src/string/rindex.c',
1019+		'src/string/stpcpy.c',
1020+		'src/string/stpncpy.c',
1021+		'src/string/strcasecmp.c',
1022+		'src/string/strcasestr.c',
1023+		'src/string/strcat.c',
1024+		'src/string/strchr.c',
1025+		'src/string/strchrnul.c',
1026+		'src/string/strcmp.c',
1027+		'src/string/strcpy.c',
1028+		'src/string/strcspn.c',
1029+		'src/string/strdup.c',
1030+		'src/string/strerror_r.c',
1031+		'src/string/strlcat.c',
1032+		'src/string/strlcpy.c',
1033+		'src/string/strlen.c',
1034+		'src/string/strncasecmp.c',
1035+		'src/string/strncat.c',
1036+		'src/string/strncmp.c',
1037+		'src/string/strncpy.c',
1038+		'src/string/strndup.c',
1039+		'src/string/strnlen.c',
1040+		'src/string/strpbrk.c',
1041+		'src/string/strrchr.c',
1042+		'src/string/strsep.c',
1043+		'src/string/strsignal.c',
1044+		'src/string/strspn.c',
1045+		'src/string/strstr.c',
1046+		'src/string/strtok.c',
1047+		'src/string/strtok_r.c',
1048+		'src/string/strverscmp.c',
1049+		'src/string/swab.c',
1050+		'src/string/wcpcpy.c',
1051+		'src/string/wcpncpy.c',
1052+		'src/string/wcscasecmp.c',
1053+		'src/string/wcscasecmp_l.c',
1054+		'src/string/wcscat.c',
1055+		'src/string/wcschr.c',
1056+		'src/string/wcscmp.c',
1057+		'src/string/wcscpy.c',
1058+		'src/string/wcscspn.c',
1059+		'src/string/wcsdup.c',
1060+		'src/string/wcslen.c',
1061+		'src/string/wcsncasecmp.c',
1062+		'src/string/wcsncasecmp_l.c',
1063+		'src/string/wcsncat.c',
1064+		'src/string/wcsncmp.c',
1065+		'src/string/wcsncpy.c',
1066+		'src/string/wcsnlen.c',
1067+		'src/string/wcspbrk.c',
1068+		'src/string/wcsrchr.c',
1069+		'src/string/wcsspn.c',
1070+		'src/string/wcsstr.c',
1071+		'src/string/wcstok.c',
1072+		'src/string/wcswcs.c',
1073+		'src/string/wmemchr.c',
1074+		'src/string/wmemcmp.c',
1075+		'src/string/wmemcpy.c',
1076+		'src/string/wmemmove.c',
1077+		'src/string/wmemset.c',
1078+		'src/temp/__randname.c',
1079+		'src/temp/mkdtemp.c',
1080+		'src/temp/mkostemp.c',
1081+		'src/temp/mkostemps.c',
1082+		'src/temp/mkstemp.c',
1083+		'src/temp/mkstemps.c',
1084+		'src/temp/mktemp.c',
1085+		'src/termios/cfgetospeed.c',
1086+		'src/termios/cfmakeraw.c',
1087+		'src/termios/cfsetospeed.c',
1088+		'src/termios/tcdrain.c',
1089+		'src/termios/tcflow.c',
1090+		'src/termios/tcflush.c',
1091+		'src/termios/tcgetattr.c',
1092+		'src/termios/tcgetsid.c',
1093+		'src/termios/tcgetwinsize.c',
1094+		'src/termios/tcsendbreak.c',
1095+		'src/termios/tcsetattr.c',
1096+		'src/termios/tcsetwinsize.c',
1097+		'src/thread/__lock.c',
1098+		'src/thread/__set_thread_area.c',
1099+		'src/thread/__syscall_cp.c',
1100+		'src/thread/__timedwait.c',
1101+		'src/thread/__tls_get_addr.c',
1102+		'src/thread/__unmapself.c',
1103+		'src/thread/__wait.c',
1104+		'src/thread/call_once.c',
1105+		'src/thread/clone.c',
1106+		'src/thread/cnd_broadcast.c',
1107+		'src/thread/cnd_destroy.c',
1108+		'src/thread/cnd_init.c',
1109+		'src/thread/cnd_signal.c',
1110+		'src/thread/cnd_timedwait.c',
1111+		'src/thread/cnd_wait.c',
1112+		'src/thread/default_attr.c',
1113+		'src/thread/lock_ptc.c',
1114+		'src/thread/mtx_destroy.c',
1115+		'src/thread/mtx_init.c',
1116+		'src/thread/mtx_lock.c',
1117+		'src/thread/mtx_timedlock.c',
1118+		'src/thread/mtx_trylock.c',
1119+		'src/thread/mtx_unlock.c',
1120+		'src/thread/pthread_atfork.c',
1121+		'src/thread/pthread_attr_destroy.c',
1122+		'src/thread/pthread_attr_get.c',
1123+		'src/thread/pthread_attr_init.c',
1124+		'src/thread/pthread_attr_setdetachstate.c',
1125+		'src/thread/pthread_attr_setguardsize.c',
1126+		'src/thread/pthread_attr_setinheritsched.c',
1127+		'src/thread/pthread_attr_setschedparam.c',
1128+		'src/thread/pthread_attr_setschedpolicy.c',
1129+		'src/thread/pthread_attr_setscope.c',
1130+		'src/thread/pthread_attr_setstack.c',
1131+		'src/thread/pthread_attr_setstacksize.c',
1132+		'src/thread/pthread_barrier_destroy.c',
1133+		'src/thread/pthread_barrier_init.c',
1134+		'src/thread/pthread_barrier_wait.c',
1135+		'src/thread/pthread_barrierattr_destroy.c',
1136+		'src/thread/pthread_barrierattr_init.c',
1137+		'src/thread/pthread_barrierattr_setpshared.c',
1138+		'src/thread/pthread_cancel.c',
1139+		'src/thread/pthread_cleanup_push.c',
1140+		'src/thread/pthread_cond_broadcast.c',
1141+		'src/thread/pthread_cond_destroy.c',
1142+		'src/thread/pthread_cond_init.c',
1143+		'src/thread/pthread_cond_signal.c',
1144+		'src/thread/pthread_cond_timedwait.c',
1145+		'src/thread/pthread_cond_wait.c',
1146+		'src/thread/pthread_condattr_destroy.c',
1147+		'src/thread/pthread_condattr_init.c',
1148+		'src/thread/pthread_condattr_setclock.c',
1149+		'src/thread/pthread_condattr_setpshared.c',
1150+		'src/thread/pthread_create.c',
1151+		'src/thread/pthread_detach.c',
1152+		'src/thread/pthread_equal.c',
1153+		'src/thread/pthread_getattr_np.c',
1154+		'src/thread/pthread_getconcurrency.c',
1155+		'src/thread/pthread_getcpuclockid.c',
1156+		'src/thread/pthread_getname_np.c',
1157+		'src/thread/pthread_getschedparam.c',
1158+		'src/thread/pthread_getspecific.c',
1159+		'src/thread/pthread_join.c',
1160+		'src/thread/pthread_key_create.c',
1161+		'src/thread/pthread_kill.c',
1162+		'src/thread/pthread_mutex_consistent.c',
1163+		'src/thread/pthread_mutex_destroy.c',
1164+		'src/thread/pthread_mutex_getprioceiling.c',
1165+		'src/thread/pthread_mutex_init.c',
1166+		'src/thread/pthread_mutex_lock.c',
1167+		'src/thread/pthread_mutex_setprioceiling.c',
1168+		'src/thread/pthread_mutex_timedlock.c',
1169+		'src/thread/pthread_mutex_trylock.c',
1170+		'src/thread/pthread_mutex_unlock.c',
1171+		'src/thread/pthread_mutexattr_destroy.c',
1172+		'src/thread/pthread_mutexattr_init.c',
1173+		'src/thread/pthread_mutexattr_setprotocol.c',
1174+		'src/thread/pthread_mutexattr_setpshared.c',
1175+		'src/thread/pthread_mutexattr_setrobust.c',
1176+		'src/thread/pthread_mutexattr_settype.c',
1177+		'src/thread/pthread_once.c',
1178+		'src/thread/pthread_rwlock_destroy.c',
1179+		'src/thread/pthread_rwlock_init.c',
1180+		'src/thread/pthread_rwlock_rdlock.c',
1181+		'src/thread/pthread_rwlock_timedrdlock.c',
1182+		'src/thread/pthread_rwlock_timedwrlock.c',
1183+		'src/thread/pthread_rwlock_tryrdlock.c',
1184+		'src/thread/pthread_rwlock_trywrlock.c',
1185+		'src/thread/pthread_rwlock_unlock.c',
1186+		'src/thread/pthread_rwlock_wrlock.c',
1187+		'src/thread/pthread_rwlockattr_destroy.c',
1188+		'src/thread/pthread_rwlockattr_init.c',
1189+		'src/thread/pthread_rwlockattr_setpshared.c',
1190+		'src/thread/pthread_self.c',
1191+		'src/thread/pthread_setattr_default_np.c',
1192+		'src/thread/pthread_setcancelstate.c',
1193+		'src/thread/pthread_setcanceltype.c',
1194+		'src/thread/pthread_setconcurrency.c',
1195+		'src/thread/pthread_setname_np.c',
1196+		'src/thread/pthread_setschedparam.c',
1197+		'src/thread/pthread_setschedprio.c',
1198+		'src/thread/pthread_setspecific.c',
1199+		'src/thread/pthread_sigmask.c',
1200+		'src/thread/pthread_spin_destroy.c',
1201+		'src/thread/pthread_spin_init.c',
1202+		'src/thread/pthread_spin_lock.c',
1203+		'src/thread/pthread_spin_trylock.c',
1204+		'src/thread/pthread_spin_unlock.c',
1205+		'src/thread/pthread_testcancel.c',
1206+		'src/thread/sem_destroy.c',
1207+		'src/thread/sem_getvalue.c',
1208+		'src/thread/sem_init.c',
1209+		'src/thread/sem_open.c',
1210+		'src/thread/sem_post.c',
1211+		'src/thread/sem_timedwait.c',
1212+		'src/thread/sem_trywait.c',
1213+		'src/thread/sem_unlink.c',
1214+		'src/thread/sem_wait.c',
1215+		'src/thread/synccall.c',
1216+		'src/thread/syscall_cp.c',
1217+		'src/thread/thrd_create.c',
1218+		'src/thread/thrd_exit.c',
1219+		'src/thread/thrd_join.c',
1220+		'src/thread/thrd_sleep.c',
1221+		'src/thread/thrd_yield.c',
1222+		'src/thread/tls.c',
1223+		'src/thread/tss_create.c',
1224+		'src/thread/tss_delete.c',
1225+		'src/thread/tss_set.c',
1226+		'src/thread/vmlock.c',
1227+		'src/time/__map_file.c',
1228+		'src/time/__month_to_secs.c',
1229+		'src/time/__secs_to_tm.c',
1230+		'src/time/__tm_to_secs.c',
1231+		'src/time/__tz.c',
1232+		'src/time/__year_to_secs.c',
1233+		'src/time/asctime.c',
1234+		'src/time/asctime_r.c',
1235+		'src/time/clock.c',
1236+		'src/time/clock_getcpuclockid.c',
1237+		'src/time/clock_getres.c',
1238+		'src/time/clock_gettime.c',
1239+		'src/time/clock_nanosleep.c',
1240+		'src/time/clock_settime.c',
1241+		'src/time/ctime.c',
1242+		'src/time/ctime_r.c',
1243+		'src/time/difftime.c',
1244+		'src/time/ftime.c',
1245+		'src/time/getdate.c',
1246+		'src/time/gettimeofday.c',
1247+		'src/time/gmtime.c',
1248+		'src/time/gmtime_r.c',
1249+		'src/time/localtime.c',
1250+		'src/time/localtime_r.c',
1251+		'src/time/mktime.c',
1252+		'src/time/nanosleep.c',
1253+		'src/time/strftime.c',
1254+		'src/time/strptime.c',
1255+		'src/time/time.c',
1256+		'src/time/timegm.c',
1257+		'src/time/timer_create.c',
1258+		'src/time/timer_delete.c',
1259+		'src/time/timer_getoverrun.c',
1260+		'src/time/timer_gettime.c',
1261+		'src/time/timer_settime.c',
1262+		'src/time/times.c',
1263+		'src/time/timespec_get.c',
1264+		'src/time/utime.c',
1265+		'src/time/wcsftime.c',
1266+		'src/unistd/_exit.c',
1267+		'src/unistd/access.c',
1268+		'src/unistd/acct.c',
1269+		'src/unistd/alarm.c',
1270+		'src/unistd/chdir.c',
1271+		'src/unistd/chown.c',
1272+		'src/unistd/close.c',
1273+		'src/unistd/ctermid.c',
1274+		'src/unistd/dup.c',
1275+		'src/unistd/dup2.c',
1276+		'src/unistd/dup3.c',
1277+		'src/unistd/faccessat.c',
1278+		'src/unistd/fchdir.c',
1279+		'src/unistd/fchown.c',
1280+		'src/unistd/fchownat.c',
1281+		'src/unistd/fdatasync.c',
1282+		'src/unistd/fsync.c',
1283+		'src/unistd/ftruncate.c',
1284+		'src/unistd/getcwd.c',
1285+		'src/unistd/getegid.c',
1286+		'src/unistd/geteuid.c',
1287+		'src/unistd/getgid.c',
1288+		'src/unistd/getgroups.c',
1289+		'src/unistd/gethostname.c',
1290+		'src/unistd/getlogin.c',
1291+		'src/unistd/getlogin_r.c',
1292+		'src/unistd/getpgid.c',
1293+		'src/unistd/getpgrp.c',
1294+		'src/unistd/getpid.c',
1295+		'src/unistd/getppid.c',
1296+		'src/unistd/getsid.c',
1297+		'src/unistd/getuid.c',
1298+		'src/unistd/isatty.c',
1299+		'src/unistd/lchown.c',
1300+		'src/unistd/link.c',
1301+		'src/unistd/linkat.c',
1302+		'src/unistd/lseek.c',
1303+		'src/unistd/nice.c',
1304+		'src/unistd/pause.c',
1305+		'src/unistd/pipe.c',
1306+		'src/unistd/pipe2.c',
1307+		'src/unistd/posix_close.c',
1308+		'src/unistd/pread.c',
1309+		'src/unistd/preadv.c',
1310+		'src/unistd/pwrite.c',
1311+		'src/unistd/pwritev.c',
1312+		'src/unistd/read.c',
1313+		'src/unistd/readlink.c',
1314+		'src/unistd/readlinkat.c',
1315+		'src/unistd/readv.c',
1316+		'src/unistd/renameat.c',
1317+		'src/unistd/rmdir.c',
1318+		'src/unistd/setegid.c',
1319+		'src/unistd/seteuid.c',
1320+		'src/unistd/setgid.c',
1321+		'src/unistd/setpgid.c',
1322+		'src/unistd/setpgrp.c',
1323+		'src/unistd/setregid.c',
1324+		'src/unistd/setresgid.c',
1325+		'src/unistd/setresuid.c',
1326+		'src/unistd/setreuid.c',
1327+		'src/unistd/setsid.c',
1328+		'src/unistd/setuid.c',
1329+		'src/unistd/setxid.c',
1330+		'src/unistd/sleep.c',
1331+		'src/unistd/symlink.c',
1332+		'src/unistd/symlinkat.c',
1333+		'src/unistd/sync.c',
1334+		'src/unistd/tcgetpgrp.c',
1335+		'src/unistd/tcsetpgrp.c',
1336+		'src/unistd/truncate.c',
1337+		'src/unistd/ttyname.c',
1338+		'src/unistd/ttyname_r.c',
1339+		'src/unistd/ualarm.c',
1340+		'src/unistd/unlink.c',
1341+		'src/unistd/unlinkat.c',
1342+		'src/unistd/usleep.c',
1343+		'src/unistd/write.c',
1344+		'src/unistd/writev.c',
1345+		'src/malloc/mallocng/aligned_alloc.c',
1346+		'src/malloc/mallocng/donate.c',
1347+		'src/malloc/mallocng/free.c',
1348+		'src/malloc/mallocng/malloc.c',
1349+		'src/malloc/mallocng/malloc_usable_size.c',
1350+		'src/malloc/mallocng/realloc.c',
1351+	},
1352+	hdrs={
1353+		-- <cd src/include && printf "\t\t'%s',\n" *.h */*.h
1354+		'aio.h',
1355+		'alloca.h',
1356+		'ar.h',
1357+		'assert.h',
1358+		'byteswap.h',
1359+		'complex.h',
1360+		'cpio.h',
1361+		'crypt.h',
1362+		'ctype.h',
1363+		'dirent.h',
1364+		'dlfcn.h',
1365+		'elf.h',
1366+		'endian.h',
1367+		'err.h',
1368+		'errno.h',
1369+		'fcntl.h',
1370+		'features.h',
1371+		'fenv.h',
1372+		'float.h',
1373+		'fmtmsg.h',
1374+		'fnmatch.h',
1375+		'ftw.h',
1376+		'getopt.h',
1377+		'glob.h',
1378+		'grp.h',
1379+		'iconv.h',
1380+		'ifaddrs.h',
1381+		'inttypes.h',
1382+		'iso646.h',
1383+		'langinfo.h',
1384+		'lastlog.h',
1385+		'libgen.h',
1386+		'libintl.h',
1387+		'limits.h',
1388+		'link.h',
1389+		'locale.h',
1390+		'malloc.h',
1391+		'math.h',
1392+		'memory.h',
1393+		'mntent.h',
1394+		'monetary.h',
1395+		'mqueue.h',
1396+		'netdb.h',
1397+		'nl_types.h',
1398+		'paths.h',
1399+		'poll.h',
1400+		'pthread.h',
1401+		'pty.h',
1402+		'pwd.h',
1403+		'regex.h',
1404+		'resolv.h',
1405+		'sched.h',
1406+		'search.h',
1407+		'semaphore.h',
1408+		'setjmp.h',
1409+		'shadow.h',
1410+		'signal.h',
1411+		'spawn.h',
1412+		'stdalign.h',
1413+		'stdarg.h',
1414+		'stdbool.h',
1415+		'stdc-predef.h',
1416+		'stddef.h',
1417+		'stdint.h',
1418+		'stdio.h',
1419+		'stdio_ext.h',
1420+		'stdlib.h',
1421+		'stdnoreturn.h',
1422+		'string.h',
1423+		'strings.h',
1424+		'stropts.h',
1425+		'syscall.h',
1426+		'sysexits.h',
1427+		'syslog.h',
1428+		'tar.h',
1429+		'termios.h',
1430+		'tgmath.h',
1431+		'threads.h',
1432+		'time.h',
1433+		'uchar.h',
1434+		'ucontext.h',
1435+		'ulimit.h',
1436+		'unistd.h',
1437+		'utime.h',
1438+		'utmp.h',
1439+		'utmpx.h',
1440+		'values.h',
1441+		'wait.h',
1442+		'wchar.h',
1443+		'wctype.h',
1444+		'wordexp.h',
1445+		'arpa/ftp.h',
1446+		'arpa/inet.h',
1447+		'arpa/nameser.h',
1448+		'arpa/nameser_compat.h',
1449+		'arpa/telnet.h',
1450+		'arpa/tftp.h',
1451+		'net/ethernet.h',
1452+		'net/if.h',
1453+		'net/if_arp.h',
1454+		'net/route.h',
1455+		'netinet/ether.h',
1456+		'netinet/icmp6.h',
1457+		'netinet/if_ether.h',
1458+		'netinet/igmp.h',
1459+		'netinet/in.h',
1460+		'netinet/in_systm.h',
1461+		'netinet/ip.h',
1462+		'netinet/ip6.h',
1463+		'netinet/ip_icmp.h',
1464+		'netinet/tcp.h',
1465+		'netinet/udp.h',
1466+		'netpacket/packet.h',
1467+		'scsi/scsi.h',
1468+		'scsi/scsi_ioctl.h',
1469+		'scsi/sg.h',
1470+		'sys/acct.h',
1471+		'sys/auxv.h',
1472+		'sys/cachectl.h',
1473+		'sys/dir.h',
1474+		'sys/epoll.h',
1475+		'sys/errno.h',
1476+		'sys/eventfd.h',
1477+		'sys/fanotify.h',
1478+		'sys/fcntl.h',
1479+		'sys/file.h',
1480+		'sys/fsuid.h',
1481+		'sys/inotify.h',
1482+		'sys/io.h',
1483+		'sys/ioctl.h',
1484+		'sys/ipc.h',
1485+		'sys/kd.h',
1486+		'sys/klog.h',
1487+		'sys/membarrier.h',
1488+		'sys/mman.h',
1489+		'sys/mount.h',
1490+		'sys/msg.h',
1491+		'sys/mtio.h',
1492+		'sys/param.h',
1493+		'sys/personality.h',
1494+		'sys/poll.h',
1495+		'sys/prctl.h',
1496+		'sys/procfs.h',
1497+		'sys/ptrace.h',
1498+		'sys/quota.h',
1499+		'sys/random.h',
1500+		'sys/reboot.h',
1501+		'sys/reg.h',
1502+		'sys/resource.h',
1503+		'sys/select.h',
1504+		'sys/sem.h',
1505+		'sys/sendfile.h',
1506+		'sys/shm.h',
1507+		'sys/signal.h',
1508+		'sys/signalfd.h',
1509+		'sys/socket.h',
1510+		'sys/soundcard.h',
1511+		'sys/stat.h',
1512+		'sys/statfs.h',
1513+		'sys/statvfs.h',
1514+		'sys/stropts.h',
1515+		'sys/swap.h',
1516+		'sys/syscall.h',
1517+		'sys/sysinfo.h',
1518+		'sys/syslog.h',
1519+		'sys/sysmacros.h',
1520+		'sys/termios.h',
1521+		'sys/time.h',
1522+		'sys/timeb.h',
1523+		'sys/timerfd.h',
1524+		'sys/times.h',
1525+		'sys/timex.h',
1526+		'sys/ttydefaults.h',
1527+		'sys/types.h',
1528+		'sys/ucontext.h',
1529+		'sys/uio.h',
1530+		'sys/un.h',
1531+		'sys/user.h',
1532+		'sys/utsname.h',
1533+		'sys/vfs.h',
1534+		'sys/vt.h',
1535+		'sys/wait.h',
1536+		'sys/xattr.h',
1537+	},
1538+	bits={
1539+		-- <cd src/arch/generic/bits && printf "\t\t'%s',\n" *.h
1540+		'dirent.h',
1541+		'errno.h',
1542+		'fcntl.h',
1543+		'fenv.h',
1544+		'hwcap.h',
1545+		'io.h',
1546+		'ioctl.h',
1547+		'ioctl_fix.h',
1548+		'ipc.h',
1549+		'ipcstat.h',
1550+		'kd.h',
1551+		'limits.h',
1552+		'link.h',
1553+		'mman.h',
1554+		'msg.h',
1555+		'poll.h',
1556+		'ptrace.h',
1557+		'resource.h',
1558+		'sem.h',
1559+		'shm.h',
1560+		'socket.h',
1561+		'soundcard.h',
1562+		'statfs.h',
1563+		'termios.h',
1564+		'vt.h',
1565+	},
1566+}
+128, -0
  1@@ -0,0 +1,128 @@
  2+local arch = config.target.platform:match('[^-]*')
  3+set('cflags_auto', {
  4+	'-fomit-frame-pointer',
  5+	'-fno-unwind-tables',
  6+	'-fno-asynchronous-unwind-tables',
  7+	'-ffunction-sections',
  8+	'-fdata-sections',
  9+})
 10+set('cflags_c99fse', {
 11+	'-std=c99',
 12+	'-nostdinc',
 13+	'-ffreestanding',
 14+	'-fexcess-precision=standard',
 15+	'-frounding-math',
 16+	'-Wa,--noexecstack',
 17+})
 18+set('cflags_nossp', '-fno-stack-protector')
 19+set('cflags_memops', '-fno-tree-loop-distribute-patterns')
 20+cflags{
 21+	'$cflags_auto',
 22+	'$cflags_c99fse',
 23+	'-Wno-return-local-addr',
 24+	'-fPIC',
 25+	'-D _XOPEN_SOURCE=700',
 26+	'-I $srcdir/arch/'..arch,
 27+	'-I $srcdir/arch/generic',
 28+	'-I $outdir',
 29+	'-I $srcdir/src/include',
 30+	'-I $srcdir/src/internal',
 31+	'-I $outdir/include',
 32+}
 33+set('ldflags', {
 34+	'$ldflags',
 35+	'-Wl,--sort-section,alignment',
 36+	'-Wl,--sort-common',
 37+	'-Wl,--gc-sections',
 38+	'-Wl,--hash-style=both',
 39+	'-Wl,--no-undefined',
 40+	'-Wl,--exclude-libs=ALL',
 41+	'-Wl,--dynamic-list=$srcdir/dynamic.list',
 42+})
 43+
 44+local basefiles = load('base.lua')
 45+local archfiles = load(arch..'.lua')
 46+
 47+local bits = {}
 48+for _, hdr in ipairs(archfiles.bits) do
 49+	archfiles.bits[hdr] = true
 50+end
 51+for _, hdr in ipairs(basefiles.bits) do
 52+	if not archfiles.bits[hdr] then
 53+		table.insert(bits, hdr)
 54+	end
 55+end
 56+
 57+pkg.hdrs = {
 58+	copy('$outdir/include', '$srcdir/include', basefiles.hdrs),
 59+	copy('$outdir/include/bits', '$srcdir/arch/'..arch..'/bits', archfiles.bits),
 60+	copy('$outdir/include/bits', '$srcdir/arch/generic/bits', bits),
 61+	'$outdir/include/bits/alltypes.h',
 62+	'$outdir/include/bits/syscall.h',
 63+	install=true,
 64+}
 65+pkg.deps = {
 66+	'$gendir/headers',
 67+	'$outdir/version.h',
 68+}
 69+
 70+build('sed', '$outdir/include/bits/alltypes.h', {
 71+	'$srcdir/arch/'..arch..'/bits/alltypes.h.in',
 72+	'$srcdir/include/alltypes.h.in',
 73+	'|', '$srcdir/tools/mkalltypes.sed',
 74+}, {expr='-f $srcdir/tools/mkalltypes.sed'})
 75+
 76+build('sed', '$outdir/include/bits/syscall.h', {'$srcdir/arch/'..arch..'/bits/syscall.h.in'}, {
 77+	expr=[[-n -e 'p;s,__NR_,SYS_,p']],
 78+})
 79+
 80+build('awk', '$outdir/version.h', '$dir/ver', {expr=[['{printf "#define VERSION \"%s\"\n", $$1}']]})
 81+
 82+local srcs, objs = {}, {}
 83+for src in iterstrings{basefiles.srcs, archfiles.srcs} do
 84+	srcs[src:match('(.*)%.'):gsub('/'..arch..'/', '/', 1)] = src
 85+end
 86+local specialcflags = {
 87+	-- src/Makefile:/^MEMOPS_OBJS
 88+	-- src/Makefile:/^NOSSP_OBJS
 89+	__init_tls='$cflags $cflags_nossp',
 90+	__libc_start_main='$cflags $cflags_nossp',
 91+	__set_thread_area='$cflags $cflags_nossp',
 92+	__stack_chk_fail='$cflags $cflags_nossp',
 93+	memcpy='$cflags $cflags_memops $cflags_nossp',
 94+	memmove='$cflags $cflags_memops',
 95+	memset='$cflags $cflags_memops $cflags_nossp',
 96+	memcmp='$cflags $cflags_memops',
 97+}
 98+for _, src in pairs(srcs) do
 99+	table.insert(objs, cc(src, nil, {cflags=specialcflags[src:match('([^/]*)%.[^/.]*$')]}))
100+end
101+table.sort(objs)
102+
103+ar('libc.a', objs)
104+file('lib/libc.a', '644', '$outdir/libc.a')
105+exe('libc.so', {'ldso/dlstart.c', 'ldso/dynlink.c', objs}, nil, {
106+	cflags='$cflags $cflags_nossp',
107+	ldflags='$ldflags -nostdlib -shared -Wl,-e,_dlstart',
108+	ldlibs='-lgcc',
109+})
110+file('lib/libc.so', '755', '$outdir/libc.so')
111+sym('lib/ld-musl-'..arch..'.so.1', 'libc.so')
112+sym('bin/ldd', '../lib/libc.so')
113+
114+for _, lib in ipairs{'libm.a', 'librt.a', 'libpthread.a', 'libcrypt.a', 'libutil.a', 'libxnet.a', 'libresolv.a', 'libdl.a'} do
115+	ar(lib, {})
116+	file('lib/'..lib, '644', '$outdir/'..lib)
117+end
118+
119+local startfiles = {'$outdir/libc.a'}
120+for _, src in ipairs{'crt1.c', 'rcrt1.c', 'Scrt1.c', arch..'/crti.s', arch..'/crtn.s'} do
121+	local obj = src:gsub('.-(%w*)%.[cs]$', '%1.o')
122+	local out = '$outdir/'..obj
123+	build('cc', out, {'$srcdir/crt/'..src, '|', '$gendir/deps'}, {cflags='$cflags $cflags_nossp'})
124+	file('lib/'..obj, '644', out)
125+	table.insert(startfiles, out)
126+end
127+phony('startfiles', startfiles)
128+
129+fetch 'git'
+112, -0
  1@@ -0,0 +1,112 @@
  2+From 9b972aaf435f15ce82b9f3dc006877d6cdd04592 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Thu, 30 Sep 2021 22:21:25 -0700
  5+Subject: [PATCH] avoid inline functions involving long double in math.h
  6+
  7+---
  8+ include/math.h               | 11 ++++++-----
  9+ src/math/__isgreaterequall.c |  6 ++++++
 10+ src/math/__isgreaterl.c      |  6 ++++++
 11+ src/math/__islessequall.c    |  6 ++++++
 12+ src/math/__islessgreaterl.c  |  6 ++++++
 13+ src/math/__islessl.c         |  6 ++++++
 14+ 6 files changed, 36 insertions(+), 5 deletions(-)
 15+ create mode 100644 src/math/__isgreaterequall.c
 16+ create mode 100644 src/math/__isgreaterl.c
 17+ create mode 100644 src/math/__islessequall.c
 18+ create mode 100644 src/math/__islessgreaterl.c
 19+ create mode 100644 src/math/__islessl.c
 20+
 21+diff --git a/include/math.h b/include/math.h
 22+index 14f28ec8..0286fba4 100644
 23+--- a/include/math.h
 24++++ b/include/math.h
 25+@@ -107,19 +107,20 @@ static __inline int __is##rel(type __x, type __y) \
 26+ 
 27+ __ISREL_DEF(lessf, <, float_t)
 28+ __ISREL_DEF(less, <, double_t)
 29+-__ISREL_DEF(lessl, <, long double)
 30+ __ISREL_DEF(lessequalf, <=, float_t)
 31+ __ISREL_DEF(lessequal, <=, double_t)
 32+-__ISREL_DEF(lessequall, <=, long double)
 33+ __ISREL_DEF(lessgreaterf, !=, float_t)
 34+ __ISREL_DEF(lessgreater, !=, double_t)
 35+-__ISREL_DEF(lessgreaterl, !=, long double)
 36+ __ISREL_DEF(greaterf, >, float_t)
 37+ __ISREL_DEF(greater, >, double_t)
 38+-__ISREL_DEF(greaterl, >, long double)
 39+ __ISREL_DEF(greaterequalf, >=, float_t)
 40+ __ISREL_DEF(greaterequal, >=, double_t)
 41+-__ISREL_DEF(greaterequall, >=, long double)
 42++
 43++int __islessl(long double, long double);
 44++int __islessequall(long double, long double);
 45++int __islessgreaterl(long double, long double);
 46++int __isgreaterl(long double, long double);
 47++int __isgreaterequall(long double, long double);
 48+ 
 49+ #define __tg_pred_2(x, y, p) ( \
 50+ 	sizeof((x)+(y)) == sizeof(float) ? p##f(x, y) : \
 51+diff --git a/src/math/__isgreaterequall.c b/src/math/__isgreaterequall.c
 52+new file mode 100644
 53+index 00000000..2d014213
 54+--- /dev/null
 55++++ b/src/math/__isgreaterequall.c
 56+@@ -0,0 +1,6 @@
 57++#include <math.h>
 58++
 59++int __isgreaterequall(long double x, long double y)
 60++{
 61++	return !isunordered(x, y) && x >= y;
 62++}
 63+diff --git a/src/math/__isgreaterl.c b/src/math/__isgreaterl.c
 64+new file mode 100644
 65+index 00000000..835fe575
 66+--- /dev/null
 67++++ b/src/math/__isgreaterl.c
 68+@@ -0,0 +1,6 @@
 69++#include <math.h>
 70++
 71++int __isgreaterl(long double x, long double y)
 72++{
 73++	return !isunordered(x, y) && x > y;
 74++}
 75+diff --git a/src/math/__islessequall.c b/src/math/__islessequall.c
 76+new file mode 100644
 77+index 00000000..3534ab5b
 78+--- /dev/null
 79++++ b/src/math/__islessequall.c
 80+@@ -0,0 +1,6 @@
 81++#include <math.h>
 82++
 83++int __islessequall(long double x, long double y)
 84++{
 85++	return !isunordered(x, y) && x <= y;
 86++}
 87+diff --git a/src/math/__islessgreaterl.c b/src/math/__islessgreaterl.c
 88+new file mode 100644
 89+index 00000000..e8543384
 90+--- /dev/null
 91++++ b/src/math/__islessgreaterl.c
 92+@@ -0,0 +1,6 @@
 93++#include <math.h>
 94++
 95++int __islessgreaterl(long double x, long double y)
 96++{
 97++	return !isunordered(x, y) && x != y;
 98++}
 99+diff --git a/src/math/__islessl.c b/src/math/__islessl.c
100+new file mode 100644
101+index 00000000..27b48d0e
102+--- /dev/null
103++++ b/src/math/__islessl.c
104+@@ -0,0 +1,6 @@
105++#include <math.h>
106++
107++int __islessl(long double x, long double y)
108++{
109++	return !isunordered(x, y) && x < y;
110++}
111+-- 
112+2.32.0
113+
+37, -0
 1@@ -0,0 +1,37 @@
 2+From 3c3a5a3208341615cefc3be9383e04cab32f9bfb Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 26 Oct 2021 15:27:31 -0700
 5+Subject: [PATCH] use preferred syntactic location for epoll_event packed
 6+ attribute
 7+
 8+---
 9+ include/sys/epoll.h | 10 +++++-----
10+ 1 file changed, 5 insertions(+), 5 deletions(-)
11+
12+diff --git a/include/sys/epoll.h b/include/sys/epoll.h
13+index ac81a841..de4fe0e7 100644
14+--- a/include/sys/epoll.h
15++++ b/include/sys/epoll.h
16+@@ -45,14 +45,14 @@ typedef union epoll_data {
17+ 	uint64_t u64;
18+ } epoll_data_t;
19+ 
20+-struct epoll_event {
21+-	uint32_t events;
22+-	epoll_data_t data;
23+-}
24++struct
25+ #ifdef __x86_64__
26+ __attribute__ ((__packed__))
27+ #endif
28+-;
29++epoll_event {
30++	uint32_t events;
31++	epoll_data_t data;
32++};
33+ 
34+ 
35+ int epoll_create(int);
36+-- 
37+2.32.0
38+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit f5f55d6589940fd2c2188d76686efe3a530e64e0
+1, -0
1@@ -0,0 +1 @@
2+1.2.4 r0
+70, -0
 1@@ -0,0 +1,70 @@
 2+return {
 3+	srcs={
 4+		-- <cd src && printf "\t\t'%s',\n" src/*/x86_64/*.[csS]
 5+		'src/fenv/x86_64/fenv.s',
 6+		'src/ldso/x86_64/dlsym.s',
 7+		'src/ldso/x86_64/tlsdesc.s',
 8+		'src/math/x86_64/__invtrigl.s',
 9+		'src/math/x86_64/acosl.s',
10+		'src/math/x86_64/asinl.s',
11+		'src/math/x86_64/atan2l.s',
12+		'src/math/x86_64/atanl.s',
13+		'src/math/x86_64/ceill.s',
14+		'src/math/x86_64/exp2l.s',
15+		'src/math/x86_64/expl.s',
16+		'src/math/x86_64/expm1l.s',
17+		'src/math/x86_64/fabs.c',
18+		'src/math/x86_64/fabsf.c',
19+		'src/math/x86_64/fabsl.c',
20+		'src/math/x86_64/floorl.s',
21+		'src/math/x86_64/fma.c',
22+		'src/math/x86_64/fmaf.c',
23+		'src/math/x86_64/fmodl.c',
24+		'src/math/x86_64/llrint.c',
25+		'src/math/x86_64/llrintf.c',
26+		'src/math/x86_64/llrintl.c',
27+		'src/math/x86_64/log10l.s',
28+		'src/math/x86_64/log1pl.s',
29+		'src/math/x86_64/log2l.s',
30+		'src/math/x86_64/logl.s',
31+		'src/math/x86_64/lrint.c',
32+		'src/math/x86_64/lrintf.c',
33+		'src/math/x86_64/lrintl.c',
34+		'src/math/x86_64/remainderl.c',
35+		'src/math/x86_64/remquol.c',
36+		'src/math/x86_64/rintl.c',
37+		'src/math/x86_64/sqrt.c',
38+		'src/math/x86_64/sqrtf.c',
39+		'src/math/x86_64/sqrtl.c',
40+		'src/math/x86_64/truncl.s',
41+		'src/process/x86_64/vfork.s',
42+		'src/setjmp/x86_64/longjmp.s',
43+		'src/setjmp/x86_64/setjmp.s',
44+		'src/signal/x86_64/restore.s',
45+		'src/signal/x86_64/sigsetjmp.s',
46+		'src/string/x86_64/memcpy.s',
47+		'src/string/x86_64/memmove.s',
48+		'src/string/x86_64/memset.s',
49+		'src/thread/x86_64/__set_thread_area.s',
50+		'src/thread/x86_64/__unmapself.s',
51+		'src/thread/x86_64/clone.s',
52+		'src/thread/x86_64/syscall_cp.s',
53+	},
54+	bits={
55+		-- <cd src/arch/x86_64/bits && printf "\t\t'%s',\n" *.h
56+		'fenv.h',
57+		'float.h',
58+		'io.h',
59+		'limits.h',
60+		'mman.h',
61+		'posix.h',
62+		'ptrace.h',
63+		'reg.h',
64+		'sem.h',
65+		'setjmp.h',
66+		'signal.h',
67+		'stat.h',
68+		'stdint.h',
69+		'user.h',
70+	},
71+}
+1, -0
1@@ -0,0 +1 @@
2+/tools.ninja
+143, -0
  1@@ -0,0 +1,143 @@
  2+cflags{
  3+	'-Wall', '-Wpedantic',
  4+	'-D _XOPEN_SOURCE=700',
  5+	'-D TERMINFO_DB',
  6+	([[-D '_PATH_TERMINFO="%s/share/misc/terminfo"']]):format(config.prefix),
  7+	'-I $srcdir/compat',
  8+	'-I $srcdir/lib/libcurses',
  9+	'-I $srcdir/lib/libterminfo',
 10+	'-I $srcdir/lib/libform',
 11+	'-I $srcdir/lib/libmenu',
 12+	'-I $srcdir/lib/libpanel',
 13+	'-I $outdir',
 14+}
 15+
 16+sub('tools.ninja', function()
 17+	toolchain(config.host)
 18+	cflags{
 19+		'-I $srcdir/compat',
 20+		'-I $srcdir/lib/libterminfo',
 21+	}
 22+	set('outdir', '$outdir/host')
 23+
 24+	cc('compat/mi_vector_hash.c')
 25+	build('cc', '$outdir/hash.c.o', '$outdir/../hash.c')
 26+
 27+	exe('nbperf', [[
 28+		usr.bin/nbperf/(
 29+			nbperf.c
 30+			nbperf-bdz.c nbperf-chm.c nbperf-chm3.c
 31+			graph2.c graph3.c
 32+		)
 33+		compat/mi_vector_hash.c.o
 34+	]])
 35+
 36+	exe('tic', [[
 37+		usr.bin/tic/tic.c
 38+		lib/libterminfo/compile.c
 39+		compat/cdbw.c
 40+		compat/mi_vector_hash.c.o
 41+		hash.c.o
 42+	]])
 43+end)
 44+
 45+pkg.hdrs = {
 46+	copy('$outdir/include', '$srcdir/lib/libcurses', {'curses.h', 'unctrl.h'}),
 47+	copy('$outdir/include', '$srcdir/lib/libterminfo', {'term.h', 'termcap.h'}),
 48+	copy('$outdir/include', '$srcdir/lib/libpanel', {'panel.h'}),
 49+	install=true,
 50+}
 51+pkg.deps = {
 52+	'$outdir/compiled_terms.c',
 53+	'$outdir/termcap_hash.c',
 54+	'$outdir/hash.c',
 55+}
 56+
 57+rule('tic', '$outdir/host/tic $ticflags -o $out $in $terms')
 58+build('tic', '$outdir/compiled_terms.c', {'$srcdir/share/terminfo/terminfo', '|', '$outdir/host/tic'}, {
 59+	ticflags='-Sx',
 60+	terms='dumb',
 61+})
 62+build('tic', '$outdir/terminfo.cdb', {'$srcdir/share/terminfo/terminfo', '|', '$outdir/host/tic'}, {
 63+	ticflags='-x',
 64+})
 65+file('share/misc/terminfo.cdb', '644', '$outdir/terminfo.cdb')
 66+
 67+rule('genhash', 'TOOL_NBPERF=$outdir/host/nbperf $srcdir/lib/libterminfo/genhash $in >$out')
 68+build('genhash', '$outdir/hash.c', {
 69+	'$srcdir/lib/libterminfo/term.h',
 70+	'|', '$srcdir/lib/libterminfo/genhash', '$outdir/host/nbperf',
 71+})
 72+
 73+rule('genthash', 'TOOL_NBPERF=$outdir/host/nbperf $srcdir/lib/libterminfo/genthash $in >$out')
 74+build('genthash', '$outdir/termcap_hash.c', {
 75+	'$srcdir/lib/libterminfo/termcap_map.c',
 76+	'|', '$srcdir/lib/libterminfo/genthash', '$outdir/host/nbperf',
 77+})
 78+
 79+lib('libcurses.a', [[
 80+	lib/libcurses/(
 81+		acs.c addbytes.c addch.c addchnstr.c addnstr.c attributes.c
 82+		background.c bell.c border.c box.c chgat.c clear.c clearok.c
 83+		clrtobot.c clrtoeol.c color.c copywin.c cr_put.c
 84+		ctrace.c cur_hash.c curs_set.c
 85+		curses.c delch.c deleteln.c delwin.c echochar.c erase.c fileio.c
 86+		flushok.c fullname.c getch.c getstr.c getyx.c id_subwins.c idlok.c
 87+		idcok.c immedok.c inch.c inchstr.c initscr.c insch.c insdelln.c
 88+		insertln.c insstr.c instr.c keypad.c keyname.c leaveok.c line.c
 89+		meta.c mouse.c move.c
 90+		mvwin.c newwin.c nodelay.c notimeout.c overlay.c overwrite.c pause.c
 91+		printw.c putchar.c refresh.c resize.c ripoffline.c scanw.c screen.c
 92+		scroll.c scrollok.c setterm.c slk.c standout.c syncok.c timeout.c
 93+		toucholap.c touchwin.c tstp.c tty.c unctrl.c underscore.c version.c
 94+
 95+		cchar.c add_wch.c add_wchstr.c addwstr.c echo_wchar.c ins_wch.c
 96+		ins_wstr.c get_wch.c get_wstr.c in_wch.c in_wchstr.c
 97+		inwstr.c
 98+	)
 99+	libterminfo.a
100+]])
101+file('lib/libcurses.a', '644', '$outdir/libcurses.a')
102+
103+lib('libterminfo.a', [[
104+	lib/libterminfo/(
105+		term.c ti.c setupterm.c curterm.c tparm.c tputs.c
106+		compile.c
107+		termcap.c
108+	)
109+	compat/cdbr.c
110+	compat/mi_vector_hash.c
111+	$outdir/hash.c
112+]])
113+file('lib/libterminfo.a', '644', '$outdir/libterminfo.a')
114+
115+lib('libpanel.a', [[
116+	lib/libpanel/(
117+		_deck.c above.c below.c bottom.c del.c getuser.c hidden.c hide.c move.c
118+		new.c replace.c setuser.c show.c top.c update.c window.c
119+	)
120+	libcurses.a.d
121+]])
122+file('lib/libpanel.a', '644', '$outdir/libpanel.a')
123+
124+exe('infocmp', [[usr.bin/infocmp/infocmp.c libterminfo.a]])
125+file('bin/infocmp', '755', '$outdir/infocmp')
126+exe('tabs', [[usr.bin/tabs/tabs.c libterminfo.a]])
127+file('bin/tabs', '755', '$outdir/tabs')
128+exe('tic', [[usr.bin/tic/tic.c compat/cdbw.c libterminfo.a]])
129+file('bin/tic', '755', '$outdir/tic')
130+exe('tput', [[usr.bin/tput/tput.c libterminfo.a]])
131+file('bin/tput', '755', '$outdir/tput')
132+exe('tset',  [[usr.bin/tset/(map.c misc.c set.c term.c tset.c) libterminfo.a]])
133+file('bin/tset', '755', '$outdir/tset')
134+sym('bin/reset', 'tset')
135+
136+man{
137+	'usr.bin/infocmp/infocmp.1',
138+	'usr.bin/tabs/tabs.1',
139+	'usr.bin/tic/tic.1',
140+	'usr.bin/tput/tput.1',
141+	'usr.bin/tset/tset.1',
142+}
143+
144+fetch 'git'
+33, -0
 1@@ -0,0 +1,33 @@
 2+From 9c2c3bd4d21bf5f55c2e8a41c8253d152f7ba2f5 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sat, 29 May 2021 21:45:58 -0700
 5+Subject: [PATCH] Use __fpurge from stdio_ext.h
 6+
 7+---
 8+ lib/libcurses/tty.c | 3 ++-
 9+ 1 file changed, 2 insertions(+), 1 deletion(-)
10+
11+diff --git a/lib/libcurses/tty.c b/lib/libcurses/tty.c
12+index b022ba6..b5e4506 100644
13+--- a/lib/libcurses/tty.c
14++++ b/lib/libcurses/tty.c
15+@@ -34,6 +34,7 @@
16+ #include <sys/types.h>
17+ 
18+ #include <fcntl.h>
19++#include <stdio_ext.h>
20+ #include <stdlib.h>
21+ #include <termios.h>
22+ #include <unistd.h>
23+@@ -597,7 +598,7 @@ int
24+ flushinp(void)
25+ {
26+ 
27+-	(void)fpurge(_cursesi_screen->infd);
28++	(void)__fpurge(_cursesi_screen->infd);
29+ 	return OK;
30+ }
31+ 
32+-- 
33+2.31.1
34+
+50, -0
 1@@ -0,0 +1,50 @@
 2+From a6d5710b0fa7d79da7addc1ba2f58b28d6823396 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 1 Jun 2021 00:24:45 -0700
 5+Subject: [PATCH] Remove duplicate keymap sequences from st terminfo
 6+
 7+Otherwise, curses has to make an arbitrary decision about which key
 8+to use when that sequence is detected.
 9+---
10+ share/terminfo/terminfo | 10 +++++-----
11+ 1 file changed, 5 insertions(+), 5 deletions(-)
12+
13+diff --git a/share/terminfo/terminfo b/share/terminfo/terminfo
14+index b70fa1c..6e1f3bb 100644
15+--- a/share/terminfo/terminfo
16++++ b/share/terminfo/terminfo
17+@@ -1398,7 +1398,7 @@ qansi-g|QNX ANSI,
18+ 	ind=\E[S, invis=\E[9m,
19+ 	is2=\E>\E[?1l\E[?7h\E[0;10;39;49m, is3=\E(B\E)0,
20+ 	kBEG=\ENn, kCAN=\E[s, kCMD=\E[t, kCPY=\ENs, kCRT=\ENt,
21+-	kDL=\ENv, kEXT=\ENw, kFND=\ENx, kHLP=\ENy, kHOM=\E[h,
22++	kEXT=\ENw, kFND=\ENx, kHLP=\ENy, kHOM=\E[h,
23+ 	kLFT=\E[d, kNXT=\E[u, kOPT=\ENz, kPRV=\E[v, kRIT=\E[c,
24+ 	kbs=^H, kcan=\E[S, kcbt=\E[Z, kclo=\ENc, kclr=\ENa,
25+ 	kcmd=\E[G, kcpy=\E[g, kctab=\E[z, kcub1=\E[D, kcud1=\E[B,
26+@@ -6701,10 +6701,10 @@ st-0.6|simpleterm 0.6,
27+ 	il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m,
28+ 	is2=\E[4l\E>\E[?1034l, kDC=\E[3;2~, kEND=\E[1;2F,
29+ 	kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D, kNXT=\E[6;2~,
30+-	kPRV=\E[5;2~, kRIT=\E[1;2C, ka1=\E[1~, ka3=\E[5~, kb2=\EOu,
31+-	kbs=^?, kc1=\E[4~, kc3=\E[6~, kcbt=\E[Z, kclr=\E[3;5~,
32++	kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOu,
33++	kbs=^?, kcbt=\E[Z, kclr=\E[3;5~,
34+ 	kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
35+-	kdch1=\E[3~, kdl1=\E[3;2~, ked=\E[1;5F, kel=\E[1;2F,
36++	kdch1=\E[3~, kdl1=\E[3;2~, ked=\E[1;5F,
37+ 	kend=\E[4~, kent=\EOM, kf1=\EOP, kf10=\E[21~, kf11=\E[23~,
38+ 	kf12=\E[24~, kf13=\E[1;2P, kf14=\E[1;2Q, kf15=\E[1;2R,
39+ 	kf16=\E[1;2S, kf17=\E[15;2~, kf18=\E[17;2~,
40+@@ -6724,7 +6724,7 @@ st-0.6|simpleterm 0.6,
41+ 	kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~,
42+ 	kf8=\E[19~, kf9=\E[20~, khome=\E[1~, kich1=\E[2~,
43+ 	kil1=\E[2;5~, kind=\E[1;2B, kmous=\E[M, knp=\E[6~,
44+-	kpp=\E[5~, kri=\E[1;2A, krmir=\E[2;2~, mc0=\E[i, mc4=\E[4i,
45++	kpp=\E[5~, kri=\E[1;2A, mc0=\E[i, mc4=\E[4i,
46+ 	mc5=\E[5i, op=\E[39;49m, rc=\E8, rev=\E[7m, ri=\EM,
47+ 	rmacs=\E(B, rmir=\E[4l, rmkx=\E[?1l\E>, rmso=\E[27m,
48+ 	rmul=\E[24m, rs1=\Ec, rs2=\E[4l\E>\E[?1034l, sc=\E7,
49+-- 
50+2.31.1
51+
+80, -0
 1@@ -0,0 +1,80 @@
 2+From 6e3a7ba743db0e7e22ef50d038690b3f1e46bba3 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 8 Jun 2021 20:00:53 -0700
 5+Subject: [PATCH] Revert "Fix for PR lib/56224"
 6+
 7+This reverts commit deeb100e95f3d981cbe4ece4744fe6c34a5a2f05.
 8+---
 9+ lib/libcurses/addbytes.c | 38 +-------------------------------------
10+ 1 file changed, 1 insertion(+), 37 deletions(-)
11+
12+diff --git a/lib/libcurses/addbytes.c b/lib/libcurses/addbytes.c
13+index a678939f..9fd917ca 100644
14+--- a/lib/libcurses/addbytes.c
15++++ b/lib/libcurses/addbytes.c
16+@@ -1,4 +1,4 @@
17+-/*	$NetBSD: addbytes.c,v 1.55 2021/06/06 05:06:44 blymn Exp $	*/
18++/*	$NetBSD: addbytes.c,v 1.54 2021/02/13 14:30:37 rillig Exp $	*/
19+ 
20+ /*
21+  * Copyright (c) 1987, 1993, 1994
22+@@ -161,15 +161,6 @@ _cursesi_waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr,
23+ 		} else if (wc == 0) {
24+ 			break;
25+ 		}
26+-
27+-		/* if scrollok is false and we are at the bottom of
28+-		 * screen and this character would take us past the
29+-		 * end of the line then we are done.
30+-		 */
31+-		if ((win->curx + n >= win->maxx) && 
32+-		    (!(win->flags & __SCROLLOK)) &&
33+-		    (win->cury == win->scr_b))
34+-			break;
35+ #ifdef DEBUG
36+ 		__CTRACE(__CTRACE_INPUT,
37+ 		    "ADDBYTES WIDE(0x%x [%s], %x) at (%d, %d), ate %d bytes\n",
38+@@ -214,19 +205,6 @@ _cursesi_addbyte(WINDOW *win, __LINE **lp, int *y, int *x, int c,
39+ 		case '\t':
40+ 			tabsize = win->screen->TABSIZE;
41+ 			newx = tabsize - (*x % tabsize);
42+-			/* if at the bottom of the window and
43+-			   not allowed to scroll then just do
44+-			   what we can */
45+-			if ((*y == win->scr_b) &&
46+-			    !(win->flags & __SCROLLOK)) {
47+-				if ((*lp)->flags & __ISPASTEOL) {
48+-					return OK;
49+-				}
50+-
51+-				if (*x + newx > win->maxx - 1)
52+-					newx = win->maxx - *x - 1;
53+-			}
54+-
55+ 			for (i = 0; i < newx; i++) {
56+ 				if (waddbytes(win, blank, 1) == ERR)
57+ 					return ERR;
58+@@ -379,20 +357,6 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x,
59+ 			cc.attributes = win->wattr;
60+ 			tabsize = win->screen->TABSIZE;
61+ 			newx = tabsize - (*x % tabsize);
62+-
63+-			/* if at the bottom of the window and
64+-			   not allowed to scroll then just do
65+-			   what we can */
66+-			if ((*y == win->scr_b) &&
67+-			    !(win->flags & __SCROLLOK)) {
68+-				if ((*lnp)->flags & __ISPASTEOL) {
69+-					return OK;
70+-				}
71+-
72+-				if (*x + newx > win->maxx - 1)
73+-					newx = win->maxx - *x - 1;
74+-			}
75+-
76+ 			for (i = 0; i < newx; i++) {
77+ 				if (wadd_wch(win, &cc) == ERR)
78+ 					return ERR;
79+-- 
80+2.31.1
81+
+119, -0
  1@@ -0,0 +1,119 @@
  2+From de7a1acf3168a35c19a569cc7f6f572c39e96c82 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Thu, 3 Jun 2021 00:32:57 -0700
  5+Subject: [PATCH] Don't wrap when adding past last line in non-scrolling window
  6+
  7+X/Open curses says
  8+
  9+> If scrolling is disabled, any characters that would extend beyond
 10+> the last column of the last line are truncated.
 11+
 12+However, currently libcurses wraps the cursor back to the beginning
 13+of the last line.
 14+
 15+To fix this, when we try to add a character that would go past the
 16+end of the last line, leave the cursor where it is. If the character
 17+goes exactly to the end of the last line, add the character but set
 18+the cursor to the last column (to match ncurses behavior).
 19+
 20+[0] https://pubs.opengroup.org/onlinepubs/7908799/xcurses/intov.html#tag_001_004_002_002
 21+---
 22+ lib/libcurses/addbytes.c | 20 +++++++++++---------
 23+ 1 file changed, 11 insertions(+), 9 deletions(-)
 24+
 25+diff --git a/lib/libcurses/addbytes.c b/lib/libcurses/addbytes.c
 26+index 9fd917ca..e52dc310 100644
 27+--- a/lib/libcurses/addbytes.c
 28++++ b/lib/libcurses/addbytes.c
 29+@@ -232,8 +232,6 @@ _cursesi_addbyte(WINDOW *win, __LINE **lp, int *y, int *x, int c,
 30+ #endif
 31+ 
 32+ 	if (char_interp && ((*lp)->flags & __ISPASTEOL)) {
 33+-		*x = 0;
 34+-		(*lp)->flags &= ~__ISPASTEOL;
 35+ 		if (*y == win->scr_b) {
 36+ #ifdef DEBUG
 37+ 			__CTRACE(__CTRACE_INPUT,
 38+@@ -246,6 +244,8 @@ _cursesi_addbyte(WINDOW *win, __LINE **lp, int *y, int *x, int c,
 39+ 		} else {
 40+ 			(*y)++;
 41+ 		}
 42++		*x = 0;
 43++		(*lp)->flags &= ~__ISPASTEOL;
 44+ 		*lp = win->alines[*y];
 45+ 		if (c == '\n')
 46+ 			return OK;
 47+@@ -341,8 +341,6 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x,
 48+ 			return OK;
 49+ 		case L'\n':
 50+ 			wclrtoeol(win);
 51+-			*x = 0;
 52+-			(*lnp)->flags &= ~__ISPASTEOL;
 53+ 			if (*y == win->scr_b) {
 54+ 				if (!(win->flags & __SCROLLOK))
 55+ 					return ERR;
 56+@@ -350,6 +348,8 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x,
 57+ 			} else {
 58+ 				(*y)++;
 59+ 			}
 60++			*x = 0;
 61++			(*lnp)->flags &= ~__ISPASTEOL;
 62+ 			return OK;
 63+ 		case L'\t':
 64+ 			cc.vals[0] = L' ';
 65+@@ -395,8 +395,6 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x,
 66+ 	}
 67+ 	/* check for new line first */
 68+ 	if (char_interp && ((*lnp)->flags & __ISPASTEOL)) {
 69+-		*x = 0;
 70+-		(*lnp)->flags &= ~__ISPASTEOL;
 71+ 		if (*y == win->scr_b) {
 72+ 			if (!(win->flags & __SCROLLOK))
 73+ 				return ERR;
 74+@@ -404,6 +402,8 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x,
 75+ 		} else {
 76+ 			(*y)++;
 77+ 		}
 78++		*x = 0;
 79++		(*lnp)->flags &= ~__ISPASTEOL;
 80+ 		(*lnp) = win->alines[*y];
 81+ 		lp = &win->alines[*y]->line[*x];
 82+ 	}
 83+@@ -459,7 +459,6 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x,
 84+ 		if (newx > *(*lnp)->lastchp)
 85+ 			*(*lnp)->lastchp = newx;
 86+ 		__touchline(win, *y, sx, (int) win->maxx - 1);
 87+-		sx = *x = 0;
 88+ 		if (*y == win->scr_b) {
 89+ 			if (!(win->flags & __SCROLLOK))
 90+ 				return ERR;
 91+@@ -467,6 +466,7 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x,
 92+ 		} else {
 93+ 			(*y)++;
 94+ 		}
 95++		sx = *x = 0;
 96+ 		lp = &win->alines[*y]->line[0];
 97+ 		(*lnp) = win->alines[*y];
 98+ 	}
 99+@@ -547,14 +547,16 @@ _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x,
100+ 		if (newx > *(*lnp)->lastchp)
101+ 			*(*lnp)->lastchp = newx;
102+ 		__touchline(win, *y, sx, (int) win->maxx - 1);
103+-		*x = sx = 0;
104+ 		if (*y == win->scr_b) {
105+-			if (!(win->flags & __SCROLLOK))
106++			if (!(win->flags & __SCROLLOK)) {
107++				*x = win->maxx - 1;
108+ 				return ERR;
109++			}
110+ 			scroll(win);
111+ 		} else {
112+ 			(*y)++;
113+ 		}
114++		*x = sx = 0;
115+ 		lp = &win->alines[*y]->line[0];
116+ 		(*lnp) = win->alines[*y];
117+ 	} else {
118+-- 
119+2.31.1
120+
+28, -0
 1@@ -0,0 +1,28 @@
 2+From c977aac84ce6c6e2737a8a072cb4116b8ee4278e Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 3 Jun 2021 00:42:45 -0700
 5+Subject: [PATCH] Return early from _cursesi_waddbytes if _cursesi_addwchar
 6+ fails
 7+
 8+This error may indicate that scrolling was required in a non-scrolling
 9+window, in which case the rest of the string should be truncated.
10+---
11+ lib/libcurses/addbytes.c | 2 +-
12+ 1 file changed, 1 insertion(+), 1 deletion(-)
13+
14+diff --git a/lib/libcurses/addbytes.c b/lib/libcurses/addbytes.c
15+index e52dc310..5d783df8 100644
16+--- a/lib/libcurses/addbytes.c
17++++ b/lib/libcurses/addbytes.c
18+@@ -132,7 +132,7 @@ _cursesi_waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr,
19+ #ifdef HAVE_WCHAR
20+ 	(void)memset(&st, 0, sizeof(st));
21+ #endif
22+-	while (count > 0) {
23++	while (count > 0 && err == OK) {
24+ #ifndef HAVE_WCHAR
25+ 		c = *bytes++;
26+ #ifdef DEBUG
27+-- 
28+2.31.1
29+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 5b78297a1276a7d64c3be78d1e54251a1203a44a
+1, -0
1@@ -0,0 +1 @@
2+5b78297a12 r0
+20, -0
 1@@ -0,0 +1,20 @@
 2+cflags{
 3+	'-D _GNU_SOURCE',
 4+	'-D EMACS',
 5+	'-D SMALL',
 6+	'-D VI',
 7+	'-I $dir',
 8+}
 9+
10+exe('ksh', [[
11+	alloc.c asprintf.c c_ksh.c c_sh.c c_test.c c_ulimit.c edit.c
12+	emacs.c eval.c exec.c expr.c history.c io.c jobs.c lex.c mail.c
13+	main.c misc.c path.c shf.c syn.c table.c trap.c tree.c tty.c var.c
14+	version.c vi.c confstr.c reallocarray.c siglist.c signame.c
15+	strlcat.c strlcpy.c strtonum.c unvis.c vis.c issetugid.c
16+]])
17+file('bin/ksh', '755', '$outdir/ksh')
18+sym('bin/sh', 'ksh')
19+man{'ksh.1', 'sh.1'}
20+
21+fetch 'git'
+15, -0
 1@@ -0,0 +1,15 @@
 2+#define __dead _Noreturn
 3+#define HAVE_ASPRINTF
 4+#define HAVE_CONFSTR
 5+#define NO_CURSES
 6+#define HAVE_ISSETUGID
 7+#define HAVE_REALLOCARRAY
 8+#define HAVE_SETRESGID
 9+#define HAVE_SETRESUID
10+#define HAVE_SIG_T
11+#define HAVE_ST_MTIM
12+#define HAVE_STRLCAT
13+#define HAVE_STRLCPY
14+#define HAVE_TIMERADD
15+#define HAVE_TIMERCLEAR
16+#define HAVE_TIMERSUB
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit b4f079f3762b427b2370310de225ea338c0cdf77
+1, -0
1@@ -0,0 +1 @@
2+7.1 r0
+4, -0
1@@ -0,0 +1,4 @@
2+/nc.ninja
3+/src
4+/src.tar.gz
5+/sys.tar.gz
+34, -0
 1@@ -0,0 +1,34 @@
 2+set -e
 3+
 4+dir=$1
 5+shift
 6+
 7+cd "$dir"
 8+
 9+if [ -e src ] ; then
10+        rm -rf src
11+fi
12+
13+if ! sh "$OLDPWD/scripts/checksum.sh" -c sha256 2>/dev/null ; then
14+        curl -L -K url -O
15+        sh "$OLDPWD/scripts/checksum.sh" -c sha256
16+fi
17+
18+sh "$OLDPWD/scripts/extract.sh" src.tar.gz -s ',^,src/,' \
19+	'bin/pax/*' \
20+	'include/*' \
21+	'lib/libc/*' \
22+	'lib/libcrypto/arc4random/*' \
23+	'lib/libutil/*' \
24+	'usr.bin/diff/*' \
25+	'usr.bin/doas/*' \
26+	'usr.bin/fmt/*' \
27+	'usr.bin/m4/*' \
28+	'usr.bin/nc/*' \
29+	'usr.bin/patch/*' \
30+	'usr.bin/rsync/*' \
31+	'usr.bin/yacc/*' \
32+	'usr.sbin/acme-client/*'
33+sh "$OLDPWD/scripts/extract.sh" sys.tar.gz -s ',^,src/,' 'sys/sys/*'
34+
35+git apply -v --whitespace=nowarn --directory "$dir/src" patch/*
+105, -0
  1@@ -0,0 +1,105 @@
  2+cflags{
  3+	'-Wall', '-Wno-pointer-sign', '-Wno-maybe-uninitialized', '-Wno-attributes',
  4+	[[-D 'DEF_WEAK(n)=_Static_assert(1, "")']],
  5+	'-I $dir/include',
  6+	'-I $outdir/include',
  7+}
  8+
  9+pkg.hdrs = {
 10+	copy('$outdir/include', '$srcdir/sys', {'sys/queue.h', 'sys/tree.h', 'sys/_null.h'}),
 11+	copy('$outdir/include', '$srcdir/include', {'fts.h', 'vis.h'}),
 12+	copy('$outdir/include', '$srcdir/lib/libutil', {'ohash.h'}),
 13+}
 14+pkg.deps = {'$gendir/headers'}
 15+
 16+-- Link arc4random.c to '$outdir' so that it doesn't include the local
 17+-- arc4random.h
 18+build('copy', '$outdir/lib/libc/crypt/arc4random.c', '$srcdir/lib/libc/crypt/arc4random.c')
 19+build('copy', '$outdir/lib/libc/crypt/arc4random.h', '$srcdir/lib/libcrypto/arc4random/arc4random_linux.h')
 20+build('copy', '$outdir/lib/libc/crypt/chacha_private.h', '$srcdir/lib/libc/crypt/chacha_private.h')
 21+cc('$outdir/lib/libc/crypt/arc4random.c', {
 22+	'$outdir/lib/libc/crypt/arc4random.h',
 23+	'$outdir/lib/libc/crypt/chacha_private.h',
 24+})
 25+
 26+lib('libbsd.a', [[
 27+	lib/libc/(
 28+		crypt/(arc4random.c.o arc4random_uniform.c)
 29+		gen/(fts.c getprogname.c pwcache.c readpassphrase.c setprogname.c unvis.c vis.c warnc.c vwarnc.c)
 30+		net/base64.c
 31+		stdlib/(freezero.c recallocarray.c strtonum.c)
 32+		string/(strmode.c timingsafe_bcmp.c timingsafe_memcmp.c)
 33+	)
 34+	lib/libutil/(fmt_scaled.c ohash.c)
 35+]])
 36+file('lib/libbsd.a', '644', '$outdir/libbsd.a')
 37+
 38+-- diff
 39+exe('diff', 'usr.bin/diff/(diff.c diffdir.c diffreg.c xmalloc.c) libbsd.a')
 40+file('bin/diff', '755', '$outdir/diff')
 41+man{'usr.bin/diff/diff.1'}
 42+
 43+-- doas
 44+yacc('usr.bin/doas/parse', 'usr.bin/doas/parse.y')
 45+cc('$outdir/usr.bin/doas/parse.tab.c', nil, {cflags='$cflags -I $srcdir/usr.bin/doas'})
 46+cc('usr.bin/doas/doas.c', nil, {cflags='$cflags -D _GNU_SOURCE'})
 47+exe('doas', 'usr.bin/doas/(doas.c.o env.c parse.tab.c.o persist.c) libbsd.a')
 48+file('bin/doas', '6755', '$outdir/doas')
 49+man{'usr.bin/doas/doas.1', 'usr.bin/doas/doas.conf.5'}
 50+
 51+-- fmt
 52+file('bin/fmt', '755', exe('fmt', {'usr.bin/fmt/fmt.c', 'libbsd.a'}))
 53+man{'usr.bin/fmt/fmt.1'}
 54+
 55+-- nc
 56+sub('nc.ninja', function()
 57+	cflags{'-isystem $builddir/pkg/libtls-bearssl/include'}
 58+	exe('nc', [[
 59+		usr.bin/nc/(netcat.c atomicio.c socks.c)
 60+		$builddir/pkg/libtls-bearssl/libtls.a.d
 61+		libbsd.a
 62+	]], {'pkg/libtls-bearssl/headers'})
 63+	file('bin/nc', '755', '$outdir/nc')
 64+	man{'usr.bin/nc/nc.1'}
 65+end)
 66+
 67+-- m4
 68+yacc('usr.bin/m4/parser', 'usr.bin/m4/parser.y')
 69+cc('usr.bin/m4/tokenizer.c', {'$outdir/usr.bin/m4/parser.tab.h'}, {cflags='$cflags -I $outdir/usr.bin/m4'})
 70+exe('m4', [[
 71+	usr.bin/m4/(eval.c expr.c look.c main.c misc.c gnum4.c trace.c tokenizer.c.o)
 72+	$outdir/usr.bin/m4/parser.tab.c
 73+	libbsd.a
 74+]])
 75+file('bin/m4', '755', '$outdir/m4')
 76+man{'usr.bin/m4/m4.1'}
 77+
 78+-- patch
 79+exe('patch', 'usr.bin/patch/(patch.c pch.c inp.c util.c backupfile.c mkpath.c ed.c) libbsd.a')
 80+file('bin/patch', '755', '$outdir/patch')
 81+man{'usr.bin/patch/patch.1'}
 82+
 83+-- pax
 84+exe('pax', [[bin/pax/(
 85+	ar_io.c ar_subs.c buf_subs.c cpio.c file_subs.c ftree.c
 86+	gen_subs.c getoldopt.c options.c pat_rep.c pax.c sel_subs.c tables.c
 87+	tar.c tty_subs.c
 88+) libbsd.a]])
 89+file('bin/pax', '755', '$outdir/pax')
 90+sym('bin/tar', 'pax')
 91+sym('bin/cpio', 'pax')
 92+man{'bin/pax/pax.1', 'bin/pax/tar.1', 'bin/pax/cpio.1'}
 93+
 94+-- rsync
 95+exe('rsync', [[
 96+	usr.bin/rsync/(
 97+		blocks.c client.c copy.c downloader.c fargs.c flist.c hash.c ids.c
 98+		io.c log.c main.c md4.c misc.c mkpath.c mktemp.c receiver.c rmatch.c
 99+		rules.c sender.c server.c session.c socket.c symlinks.c uploader.c
100+	)
101+	libbsd.a
102+]])
103+file('bin/rsync', '755', '$outdir/rsync')
104+man{'usr.bin/rsync/rsync.1', 'usr.bin/rsync/rsync.5', 'usr.bin/rsync/rsyncd.5'}
105+
106+fetch 'local'
+3, -0
1@@ -0,0 +1,3 @@
2+#include_next <err.h>
3+void warnc(int, const char *, ...) __attribute__((__format__ (printf, 2, 3)));
4+void vwarnc(int, const char *, va_list) __attribute__((__format__ (printf, 2, 0)));
+4, -0
1@@ -0,0 +1,4 @@
2+#include_next <grp.h>
3+#define setgroupent(n) setgrent()
4+const char *group_from_gid(gid_t, int);
5+int gid_from_group(const char *, gid_t *);
+1, -0
1@@ -0,0 +1 @@
2+#include <endian.h>
+9, -0
 1@@ -0,0 +1,9 @@
 2+#include_next <netinet/ip.h>
 3+#define IPTOS_DSCP_CS0		0x00
 4+#define IPTOS_DSCP_CS1		0x20
 5+#define IPTOS_DSCP_CS2		0x40
 6+#define IPTOS_DSCP_CS3		0x60
 7+#define IPTOS_DSCP_CS4		0x80
 8+#define IPTOS_DSCP_CS5		0xa0
 9+#define IPTOS_DSCP_CS6		0xc0
10+#define IPTOS_DSCP_CS7		0xe0
+4, -0
1@@ -0,0 +1,4 @@
2+#include_next <pwd.h>
3+#define setpassent(n) setpwent()
4+const char *user_from_uid(uid_t, int);
5+int uid_from_user(const char *, uid_t *);
+40, -0
 1@@ -0,0 +1,40 @@
 2+/*	$OpenBSD: readpassphrase.h,v 1.5 2003/06/17 21:56:23 millert Exp $	*/
 3+
 4+/*
 5+ * Copyright (c) 2000, 2002 Todd C. Miller <Todd.Miller@courtesan.com>
 6+ *
 7+ * Permission to use, copy, modify, and distribute this software for any
 8+ * purpose with or without fee is hereby granted, provided that the above
 9+ * copyright notice and this permission notice appear in all copies.
10+ *
11+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18+ *
19+ * Sponsored in part by the Defense Advanced Research Projects
20+ * Agency (DARPA) and Air Force Research Laboratory, Air Force
21+ * Materiel Command, USAF, under agreement number F39502-99-1-0512.
22+ */
23+
24+#ifndef _READPASSPHRASE_H_
25+#define _READPASSPHRASE_H_
26+
27+#define RPP_ECHO_OFF    0x00		/* Turn off echo (default). */
28+#define RPP_ECHO_ON     0x01		/* Leave echo on. */
29+#define RPP_REQUIRE_TTY 0x02		/* Fail if there is no tty. */
30+#define RPP_FORCELOWER  0x04		/* Force input to lower case. */
31+#define RPP_FORCEUPPER  0x08		/* Force input to upper case. */
32+#define RPP_SEVENBIT    0x10		/* Strip the high bit from input. */
33+#define RPP_STDIN       0x20		/* Read from stdin, not /dev/tty */
34+
35+#include <sys/cdefs.h>
36+
37+__BEGIN_DECLS
38+char * readpassphrase(const char *, char *, size_t, int);
39+__END_DECLS
40+
41+#endif /* !_READPASSPHRASE_H_ */
+3, -0
1@@ -0,0 +1,3 @@
2+#include_next <resolv.h>
3+int b64_ntop(unsigned char const *, size_t, char *, size_t);
4+int b64_pton(char const *, unsigned char *, size_t);
+11, -0
 1@@ -0,0 +1,11 @@
 2+#include_next <stdlib.h>
 3+#include <stdint.h>
 4+void freezero(void *, size_t);
 5+void *recallocarray(void *, size_t, size_t, size_t);
 6+long long strtonum(const char *, long long, long long, const char **);
 7+uint32_t arc4random(void);
 8+uint32_t arc4random_uniform(uint32_t);
 9+void arc4random_buf(void *, size_t);
10+void setprogname(const char *);
11+const char *getprogname(void);
12+extern char *__progname;
+5, -0
1@@ -0,0 +1,5 @@
2+#include_next <string.h>
3+char *strcasestr(const char *, const char *);
4+void strmode(int, char *);
5+int timingsafe_memcmp(const void *, const void *, size_t);
6+int timingsafe_bcmp(const void *, const void *, size_t);
+5, -0
1@@ -0,0 +1,5 @@
2+/* only needed for C++ */
3+#define __BEGIN_DECLS
4+#define __END_DECLS
5+
6+#define __dead __attribute__((__noreturn__))
+3, -0
1@@ -0,0 +1,3 @@
2+#include_next <sys/param.h>
3+#define ALIGNBYTES (sizeof(uintptr_t) - 1)
4+#define ALIGN(p) (((uintptr_t)(p) + ALIGNBYTES) &~ ALIGNBYTES)
+14, -0
 1@@ -0,0 +1,14 @@
 2+#include_next <sys/time.h>
 3+#define	timespeccmp(tsp, usp, cmp)					\
 4+	(((tsp)->tv_sec == (usp)->tv_sec) ?				\
 5+	    ((tsp)->tv_nsec cmp (usp)->tv_nsec) :			\
 6+	    ((tsp)->tv_sec cmp (usp)->tv_sec))
 7+#define	timespecsub(tsp, usp, vsp)					\
 8+	do {								\
 9+		(vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec;		\
10+		(vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec;	\
11+		if ((vsp)->tv_nsec < 0) {				\
12+			(vsp)->tv_sec--;				\
13+			(vsp)->tv_nsec += 1000000000L;			\
14+		}							\
15+	} while (0)
+3, -0
1@@ -0,0 +1,3 @@
2+#include_next <unistd.h>
3+#define pledge(request, paths) 0  /* linux doesn't have pledge */
4+#define unveil(path, permissions) 0  /* linux doesn't have unveil */
+9, -0
 1@@ -0,0 +1,9 @@
 2+#ifndef _UTIL_H_
 3+#define _UTIL_H_
 4+
 5+#define	FMT_SCALED_STRSIZE	7	/* minus sign, 4 digits, suffix, null byte */
 6+
 7+int fmt_scaled(long long, char *);
 8+int scan_scaled(char *, long long *);
 9+
10+#endif
+49, -0
 1@@ -0,0 +1,49 @@
 2+From b546a0ae0beb2323143aed00d05e2fdf4fef5239 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 17 Apr 2016 23:50:15 -0700
 5+Subject: [PATCH] fts: Avoid d_namlen
 6+
 7+---
 8+ lib/libc/gen/fts.c | 10 ++++++----
 9+ 1 file changed, 6 insertions(+), 4 deletions(-)
10+
11+diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
12+index 98b3a0a39..c186b7af2 100644
13+--- a/lib/libc/gen/fts.c
14++++ b/lib/libc/gen/fts.c
15+@@ -555,6 +555,7 @@ fts_build(FTS *sp, int type)
16+ 	int nitems, cderrno, descend, level, nlinks, nostat, doadjust;
17+ 	int saved_errno;
18+ 	char *cp;
19++	size_t namlen;
20+ 
21+ 	/* Set current node pointer. */
22+ 	cur = sp->fts_cur;
23+@@ -653,11 +654,12 @@ fts_build(FTS *sp, int type)
24+ 		if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
25+ 			continue;
26+ 
27+-		if (!(p = fts_alloc(sp, dp->d_name, dp->d_namlen)))
28++		namlen = strlen(dp->d_name);
29++		if (!(p = fts_alloc(sp, dp->d_name, namlen)))
30+ 			goto mem1;
31+-		if (dp->d_namlen >= maxlen) {	/* include space for NUL */
32++		if (namlen >= maxlen) {	/* include space for NUL */
33+ 			oldaddr = sp->fts_path;
34+-			if (fts_palloc(sp, dp->d_namlen +len + 1)) {
35++			if (fts_palloc(sp, namlen +len + 1)) {
36+ 				/*
37+ 				 * No more memory for path or structures.  Save
38+ 				 * errno, free up the current structure and the
39+@@ -683,7 +685,7 @@ mem1:				saved_errno = errno;
40+ 
41+ 		p->fts_level = level;
42+ 		p->fts_parent = sp->fts_cur;
43+-		p->fts_pathlen = len + dp->d_namlen;
44++		p->fts_pathlen = len + namlen;
45+ 		if (p->fts_pathlen < len) {
46+ 			/*
47+ 			 * If we wrap, free up the current structure and
48+-- 
49+2.12.2
50+
+46, -0
 1@@ -0,0 +1,46 @@
 2+From 2280f1bcd79a988c95548f65b9e3d7e08ac51b09 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 18 Apr 2016 01:25:29 -0700
 5+Subject: [PATCH] fts: Add some includes
 6+
 7+---
 8+ include/fts.h      | 2 ++
 9+ lib/libc/gen/fts.c | 2 ++
10+ 2 files changed, 4 insertions(+)
11+
12+diff --git a/include/fts.h b/include/fts.h
13+index eaf6be07c6f..a5b3aff91e7 100644
14+--- a/include/fts.h
15++++ b/include/fts.h
16+@@ -35,6 +35,8 @@
17+ #ifndef	_FTS_H_
18+ #define	_FTS_H_
19+ 
20++#include <sys/cdefs.h>
21++
22+ typedef struct {
23+ 	struct _ftsent *fts_cur;	/* current node */
24+ 	struct _ftsent *fts_child;	/* linked list of children */
25+diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c
26+index 77f26d6c27c..86585190a99 100644
27+--- a/lib/libc/gen/fts.c
28++++ b/lib/libc/gen/fts.c
29+@@ -31,6 +31,7 @@
30+ 
31+ #include <sys/param.h>	/* ALIGN ALIGNBYTES */
32+ #include <sys/stat.h>
33++#include <sys/types.h>
34+ 
35+ #include <dirent.h>
36+ #include <errno.h>
37+@@ -39,6 +40,7 @@
38+ #include <limits.h>
39+ #include <stdlib.h>
40+ #include <string.h>
41++#include <time.h>
42+ #include <unistd.h>
43+ 
44+ #define MAXIMUM(a, b)	(((a) > (b)) ? (a) : (b))
45+-- 
46+2.35.1
47+
+34, -0
 1@@ -0,0 +1,34 @@
 2+From e2ca2e2a530e61e8af65dca829aa1fcad5c59a7d Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 18 Apr 2016 00:13:51 -0700
 5+Subject: [PATCH] pax: Set listf to stderr in main
 6+
 7+---
 8+ bin/pax/pax.c | 4 +++-
 9+ 1 file changed, 3 insertions(+), 1 deletion(-)
10+
11+diff --git a/bin/pax/pax.c b/bin/pax/pax.c
12+index f6b3634369a..3d50e051075 100644
13+--- a/bin/pax/pax.c
14++++ b/bin/pax/pax.c
15+@@ -93,7 +93,7 @@ char	*dirptr;		/* destination dir in a copy */
16+ char	*argv0;			/* root of argv[0] */
17+ enum op_mode op_mode;		/* what program are we acting as? */
18+ sigset_t s_mask;		/* signal mask for cleanup critical sect */
19+-FILE	*listf = stderr;	/* file pointer to print file list to */
20++FILE	*listf;			/* file pointer to print file list to */
21+ int	listfd = STDERR_FILENO;	/* fd matching listf, for sighandler output */
22+ char	*tempfile;		/* tempfile to use for mkstemp(3) */
23+ char	*tempbase;		/* basename of tempfile to use for mkstemp(3) */
24+@@ -224,6 +224,8 @@ main(int argc, char **argv)
25+ 	char *tmpdir;
26+ 	size_t tdlen;
27+ 
28++	listf = stderr;
29++
30+ 	/*
31+ 	 * Keep a reference to cwd, so we can always come back home.
32+ 	 */
33+-- 
34+2.19.0
35+
+86, -0
 1@@ -0,0 +1,86 @@
 2+From fbf6dc8783f31408cc090cf42cf92008d4f2a455 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 18 Apr 2016 01:27:29 -0700
 5+Subject: [PATCH] pax: Add some includes
 6+
 7+---
 8+ bin/pax/ar_subs.c   | 3 ++-
 9+ bin/pax/buf_subs.c  | 1 +
10+ bin/pax/file_subs.c | 2 ++
11+ bin/pax/sel_subs.c  | 1 +
12+ bin/pax/tables.c    | 1 +
13+ 5 files changed, 7 insertions(+), 1 deletion(-)
14+
15+diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c
16+index 51dd6e085..f70ec4ed0 100644
17+--- a/bin/pax/ar_subs.c
18++++ b/bin/pax/ar_subs.c
19+@@ -36,14 +36,15 @@
20+ 
21+ #include <sys/types.h>
22+ #include <sys/stat.h>
23++#include <sys/time.h>
24+ #include <errno.h>
25+ #include <fcntl.h>
26+ #include <signal.h>
27+ #include <stdio.h>
28++#include <stdlib.h>
29+ #include <string.h>
30+ #include <time.h>
31+ #include <unistd.h>
32+-
33+ #include "pax.h"
34+ #include "extern.h"
35+ 
36+diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c
37+index 41f06ae31..30be3dc46 100644
38+--- a/bin/pax/buf_subs.c
39++++ b/bin/pax/buf_subs.c
40+@@ -36,6 +36,7 @@
41+ 
42+ #include <sys/types.h>
43+ #include <sys/stat.h>
44++#include <sys/time.h>
45+ #include <stdio.h>
46+ #include <errno.h>
47+ #include <unistd.h>
48+diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c
49+index 9f834bf17..57ebdb490 100644
50+--- a/bin/pax/file_subs.c
51++++ b/bin/pax/file_subs.c
52+@@ -35,6 +35,8 @@
53+  */
54+ 
55+ #include <sys/stat.h>
56++#include <sys/time.h>
57++#include <sys/types.h>
58+ #include <err.h>
59+ #include <errno.h>
60+ #include <fcntl.h>
61+diff --git a/bin/pax/sel_subs.c b/bin/pax/sel_subs.c
62+index 17200b5a4..136f87c5d 100644
63+--- a/bin/pax/sel_subs.c
64++++ b/bin/pax/sel_subs.c
65+@@ -43,6 +43,7 @@
66+ #include <stdlib.h>
67+ #include <string.h>
68+ #include <time.h>
69++#include <unistd.h>
70+ 
71+ #include "pax.h"
72+ #include "extern.h"
73+diff --git a/bin/pax/tables.c b/bin/pax/tables.c
74+index b700f1649..99790f986 100644
75+--- a/bin/pax/tables.c
76++++ b/bin/pax/tables.c
77+@@ -36,6 +36,7 @@
78+ 
79+ #include <sys/types.h>
80+ #include <sys/stat.h>
81++#include <sys/time.h>
82+ #include <errno.h>
83+ #include <fcntl.h>
84+ #include <limits.h>
85+-- 
86+2.12.2
87+
+25, -0
 1@@ -0,0 +1,25 @@
 2+From 901940cdf7fc13516ff55e81df0b546eb7c74595 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 18 Apr 2016 01:16:12 -0700
 5+Subject: [PATCH] tar: Default to stdin
 6+
 7+---
 8+ bin/pax/options.c | 2 +-
 9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/bin/pax/options.c b/bin/pax/options.c
12+index 5db0948858c..dbb4b816c37 100644
13+--- a/bin/pax/options.c
14++++ b/bin/pax/options.c
15+@@ -937,7 +937,7 @@ tar_options(int argc, char **argv)
16+ 	if ((arcname == NULL) || (*arcname == '\0')) {
17+ 		arcname = getenv("TAPE");
18+ 		if ((arcname == NULL) || (*arcname == '\0'))
19+-			arcname = _PATH_DEFTAPE;
20++			arcname = "-";
21+ 	}
22+ 	if ((arcname[0] == '-') && (arcname[1]== '\0'))
23+ 		arcname = NULL;
24+-- 
25+2.25.0
26+
+24, -0
 1@@ -0,0 +1,24 @@
 2+From f926c3a15c772a7d54561e01682dea486c2a2833 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 18 Apr 2016 17:34:01 -0700
 5+Subject: [PATCH] yacc: Add some includes
 6+
 7+---
 8+ usr.bin/yacc/defs.h | 1 +
 9+ 1 file changed, 1 insertion(+)
10+
11+diff --git a/usr.bin/yacc/defs.h b/usr.bin/yacc/defs.h
12+index 7300caec2..fab6e1266 100644
13+--- a/usr.bin/yacc/defs.h
14++++ b/usr.bin/yacc/defs.h
15+@@ -35,6 +35,7 @@
16+  *	@(#)defs.h	5.6 (Berkeley) 5/24/93
17+  */
18+ 
19++#include <sys/cdefs.h>
20+ #include <assert.h>
21+ #include <ctype.h>
22+ #include <stdio.h>
23+-- 
24+2.12.2
25+
+37, -0
 1@@ -0,0 +1,37 @@
 2+From 7ce395bfbff36cf0020d0a425ff3053fcf2eaa3d Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sat, 4 Jun 2016 14:48:20 -0700
 5+Subject: [PATCH] diff: Add missing includes
 6+
 7+---
 8+ usr.bin/diff/diff.c    | 1 +
 9+ usr.bin/diff/diffreg.c | 1 +
10+ 2 files changed, 2 insertions(+)
11+
12+diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c
13+index 2b075f12c..80c7f842e 100644
14+--- a/usr.bin/diff/diff.c
15++++ b/usr.bin/diff/diff.c
16+@@ -20,6 +20,7 @@
17+  * Materiel Command, USAF, under agreement number F39502-99-1-0512.
18+  */
19+ 
20++#include <sys/cdefs.h>
21+ #include <sys/stat.h>
22+ 
23+ #include <ctype.h>
24+diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c
25+index 35d61c349..953018cf5 100644
26+--- a/usr.bin/diff/diffreg.c
27++++ b/usr.bin/diff/diffreg.c
28+@@ -77,6 +77,7 @@
29+ #include <stdio.h>
30+ #include <stdlib.h>
31+ #include <string.h>
32++#include <time.h>
33+ #include <unistd.h>
34+ #include <limits.h>
35+ 
36+-- 
37+2.12.2
38+
+24, -0
 1@@ -0,0 +1,24 @@
 2+From 299d570c708b33349131b8ca925c3e9bb733db84 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sat, 4 Jun 2016 18:40:24 -0700
 5+Subject: [PATCH] patch: Add missing includes
 6+
 7+---
 8+ usr.bin/patch/patch.c | 1 +
 9+ 1 file changed, 1 insertion(+)
10+
11+diff --git a/usr.bin/patch/patch.c b/usr.bin/patch/patch.c
12+index 0cb924db733..17b3aa4e23a 100644
13+--- a/usr.bin/patch/patch.c
14++++ b/usr.bin/patch/patch.c
15+@@ -26,6 +26,7 @@
16+  * behaviour
17+  */
18+ 
19++#include <sys/cdefs.h>
20+ #include <sys/types.h>
21+ #include <sys/stat.h>
22+ #include <unistd.h>
23+-- 
24+2.19.0
25+
+25, -0
 1@@ -0,0 +1,25 @@
 2+From 602381b693ff286ed17a9a04bfceaeb255992843 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sat, 4 Jun 2016 18:40:37 -0700
 5+Subject: [PATCH] patch: Avoid d_namlen
 6+
 7+---
 8+ usr.bin/patch/backupfile.c | 2 +-
 9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/usr.bin/patch/backupfile.c b/usr.bin/patch/backupfile.c
12+index ed0767762e0..fc05e48e68d 100644
13+--- a/usr.bin/patch/backupfile.c
14++++ b/usr.bin/patch/backupfile.c
15+@@ -106,7 +106,7 @@ max_backup_version(const char *file, const char *dir)
16+ 	file_name_length = strlen(file);
17+ 
18+ 	while ((dp = readdir(dirp)) != NULL) {
19+-		if (dp->d_namlen <= file_name_length)
20++		if (strlen(dp->d_name) <= file_name_length)
21+ 			continue;
22+ 
23+ 		this_version = version_number(file, dp->d_name, file_name_length);
24+-- 
25+2.31.1
26+
+176, -0
  1@@ -0,0 +1,176 @@
  2+From ec3fd37495e977af375a98a472d19ae0ccbcd874 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sat, 3 Dec 2016 20:49:24 -0800
  5+Subject: [PATCH] pax: Fix GNU long name handling with short read
  6+
  7+---
  8+ bin/pax/ar_subs.c   | 66 +++++++++++++++++++++++++++++++++------------
  9+ bin/pax/buf_subs.c  |  4 +--
 10+ bin/pax/file_subs.c | 25 +----------------
 11+ 3 files changed, 51 insertions(+), 44 deletions(-)
 12+
 13+diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c
 14+index e5b0a4ee5d1..f0a55abe2f7 100644
 15+--- a/bin/pax/ar_subs.c
 16++++ b/bin/pax/ar_subs.c
 17+@@ -37,6 +37,7 @@
 18+ #include <sys/types.h>
 19+ #include <sys/stat.h>
 20+ #include <sys/time.h>
 21++#include <err.h>
 22+ #include <errno.h>
 23+ #include <fcntl.h>
 24+ #include <signal.h>
 25+@@ -51,6 +52,7 @@
 26+ static void wr_archive(ARCHD *, int is_app);
 27+ static int get_arc(void);
 28+ static int next_head(ARCHD *);
 29++static int rd_gnu_string(ARCHD *);
 30+ extern sigset_t s_mask;
 31+ 
 32+ /*
 33+@@ -93,16 +95,8 @@ list(void)
 34+ 	 * step through the archive until the format says it is done
 35+ 	 */
 36+ 	while (next_head(arcn) == 0) {
 37+-		if (arcn->type == PAX_GLL || arcn->type == PAX_GLF) {
 38+-			/*
 39+-			 * we need to read, to get the real filename
 40+-			 */
 41+-			off_t cnt;
 42+-			if (!rd_wrfile(arcn, arcn->type == PAX_GLF
 43+-			    ? -1 : -2, &cnt))
 44+-				(void)rd_skip(cnt + arcn->pad);
 45++		if (rd_gnu_string(arcn))
 46+ 			continue;
 47+-		}
 48+ 
 49+ 		/*
 50+ 		 * check for pattern, and user specified options match.
 51+@@ -208,15 +202,8 @@ extract(void)
 52+ 	 * says it is done
 53+ 	 */
 54+ 	while (next_head(arcn) == 0) {
 55+-		if (arcn->type == PAX_GLL || arcn->type == PAX_GLF) {
 56+-			/*
 57+-			 * we need to read, to get the real filename
 58+-			 */
 59+-			if (!rd_wrfile(arcn, arcn->type == PAX_GLF
 60+-			    ? -1 : -2, &cnt))
 61+-				(void)rd_skip(cnt + arcn->pad);
 62++		if (rd_gnu_string(arcn))
 63+ 			continue;
 64+-		}
 65+ 
 66+ 		/*
 67+ 		 * check for pattern, and user specified options match. When
 68+@@ -1243,3 +1230,48 @@ get_arc(void)
 69+ 	paxwarn(1, "Sorry, unable to determine archive format.");
 70+ 	return(-1);
 71+ }
 72++
 73++/*
 74++ * rd_gnu_string()
 75++ * 	Read the file contents into an allocated string if it is a GNU tar
 76++ * 	long link/file.
 77++ * Return:
 78++ * 	1 if gnu string read, 0 otherwise
 79++ */
 80++
 81++static int
 82++rd_gnu_string(ARCHD *arcn)
 83++{
 84++	char **strp;
 85++
 86++	switch (arcn->type) {
 87++	case PAX_GLF:
 88++		strp = &gnu_name_string;
 89++		break;
 90++	case PAX_GLL:
 91++		strp = &gnu_link_string;
 92++		break;
 93++	default:
 94++		strp = NULL;
 95++		break;
 96++	}
 97++	if (!strp)
 98++		return 0;
 99++	/*
100++	 * we need to read, to get the real filename
101++	 */
102++	if (*strp)
103++		err(1, "WARNING! Major Internal Error! GNU hack Failing!");
104++	*strp = malloc(arcn->sb.st_size + 1);
105++	if (*strp == NULL) {
106++		paxwarn(1, "Out of memory");
107++		(void)rd_skip(arcn->skip + arcn->pad);
108++	} else if (rd_wrbuf(*strp, arcn->sb.st_size) < arcn->sb.st_size) {
109++		free(*strp);
110++		*strp = NULL;
111++	} else {
112++		(*strp)[arcn->sb.st_size] = '\0';
113++		(void)rd_skip(arcn->pad);
114++	}
115++	return 1;
116++}
117+diff --git a/bin/pax/buf_subs.c b/bin/pax/buf_subs.c
118+index 68534dcbe25..e84f9e0d3d6 100644
119+--- a/bin/pax/buf_subs.c
120++++ b/bin/pax/buf_subs.c
121+@@ -673,9 +673,7 @@ rd_wrfile(ARCHD *arcn, int ofd, off_t *left)
122+ 	 * pass the blocksize of the file being written to the write routine,
123+ 	 * if the size is zero, use the default MINFBSZ
124+ 	 */
125+-	if (ofd < 0)
126+-		sz = PAXPATHLEN + 1;		/* GNU tar long link/file */
127+-	else if (fstat(ofd, &sb) == 0) {
128++	if (fstat(ofd, &sb) == 0) {
129+ 		if (sb.st_blksize > 0)
130+ 			sz = (int)sb.st_blksize;
131+ 	} else
132+diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c
133+index 89b4872988b..8aa3d249923 100644
134+--- a/bin/pax/file_subs.c
135++++ b/bin/pax/file_subs.c
136+@@ -919,7 +919,6 @@ file_write(int fd, char *str, int cnt, int *rem, int *isempt, int sz,
137+ 	char *end;
138+ 	int wcnt;
139+ 	char *st = str;
140+-	char **strp;
141+ 
142+ 	/*
143+ 	 * while we have data to process
144+@@ -978,29 +977,7 @@ file_write(int fd, char *str, int cnt, int *rem, int *isempt, int sz,
145+ 		/*
146+ 		 * have non-zero data in this file system block, have to write
147+ 		 */
148+-		switch (fd) {
149+-		case -1:
150+-			strp = &gnu_name_string;
151+-			break;
152+-		case -2:
153+-			strp = &gnu_link_string;
154+-			break;
155+-		default:
156+-			strp = NULL;
157+-			break;
158+-		}
159+-		if (strp) {
160+-			if (*strp)
161+-				err(1, "WARNING! Major Internal Error! GNU hack Failing!");
162+-			*strp = malloc(wcnt + 1);
163+-			if (*strp == NULL) {
164+-				paxwarn(1, "Out of memory");
165+-				return(-1);
166+-			}
167+-			memcpy(*strp, st, wcnt);
168+-			(*strp)[wcnt] = '\0';
169+-			break;
170+-		} else if (write(fd, st, wcnt) != wcnt) {
171++		if (write(fd, st, wcnt) != wcnt) {
172+ 			syswarn(1, errno, "Failed write to file %s", name);
173+ 			return(-1);
174+ 		}
175+-- 
176+2.26.2
177+
+90, -0
 1@@ -0,0 +1,90 @@
 2+From 86ce82bfd12c6db2468e3db4afd843cf081f71b2 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sat, 3 Dec 2016 23:50:27 -0800
 5+Subject: [PATCH] pax: Support xz compression with -J flag
 6+
 7+---
 8+ bin/pax/options.c | 25 ++++++++++++++++++++++---
 9+ 1 file changed, 22 insertions(+), 3 deletions(-)
10+
11+diff --git a/bin/pax/options.c b/bin/pax/options.c
12+index 560478f2681..27de25d655b 100644
13+--- a/bin/pax/options.c
14++++ b/bin/pax/options.c
15+@@ -154,6 +154,7 @@ static int xz_id(char *_blk, int _size);
16+ #define GZIP_CMD	"gzip"		/* command to run as gzip */
17+ #define COMPRESS_CMD	"compress"	/* command to run as compress */
18+ #define BZIP2_CMD	"bzip2"		/* command to run as bzip2 */
19++#define XZ_CMD		"xz"		/* command to run as xz */
20+ 
21+ /*
22+  *	Format specific routine table
23+@@ -300,7 +301,7 @@ pax_options(int argc, char **argv)
24+ 	/*
25+ 	 * process option flags
26+ 	 */
27+-	while ((c=getopt(argc,argv,"ab:cdf:ijklno:p:rs:tuvwx:zB:DE:G:HLOPT:U:XYZ0"))
28++	while ((c=getopt(argc,argv,"ab:cdf:ijklno:p:rs:tuvwx:zB:DE:G:HJLOPT:U:XYZ0"))
29+ 	    != -1) {
30+ 		switch (c) {
31+ 		case 'a':
32+@@ -556,6 +557,12 @@ pax_options(int argc, char **argv)
33+ 			Hflag = 1;
34+ 			flg |= CHF;
35+ 			break;
36++		case 'J':
37++			/*
38++			 * use xz.  Non standard option.
39++			 */
40++			gzip_program = XZ_CMD;
41++			break;
42+ 		case 'L':
43+ 			/*
44+ 			 * follow symlinks
45+@@ -731,7 +738,7 @@ tar_options(int argc, char **argv)
46+ 	 * process option flags
47+ 	 */
48+ 	while ((c = getoldopt(argc, argv,
49+-	    "b:cef:hjmopqruts:vwxzBC:HI:LNOPXZ014578")) != -1) {
50++	    "b:cef:hjmopqruts:vwxzBC:HI:JLNOPXZ014578")) != -1) {
51+ 		switch (c) {
52+ 		case 'b':
53+ 			/*
54+@@ -880,6 +887,12 @@ tar_options(int argc, char **argv)
55+ 			incfiles[nincfiles - 1].file = optarg;
56+ 			incfiles[nincfiles - 1].dir = chdname;
57+ 			break;
58++		case 'J':
59++			/*
60++			 * use xz.  Non standard option.
61++			 */
62++			gzip_program = XZ_CMD;
63++			break;
64+ 		case 'L':
65+ 			/*
66+ 			 * follow symlinks
67+@@ -1163,7 +1176,7 @@ cpio_options(int argc, char **argv)
68+ 	dflag = 1;
69+ 	act = -1;
70+ 	nodirs = 1;
71+-	while ((c=getopt(argc,argv,"abcdfijklmoprstuvzABC:E:F:H:I:LO:SZ6")) != -1)
72++	while ((c=getopt(argc,argv,"abcdfijklmoprstuvzABC:E:F:H:I:JLO:SZ6")) != -1)
73+ 		switch (c) {
74+ 			case 'a':
75+ 				/*
76+@@ -1347,6 +1360,12 @@ cpio_options(int argc, char **argv)
77+ 				(void)fputs("\n\n", stderr);
78+ 				cpio_usage();
79+ 				break;
80++			case 'J':
81++				/*
82++				 * use xz.  Non standard option.
83++				 */
84++				gzip_program = XZ_CMD;
85++				break;
86+ 			case 'L':
87+ 				/*
88+ 				 * follow symbolic links
89+-- 
90+2.37.3
91+
+23, -0
 1@@ -0,0 +1,23 @@
 2+From 7cc3b8b8b1ca390b6ed65d3234827bc7393f9300 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 11 Dec 2016 14:36:13 -0800
 5+Subject: [PATCH] setprogname: Explicitly discard const qualifier
 6+
 7+---
 8+ lib/libc/gen/setprogname.c | 2 +-
 9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/lib/libc/gen/setprogname.c b/lib/libc/gen/setprogname.c
12+index bce4cbdac44..0c1573c9162 100644
13+--- a/lib/libc/gen/setprogname.c
14++++ b/lib/libc/gen/setprogname.c
15+@@ -27,5 +27,5 @@ setprogname(const char *progname)
16+ 	if (tmpn == NULL)
17+ 		__progname = (char *)progname;
18+ 	else
19+-		__progname = tmpn + 1;
20++		__progname = (char *)tmpn + 1;
21+ }
22+-- 
23+2.14.2
24+
+38, -0
 1@@ -0,0 +1,38 @@
 2+From d36036bbd959091b6442d003128342ed515af01b Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 26 Feb 2017 17:01:33 -0800
 5+Subject: [PATCH] readpassphrase: Support systems without VSTATUS and TCSASOFT
 6+
 7+---
 8+ lib/libc/gen/readpassphrase.c | 6 ++++++
 9+ 1 file changed, 6 insertions(+)
10+
11+diff --git a/lib/libc/gen/readpassphrase.c b/lib/libc/gen/readpassphrase.c
12+index a1aeb342b..a50eaf003 100644
13+--- a/lib/libc/gen/readpassphrase.c
14++++ b/lib/libc/gen/readpassphrase.c
15+@@ -32,6 +32,10 @@
16+ #include <unistd.h>
17+ #include <readpassphrase.h>
18+ 
19++#ifndef TCSASOFT
20++#define TCSASOFT 0
21++#endif
22++
23+ static volatile sig_atomic_t signo[_NSIG];
24+ 
25+ static void handler(int);
26+@@ -81,8 +85,10 @@ restart:
27+ 		memcpy(&term, &oterm, sizeof(term));
28+ 		if (!(flags & RPP_ECHO_ON))
29+ 			term.c_lflag &= ~(ECHO | ECHONL);
30++#ifdef VSTATUS
31+ 		if (term.c_cc[VSTATUS] != _POSIX_VDISABLE)
32+ 			term.c_cc[VSTATUS] = _POSIX_VDISABLE;
33++#endif
34+ 		(void)tcsetattr(input, TCSAFLUSH|TCSASOFT, &term);
35+ 	} else {
36+ 		memset(&term, 0, sizeof(term));
37+-- 
38+2.12.2
39+
+36, -0
 1@@ -0,0 +1,36 @@
 2+From e76fda424564544bc8298fb5be7cda966451497d Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 26 Feb 2017 17:12:56 -0800
 5+Subject: [PATCH] Remove getpass definition
 6+
 7+It is a legacy function and musl already provides an implementation.
 8+---
 9+ lib/libc/gen/readpassphrase.c | 12 ++----------
10+ 1 file changed, 2 insertions(+), 10 deletions(-)
11+
12+diff --git a/lib/libc/gen/readpassphrase.c b/lib/libc/gen/readpassphrase.c
13+index a50eaf003..57c6dc527 100644
14+--- a/lib/libc/gen/readpassphrase.c
15++++ b/lib/libc/gen/readpassphrase.c
16+@@ -183,16 +183,8 @@ restart:
17+ }
18+ DEF_WEAK(readpassphrase);
19+ 
20+-char *
21+-getpass(const char *prompt)
22+-{
23+-	static char buf[_PASSWORD_LEN + 1];
24+-
25+-	return(readpassphrase(prompt, buf, sizeof(buf), RPP_ECHO_OFF));
26+-}
27+-
28+-static void handler(int s)
29++static void
30++handler(int s)
31+ {
32+-
33+ 	signo[s] = 1;
34+ }
35+-- 
36+2.12.2
37+
+581, -0
  1@@ -0,0 +1,581 @@
  2+From 8fa1e97f6927bf1afddb5923fff3d29c3389817d Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sun, 26 Feb 2017 16:50:55 -0800
  5+Subject: [PATCH] doas: Port to linux/musl
  6+
  7+Remove -a login style option and BSD authentication. Instead, compare
  8+against shadow file.
  9+
 10+Use timestamp files in /run/doas instead of TIOC*VERAUTH to implement
 11+persist.
 12+
 13+Use initgroups/setgid/setuid instead of setusercontext.
 14+
 15+Provide UID_MAX and GID_MAX defaults.
 16+
 17+Use LOGIN_NAME_MAX instead of _PW_NAME_LEN.
 18+
 19+Remove call to closefrom.
 20+
 21+Replace calls to errc with err after setting errno.
 22+
 23+Call openlog at start to set syslog identity.
 24+
 25+Remove unveil/pledge since they aren't supported on Linux.
 26+
 27+Simplify handling of PATH in the environment since we don't have
 28+login.conf with per-user default PATH.
 29+---
 30+ usr.bin/doas/doas.1    |   9 ---
 31+ usr.bin/doas/doas.c    | 168 +++++++++++++----------------------------
 32+ usr.bin/doas/doas.h    |   6 +-
 33+ usr.bin/doas/env.c     |  17 ++---
 34+ usr.bin/doas/parse.y   |   1 +
 35+ usr.bin/doas/persist.c | 133 ++++++++++++++++++++++++++++++++
 36+ 6 files changed, 198 insertions(+), 136 deletions(-)
 37+ create mode 100644 usr.bin/doas/persist.c
 38+
 39+diff --git a/usr.bin/doas/doas.1 b/usr.bin/doas/doas.1
 40+index 25827cc7104..3542680faf5 100644
 41+--- a/usr.bin/doas/doas.1
 42++++ b/usr.bin/doas/doas.1
 43+@@ -22,7 +22,6 @@
 44+ .Sh SYNOPSIS
 45+ .Nm doas
 46+ .Op Fl Lns
 47+-.Op Fl a Ar style
 48+ .Op Fl C Ar config
 49+ .Op Fl u Ar user
 50+ .Ar command
 51+@@ -67,14 +66,6 @@ The working directory is not changed.
 52+ .Pp
 53+ The options are as follows:
 54+ .Bl -tag -width tenletters
 55+-.It Fl a Ar style
 56+-Use the specified authentication style when validating the user,
 57+-as allowed by
 58+-.Pa /etc/login.conf .
 59+-A list of doas-specific authentication methods may be configured by adding an
 60+-.Sq auth-doas
 61+-entry in
 62+-.Xr login.conf 5 .
 63+ .It Fl C Ar config
 64+ Parse and check the configuration file
 65+ .Ar config ,
 66+diff --git a/usr.bin/doas/doas.c b/usr.bin/doas/doas.c
 67+index 8b684d6006c..27d7b01014e 100644
 68+--- a/usr.bin/doas/doas.c
 69++++ b/usr.bin/doas/doas.c
 70+@@ -20,8 +20,6 @@
 71+ #include <sys/ioctl.h>
 72+ 
 73+ #include <limits.h>
 74+-#include <login_cap.h>
 75+-#include <bsd_auth.h>
 76+ #include <readpassphrase.h>
 77+ #include <string.h>
 78+ #include <stdio.h>
 79+@@ -33,13 +31,22 @@
 80+ #include <syslog.h>
 81+ #include <errno.h>
 82+ #include <fcntl.h>
 83++#include <shadow.h>
 84+ 
 85+ #include "doas.h"
 86+ 
 87++#ifndef UID_MAX
 88++#define UID_MAX 65535
 89++#endif
 90++
 91++#ifndef GID_MAX
 92++#define GID_MAX 65535
 93++#endif
 94++
 95+ static void __dead
 96+ usage(void)
 97+ {
 98+-	fprintf(stderr, "usage: doas [-Lns] [-a style] [-C config] [-u user]"
 99++	fprintf(stderr, "usage: doas [-Lns] [-C config] [-u user]"
100+ 	    " command [arg ...]\n");
101+ 	exit(1);
102+ }
103+@@ -200,16 +207,28 @@ checkconfig(const char *confpath, int argc, char **argv,
104+ }
105+ 
106+ static int
107+-authuser_checkpass(char *myname, char *login_style)
108++verifypasswd(const char *user, const char *pass)
109++{
110++	struct spwd *sp;
111++	char *p1, *p2;
112++
113++	sp = getspnam(user);
114++	if (!sp)
115++		return 0;
116++	p1 = sp->sp_pwdp;
117++	if (p1[0] == '!' || p1[0] == '*')
118++		return 0;
119++	p2 = crypt(pass, p1);
120++	if (!p2)
121++		return 0;
122++	return strcmp(p1, p2) == 0;
123++}
124++
125++static int
126++authuser_checkpass(char *myname)
127+ {
128+ 	char *challenge = NULL, *response, rbuf[1024], cbuf[128];
129+-	auth_session_t *as;
130+ 
131+-	if (!(as = auth_userchallenge(myname, login_style, "auth-doas",
132+-	    &challenge))) {
133+-		warnx("Authentication failed");
134+-		return AUTH_FAILED;
135+-	}
136+ 	if (!challenge) {
137+ 		char host[HOST_NAME_MAX + 1];
138+ 
139+@@ -222,14 +241,12 @@ authuser_checkpass(char *myname, char *login_style)
140+ 	response = readpassphrase(challenge, rbuf, sizeof(rbuf),
141+ 	    RPP_REQUIRE_TTY);
142+ 	if (response == NULL && errno == ENOTTY) {
143+-		syslog(LOG_AUTHPRIV | LOG_NOTICE,
144+-		    "tty required for %s", myname);
145++		syslog(LOG_NOTICE, "tty required for %s", myname);
146+ 		errx(1, "a tty is required");
147+ 	}
148+-	if (!auth_userresponse(as, response, 0)) {
149++	if (!verifypasswd(myname, response)) {
150+ 		explicit_bzero(rbuf, sizeof(rbuf));
151+-		syslog(LOG_AUTHPRIV | LOG_NOTICE,
152+-		    "failed auth for %s", myname);
153++		syslog(LOG_NOTICE, "failed auth for %s", myname);
154+ 		warnx("Authentication failed");
155+ 		return AUTH_FAILED;
156+ 	}
157+@@ -238,79 +255,36 @@ authuser_checkpass(char *myname, char *login_style)
158+ }
159+ 
160+ static void
161+-authuser(char *myname, char *login_style, int persist)
162++authuser(char *myname, int persist)
163+ {
164+-	int i, fd = -1;
165++	int i, fd = -1, valid = 0;
166+ 
167+-	if (persist)
168+-		fd = open("/dev/tty", O_RDWR);
169+-	if (fd != -1) {
170+-		if (ioctl(fd, TIOCCHKVERAUTH) == 0)
171++	if (persist) {
172++		fd = openpersist(&valid);
173++		if (valid)
174+ 			goto good;
175+ 	}
176+ 	for (i = 0; i < AUTH_RETRIES; i++) {
177+-		if (authuser_checkpass(myname, login_style) == AUTH_OK)
178++		if (authuser_checkpass(myname) == AUTH_OK)
179+ 			goto good;
180+ 	}
181+ 	exit(1);
182+ good:
183+ 	if (fd != -1) {
184+-		int secs = 5 * 60;
185+-		ioctl(fd, TIOCSETVERAUTH, &secs);
186++		setpersist(fd);
187+ 		close(fd);
188+ 	}
189+ }
190+ 
191+-int
192+-unveilcommands(const char *ipath, const char *cmd)
193+-{
194+-	char *path = NULL, *p;
195+-	int unveils = 0;
196+-
197+-	if (strchr(cmd, '/') != NULL) {
198+-		if (unveil(cmd, "x") != -1)
199+-			unveils++;
200+-		goto done;
201+-	}
202+-
203+-	if (!ipath) {
204+-		errno = ENOENT;
205+-		goto done;
206+-	}
207+-	path = strdup(ipath);
208+-	if (!path) {
209+-		errno = ENOENT;
210+-		goto done;
211+-	}
212+-	for (p = path; p && *p; ) {
213+-		char buf[PATH_MAX];
214+-		char *cp = strsep(&p, ":");
215+-
216+-		if (cp) {
217+-			int r = snprintf(buf, sizeof buf, "%s/%s", cp, cmd);
218+-			if (r >= 0 && r < sizeof buf) {
219+-				if (unveil(buf, "x") != -1)
220+-					unveils++;
221+-			}
222+-		}
223+-	}
224+-done:
225+-	free(path);
226+-	return (unveils);
227+-}
228+-
229+ int
230+ main(int argc, char **argv)
231+ {
232+-	const char *safepath = "/bin:/sbin:/usr/bin:/usr/sbin:"
233+-	    "/usr/local/bin:/usr/local/sbin";
234+ 	const char *confpath = NULL;
235+ 	char *shargv[] = { NULL, NULL };
236+ 	char *sh;
237+-	const char *p;
238+ 	const char *cmd;
239+ 	char cmdline[LINE_MAX];
240+-	char mypwbuf[_PW_BUF_LEN], targpwbuf[_PW_BUF_LEN];
241++	char mypwbuf[1024], targpwbuf[1024];
242+ 	struct passwd mypwstore, targpwstore;
243+ 	struct passwd *mypw, *targpw;
244+ 	const struct rule *rule;
245+@@ -323,28 +297,20 @@ main(int argc, char **argv)
246+ 	int nflag = 0;
247+ 	char cwdpath[PATH_MAX];
248+ 	const char *cwd;
249+-	char *login_style = NULL;
250+ 	char **envp;
251+ 
252+ 	setprogname("doas");
253+-
254+-	closefrom(STDERR_FILENO + 1);
255++	openlog("doas", 0, LOG_AUTHPRIV);
256+ 
257+ 	uid = getuid();
258+ 
259+-	while ((ch = getopt(argc, argv, "a:C:Lnsu:")) != -1) {
260++	while ((ch = getopt(argc, argv, "C:Lnsu:")) != -1) {
261+ 		switch (ch) {
262+-		case 'a':
263+-			login_style = optarg;
264+-			break;
265+ 		case 'C':
266+ 			confpath = optarg;
267+ 			break;
268+ 		case 'L':
269+-			i = open("/dev/tty", O_RDWR);
270+-			if (i != -1)
271+-				ioctl(i, TIOCCLRVERAUTH);
272+-			exit(i == -1);
273++			exit(clearpersist() != 0);
274+ 		case 'u':
275+ 			if (parseuid(optarg, &target) != 0)
276+ 				errx(1, "unknown user");
277+@@ -414,50 +380,30 @@ main(int argc, char **argv)
278+ 	cmd = argv[0];
279+ 	if (!permit(uid, groups, ngroups, &rule, target, cmd,
280+ 	    (const char **)argv + 1)) {
281+-		syslog(LOG_AUTHPRIV | LOG_NOTICE,
282+-		    "command not permitted for %s: %s", mypw->pw_name, cmdline);
283+-		errc(1, EPERM, NULL);
284++		syslog(LOG_NOTICE, "command not permitted for %s: %s", mypw->pw_name, cmdline);
285++		errno = EPERM;
286++		err(1, NULL);
287+ 	}
288+ 
289+ 	if (!(rule->options & NOPASS)) {
290+ 		if (nflag)
291+ 			errx(1, "Authentication required");
292+ 
293+-		authuser(mypw->pw_name, login_style, rule->options & PERSIST);
294++		authuser(mypw->pw_name, rule->options & PERSIST);
295+ 	}
296+ 
297+-	if ((p = getenv("PATH")) != NULL)
298+-		formerpath = strdup(p);
299+-	if (formerpath == NULL)
300+-		formerpath = "";
301+-
302+-	if (unveil(_PATH_LOGIN_CONF, "r") == -1)
303+-		err(1, "unveil %s", _PATH_LOGIN_CONF);
304+-	if (unveil(_PATH_LOGIN_CONF ".db", "r") == -1)
305+-		err(1, "unveil %s.db", _PATH_LOGIN_CONF);
306+-	if (unveil(_PATH_LOGIN_CONF_D, "r") == -1)
307+-		err(1, "unveil %s", _PATH_LOGIN_CONF_D);
308+-	if (rule->cmd) {
309+-		if (setenv("PATH", safepath, 1) == -1)
310+-			err(1, "failed to set PATH '%s'", safepath);
311+-	}
312+-	if (unveilcommands(getenv("PATH"), cmd) == 0)
313+-		goto fail;
314+-
315+-	if (pledge("stdio rpath getpw exec id", NULL) == -1)
316+-		err(1, "pledge");
317+-
318+ 	rv = getpwuid_r(target, &targpwstore, targpwbuf, sizeof(targpwbuf), &targpw);
319+ 	if (rv != 0)
320+ 		err(1, "getpwuid_r failed");
321+ 	if (targpw == NULL)
322+ 		errx(1, "no passwd entry for target");
323+ 
324+-	if (setusercontext(NULL, targpw, target, LOGIN_SETGROUP |
325+-	    LOGIN_SETPATH |
326+-	    LOGIN_SETPRIORITY | LOGIN_SETRESOURCES | LOGIN_SETUMASK |
327+-	    LOGIN_SETUSER | LOGIN_SETENV | LOGIN_SETRTABLE) != 0)
328+-		errx(1, "failed to set user context for target");
329++	if (initgroups(targpw->pw_name, targpw->pw_gid) == -1)
330++		err(1, "initgroups");
331++	if (setgid(targpw->pw_gid) == -1)
332++		err(1, "setgid");
333++	if (setuid(targpw->pw_uid) == -1)
334++		err(1, "setuid");
335+ 
336+ 	if (pledge("stdio rpath exec", NULL) == -1)
337+ 		err(1, "pledge");
338+@@ -471,23 +417,17 @@ main(int argc, char **argv)
339+ 		err(1, "pledge");
340+ 
341+ 	if (!(rule->options & NOLOG)) {
342+-		syslog(LOG_AUTHPRIV | LOG_INFO,
343+-		    "%s ran command %s as %s from %s",
344++		syslog(LOG_INFO, "%s ran command %s as %s from %s",
345+ 		    mypw->pw_name, cmdline, targpw->pw_name, cwd);
346+ 	}
347+ 
348+ 	envp = prepenv(rule, mypw, targpw);
349+ 
350+-	/* setusercontext set path for the next process, so reset it for us */
351+ 	if (rule->cmd) {
352+ 		if (setenv("PATH", safepath, 1) == -1)
353+ 			err(1, "failed to set PATH '%s'", safepath);
354+-	} else {
355+-		if (setenv("PATH", formerpath, 1) == -1)
356+-			err(1, "failed to set PATH '%s'", formerpath);
357+ 	}
358+ 	execvpe(cmd, argv, envp);
359+-fail:
360+ 	if (errno == ENOENT)
361+ 		errx(1, "%s: command not found", cmd);
362+ 	err(1, "%s", cmd);
363+diff --git a/usr.bin/doas/doas.h b/usr.bin/doas/doas.h
364+index b98fe353b18..6567625c471 100644
365+--- a/usr.bin/doas/doas.h
366++++ b/usr.bin/doas/doas.h
367+@@ -29,13 +29,17 @@ extern struct rule **rules;
368+ extern size_t nrules;
369+ extern int parse_error;
370+ 
371+-extern const char *formerpath;
372++extern const char *safepath;
373+ 
374+ struct passwd;
375+ 
376+ char **prepenv(const struct rule *, const struct passwd *,
377+     const struct passwd *);
378+ 
379++int openpersist(int *valid);
380++int setpersist(int fd);
381++int clearpersist(void);
382++
383+ #define PERMIT	1
384+ #define DENY	2
385+ 
386+diff --git a/usr.bin/doas/env.c b/usr.bin/doas/env.c
387+index 2d93a4089b6..dc9be691955 100644
388+--- a/usr.bin/doas/env.c
389++++ b/usr.bin/doas/env.c
390+@@ -28,7 +28,7 @@
391+ 
392+ #include "doas.h"
393+ 
394+-const char *formerpath;
395++const char *safepath = "/bin";
396+ 
397+ struct envnode {
398+ 	RB_ENTRY(envnode) node;
399+@@ -103,7 +103,7 @@ createenv(const struct rule *rule, const struct passwd *mypw,
400+ 	addnode(env, "DOAS_USER", mypw->pw_name);
401+ 	addnode(env, "HOME", targpw->pw_dir);
402+ 	addnode(env, "LOGNAME", targpw->pw_name);
403+-	addnode(env, "PATH", getenv("PATH"));
404++	addnode(env, "PATH", safepath);
405+ 	addnode(env, "SHELL", targpw->pw_shell);
406+ 	addnode(env, "USER", targpw->pw_name);
407+ 
408+@@ -200,17 +200,10 @@ fillenv(struct env *env, const char **envlist)
409+ 		/* assign value or inherit from environ */
410+ 		if (eq) {
411+ 			val = eq + 1;
412+-			if (*val == '$') {
413+-				if (strcmp(val + 1, "PATH") == 0)
414+-					val = formerpath;
415+-				else
416+-					val = getenv(val + 1);
417+-			}
418++			if (*val == '$')
419++				val = getenv(val + 1);
420+ 		} else {
421+-			if (strcmp(name, "PATH") == 0)
422+-				val = formerpath;
423+-			else
424+-				val = getenv(name);
425++			val = getenv(name);
426+ 		}
427+ 		/* at last, we have something to insert */
428+ 		if (val) {
429+diff --git a/usr.bin/doas/parse.y b/usr.bin/doas/parse.y
430+index 604becb5445..e5fc912a9c4 100644
431+--- a/usr.bin/doas/parse.y
432++++ b/usr.bin/doas/parse.y
433+@@ -20,6 +20,7 @@
434+ #include <ctype.h>
435+ #include <limits.h>
436+ #include <unistd.h>
437++#include <stdlib.h>
438+ #include <stdint.h>
439+ #include <stdarg.h>
440+ #include <stdio.h>
441+diff --git a/usr.bin/doas/persist.c b/usr.bin/doas/persist.c
442+new file mode 100644
443+index 00000000000..4ad1bf1efbf
444+--- /dev/null
445++++ b/usr.bin/doas/persist.c
446+@@ -0,0 +1,133 @@
447++#include <errno.h>
448++#include <fcntl.h>
449++#include <limits.h>
450++#include <stdio.h>
451++#include <stdlib.h>
452++#include <string.h>
453++#include <sys/stat.h>
454++#include <sys/types.h>
455++#include <time.h>
456++#include <unistd.h>
457++
458++#include "doas.h"
459++
460++#define PERSIST_DIR "/run/doas"
461++#define PERSIST_TIMEOUT 5 * 60
462++
463++static int
464++ttyid(dev_t *tty)
465++{
466++	int fd, i;
467++	char buf[BUFSIZ], *p;
468++	ssize_t n;
469++
470++	fd = open("/proc/self/stat", O_RDONLY);
471++	if (fd == -1)
472++		return -1;
473++	n = read(fd, buf, sizeof(buf) - 1);
474++	if (n >= 0)
475++		buf[n] = '\0';
476++	/* check that we read the whole file */
477++	n = read(fd, buf, 1);
478++	close(fd);
479++	if (n != 0)
480++		return -1;
481++	p = strrchr(buf, ')');
482++	if (!p)
483++		return -1;
484++	++p;
485++	/* ttr_nr is the 5th field after executable name, so skip the next 4 */
486++	for (i = 0; i < 4; ++i) {
487++		p = strchr(++p, ' ');
488++		if (!p)
489++			return -1;
490++	}
491++	*tty = strtol(p, &p, 10);
492++	if (*p != ' ')
493++		return -1;
494++	return 0;
495++}
496++
497++static int
498++persistpath(char *buf, size_t len)
499++{
500++	dev_t tty;
501++	int n;
502++
503++	if (ttyid(&tty) < 0)
504++		return -1;
505++	n = snprintf(buf, len, PERSIST_DIR "/%ju-%ju", (uintmax_t)getuid(), (uintmax_t)tty);
506++	if (n < 0 || n >= (int)len)
507++		return -1;
508++	return 0;
509++}
510++
511++int
512++openpersist(int *valid)
513++{
514++	char path[256];
515++	struct stat st;
516++	struct timespec ts;
517++	int fd;
518++
519++	if (stat(PERSIST_DIR, &st) < 0) {
520++		if (errno != ENOENT)
521++			return -1;
522++		if (mkdir(PERSIST_DIR, 0700) < 0)
523++			return -1;
524++	} else if (st.st_uid != 0 || st.st_mode != (S_IFDIR | 0700)) {
525++		return -1;
526++	}
527++	if (persistpath(path, sizeof(path)) < 0)
528++		return -1;
529++	fd = open(path, O_RDONLY);
530++	if (fd == -1) {
531++		char tmp[256];
532++		struct timespec ts[2] = { { .tv_nsec = UTIME_OMIT }, { 0 } };
533++		int n;
534++
535++		n = snprintf(tmp, sizeof(tmp), PERSIST_DIR "/.tmp-%d", getpid());
536++		if (n < 0 || n >= (int)sizeof(tmp))
537++			return -1;
538++		fd = open(tmp, O_RDONLY | O_CREAT | O_EXCL, 0);
539++		if (fd == -1)
540++			return -1;
541++		if (futimens(fd, ts) < 0 || rename(tmp, path) < 0) {
542++			close(fd);
543++			unlink(tmp);
544++			return -1;
545++		}
546++		*valid = 0;
547++	} else {
548++		*valid = clock_gettime(CLOCK_BOOTTIME, &ts) == 0 &&
549++		         fstat(fd, &st) == 0 &&
550++		         (ts.tv_sec < st.st_mtim.tv_sec ||
551++		          (ts.tv_sec == st.st_mtim.tv_sec && ts.tv_nsec < st.st_mtim.tv_nsec)) &&
552++		         st.st_mtime - ts.tv_sec <= PERSIST_TIMEOUT;
553++	}
554++	return fd;
555++}
556++
557++int
558++setpersist(int fd)
559++{
560++	struct timespec times[2];
561++
562++	if (clock_gettime(CLOCK_BOOTTIME, &times[1]) < 0)
563++		return -1;
564++	times[0].tv_nsec = UTIME_OMIT;
565++	times[1].tv_sec += PERSIST_TIMEOUT;
566++	return futimens(fd, times);
567++}
568++
569++int
570++clearpersist(void)
571++{
572++	char path[256];
573++
574++	if (persistpath(path, sizeof(path)) < 0)
575++		return -1;
576++	if (unlink(path) < 0 && errno != ENOENT)
577++		return -1;
578++	return 0;
579++}
580+-- 
581+2.37.3
582+
+92, -0
 1@@ -0,0 +1,92 @@
 2+From ab480e176692b91f2fb6fb9ea2e1725d980d805d Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 14 Apr 2017 11:25:01 -0700
 5+Subject: [PATCH] pwcache: Don't use fixed buffer sizes
 6+
 7+---
 8+ lib/libc/gen/pwcache.c | 20 ++++++++------------
 9+ 1 file changed, 8 insertions(+), 12 deletions(-)
10+
11+diff --git a/lib/libc/gen/pwcache.c b/lib/libc/gen/pwcache.c
12+index d54daa08cc7..2f30f4b966b 100644
13+--- a/lib/libc/gen/pwcache.c
14++++ b/lib/libc/gen/pwcache.c
15+@@ -202,8 +202,7 @@ grptb_start(void)
16+ const char *
17+ user_from_uid(uid_t uid, int noname)
18+ {
19+-	struct passwd pwstore, *pw = NULL;
20+-	char pwbuf[_PW_BUF_LEN];
21++	struct passwd *pw;
22+ 	UIDC **pptr, *ptr = NULL;
23+ 
24+ 	if ((uidtb != NULL) || (uidtb_start() == 0)) {
25+@@ -226,7 +225,7 @@ user_from_uid(uid_t uid, int noname)
26+ 			*pptr = ptr = malloc(sizeof(UIDC));
27+ 	}
28+ 
29+-	getpwuid_r(uid, &pwstore, pwbuf, sizeof(pwbuf), &pw);
30++	pw = getpwuid(uid);
31+ 	if (pw == NULL) {
32+ 		/*
33+ 		 * no match for this uid in the local password file
34+@@ -263,8 +262,7 @@ user_from_uid(uid_t uid, int noname)
35+ const char *
36+ group_from_gid(gid_t gid, int noname)
37+ {
38+-	struct group grstore, *gr = NULL;
39+-	char grbuf[_GR_BUF_LEN];
40++	struct group *gr;
41+ 	GIDC **pptr, *ptr = NULL;
42+ 
43+ 	if ((gidtb != NULL) || (gidtb_start() == 0)) {
44+@@ -287,7 +285,7 @@ group_from_gid(gid_t gid, int noname)
45+ 			*pptr = ptr = malloc(sizeof(GIDC));
46+ 	}
47+ 
48+-	getgrgid_r(gid, &grstore, grbuf, sizeof(grbuf), &gr);
49++	gr = getgrgid(gid);
50+ 	if (gr == NULL) {
51+ 		/*
52+ 		 * no match for this gid in the local group file, put in
53+@@ -322,8 +320,7 @@ group_from_gid(gid_t gid, int noname)
54+ int
55+ uid_from_user(const char *name, uid_t *uid)
56+ {
57+-	struct passwd pwstore, *pw = NULL;
58+-	char pwbuf[_PW_BUF_LEN];
59++	struct passwd *pw;
60+ 	UIDC **pptr, *ptr = NULL;
61+ 	size_t namelen;
62+ 
63+@@ -357,7 +354,7 @@ uid_from_user(const char *name, uid_t *uid)
64+ 	 * no match, look it up, if no match store it as an invalid entry,
65+ 	 * or store the matching uid
66+ 	 */
67+-	getpwnam_r(name, &pwstore, pwbuf, sizeof(pwbuf), &pw);
68++	pw = getpwnam(name);
69+ 	if (ptr == NULL) {
70+ 		if (pw == NULL)
71+ 			return -1;
72+@@ -383,8 +380,7 @@ uid_from_user(const char *name, uid_t *uid)
73+ int
74+ gid_from_group(const char *name, gid_t *gid)
75+ {
76+-	struct group grstore, *gr = NULL;
77+-	char grbuf[_GR_BUF_LEN];
78++	struct group *gr;
79+ 	GIDC **pptr, *ptr = NULL;
80+ 	size_t namelen;
81+ 
82+@@ -418,7 +414,7 @@ gid_from_group(const char *name, gid_t *gid)
83+ 	 * no match, look it up, if no match store it as an invalid entry,
84+ 	 * or store the matching gid
85+ 	 */
86+-	getgrnam_r(name, &grstore, grbuf, sizeof(grbuf), &gr);
87++	gr = getgrnam(name);
88+ 	if (ptr == NULL) {
89+ 		if (gr == NULL)
90+ 			return -1;
91+-- 
92+2.19.0
93+
+51, -0
 1@@ -0,0 +1,51 @@
 2+From 98a3b77cfa775c87010159d49f5b17d84fe1aa7b Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 10 Oct 2017 03:07:56 -0700
 5+Subject: [PATCH] Add standalone freezero
 6+
 7+---
 8+ lib/libc/stdlib/freezero.c | 32 ++++++++++++++++++++++++++++++++
 9+ 1 file changed, 32 insertions(+)
10+ create mode 100644 lib/libc/stdlib/freezero.c
11+
12+diff --git a/lib/libc/stdlib/freezero.c b/lib/libc/stdlib/freezero.c
13+new file mode 100644
14+index 00000000000..31face3828b
15+--- /dev/null
16++++ b/lib/libc/stdlib/freezero.c
17+@@ -0,0 +1,32 @@
18++/*
19++ * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net>
20++ * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
21++ * Copyright (c) 2008 Damien Miller <djm@openbsd.org>
22++ * Copyright (c) 2000 Poul-Henning Kamp <phk@FreeBSD.org>
23++ *
24++ * Permission to use, copy, modify, and distribute this software for any
25++ * purpose with or without fee is hereby granted, provided that the above
26++ * copyright notice and this permission notice appear in all copies.
27++ *
28++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
29++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
30++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
31++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
32++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
33++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
34++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
35++ */
36++
37++#include <string.h>
38++#include <stdlib.h>
39++
40++void
41++freezero(void *ptr, size_t sz)
42++{
43++	/* This is legal. */
44++	if (ptr == NULL)
45++		return;
46++
47++	explicit_bzero(ptr, sz);
48++	free(ptr);
49++}
50+-- 
51+2.14.2
52+
+327, -0
  1@@ -0,0 +1,327 @@
  2+From edf250c633bef40e7e37dafc9fc393dd2ad9074f Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Tue, 10 Apr 2018 13:37:14 -0700
  5+Subject: [PATCH] m4: Use hand-written lexer to avoid cycle in bootstrap
  6+
  7+---
  8+ usr.bin/m4/tokenizer.c | 191 +++++++++++++++++++++++++++++++++++++++++
  9+ usr.bin/m4/tokenizer.l | 109 -----------------------
 10+ 2 files changed, 191 insertions(+), 109 deletions(-)
 11+ create mode 100644 usr.bin/m4/tokenizer.c
 12+ delete mode 100644 usr.bin/m4/tokenizer.l
 13+
 14+diff --git a/usr.bin/m4/tokenizer.c b/usr.bin/m4/tokenizer.c
 15+new file mode 100644
 16+index 00000000000..fa19fc65035
 17+--- /dev/null
 18++++ b/usr.bin/m4/tokenizer.c
 19+@@ -0,0 +1,191 @@
 20++/* $OpenBSD: tokenizer.l,v 1.10 2017/06/17 01:55:16 bcallah Exp $ */
 21++/*
 22++ * Copyright (c) 2004 Marc Espie <espie@cvs.openbsd.org>
 23++ *
 24++ * Permission to use, copy, modify, and distribute this software for any
 25++ * purpose with or without fee is hereby granted, provided that the above
 26++ * copyright notice and this permission notice appear in all copies.
 27++ *
 28++ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 29++ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 30++ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 31++ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 32++ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 33++ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 34++ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 35++ */
 36++#include "parser.tab.h"
 37++#include <assert.h>
 38++#include <ctype.h>
 39++#include <errno.h>
 40++#include <limits.h>
 41++#include <stdbool.h>
 42++#include <stdio.h>
 43++#include <stdlib.h>
 44++#include <stdint.h>
 45++
 46++extern void m4_warnx(const char *, ...);
 47++extern int mimic_gnu;
 48++extern int32_t yylval;
 49++static const char *yypos;
 50++
 51++void
 52++yy_scan_string(const char *s)
 53++{
 54++	yypos = s;
 55++}
 56++
 57++static int32_t
 58++number(const char *yytext, size_t yylen)
 59++{
 60++	long l;
 61++
 62++	errno = 0;
 63++	l = strtol(yytext, NULL, 0);
 64++	if (((l == LONG_MAX || l == LONG_MIN) && errno == ERANGE) ||
 65++	    l > INT32_MAX || l < INT32_MIN)
 66++		m4_warnx("numeric overflow in expr: %.*s", (int)yylen, yytext);
 67++	return l;
 68++}
 69++
 70++static int32_t
 71++parse_radix(const char *yytext, size_t yylen)
 72++{
 73++	long base;
 74++	char *next;
 75++	long l;
 76++	int d;
 77++
 78++	l = 0;
 79++	base = strtol(yytext+2, &next, 0);
 80++	if (base > 36 || next == NULL) {
 81++		m4_warnx("error in number %.*s", (int)yylen, yytext);
 82++	} else {
 83++		next++;
 84++		while (*next != 0) {
 85++			if (*next >= '0' && *next <= '9')
 86++				d = *next - '0';
 87++			else if (*next >= 'a' && *next <= 'z')
 88++				d = *next - 'a' + 10;
 89++			else {
 90++				assert(*next >= 'A' && *next <= 'Z');
 91++				d = *next - 'A' + 10;
 92++			}
 93++			if (d >= base) {
 94++				m4_warnx("error in number %.*s", (int)yylen, yytext);
 95++				return 0;
 96++			}
 97++			l = base * l + d;
 98++			next++;
 99++		}
100++	}
101++	return l;
102++}
103++
104++static int
105++isodigit(int c)
106++{
107++	return c >= '0' && c <= '7';
108++}
109++
110++int yylex(void)
111++{
112++	const char *start;
113++
114++next:
115++	start = yypos;
116++	switch (*yypos) {
117++	case ' ':
118++	case '\t':
119++	case '\n':
120++		++yypos;
121++		goto next;
122++	case '<':
123++		switch (yypos[1]) {
124++		case '=':
125++			yypos += 2;
126++			return LE;
127++		case '<':
128++			yypos += 2;
129++			return LSHIFT;
130++		}
131++		break;
132++	case '>':
133++		switch (yypos[1]) {
134++		case '=':
135++			yypos += 2;
136++			return GE;
137++		case '>':
138++			yypos += 2;
139++			return RSHIFT;
140++		}
141++		break;
142++	case '=':
143++		if (yypos[1] != '=')
144++			break;
145++		yypos += 2;
146++		return EQ;
147++	case '!':
148++		if (yypos[1] != '=')
149++			break;
150++		yypos += 2;
151++		return NE;
152++	case '&':
153++		if (yypos[1] != '&')
154++			break;
155++		yypos += 2;
156++		return LAND;
157++	case '|':
158++		if (yypos[1] != '|')
159++			break;
160++		yypos += 2;
161++		return LOR;
162++	case '*':
163++		if (!mimic_gnu || yypos[1] != '*')
164++			break;
165++		yypos += 2;
166++		return EXPONENT;
167++	case '0':
168++		switch (*++yypos) {
169++		case 'x':
170++		case 'X':
171++			if (!isxdigit(*++yypos))
172++				return ERROR;
173++			do ++yypos;
174++			while (isxdigit(*yypos));
175++			break;
176++		case 'r':
177++		case 'R':
178++			if (!mimic_gnu)
179++				break;
180++			if (!isdigit(*++yypos))
181++				return ERROR;
182++			do ++yypos;
183++			while (isdigit(*yypos));
184++			if (*yypos != ':')
185++				return ERROR;
186++			if (!isalnum(*++yypos))
187++				return ERROR;
188++			do ++yypos;
189++			while (isalnum(*yypos));
190++			yylval = parse_radix(start, yypos - start);
191++			return NUMBER;
192++		default:
193++			do ++yypos;
194++			while (isodigit(*yypos));
195++			break;
196++		}
197++		yylval = number(start, yypos - start);
198++		return NUMBER;
199++	case '\0':
200++		return '\0';
201++	}
202++	if (isdigit(*yypos)) {
203++		do ++yypos;
204++		while (isdigit(*yypos));
205++		yylval = number(start, yypos - start);
206++		return NUMBER;
207++	}
208++
209++	return *yypos++;
210++}
211+diff --git a/usr.bin/m4/tokenizer.l b/usr.bin/m4/tokenizer.l
212+deleted file mode 100644
213+index 94f02fb6085..00000000000
214+--- a/usr.bin/m4/tokenizer.l
215++++ /dev/null
216+@@ -1,109 +0,0 @@
217+-%{
218+-/* $OpenBSD: tokenizer.l,v 1.10 2017/06/17 01:55:16 bcallah Exp $ */
219+-/*
220+- * Copyright (c) 2004 Marc Espie <espie@cvs.openbsd.org>
221+- *
222+- * Permission to use, copy, modify, and distribute this software for any
223+- * purpose with or without fee is hereby granted, provided that the above
224+- * copyright notice and this permission notice appear in all copies.
225+- *
226+- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
227+- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
228+- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
229+- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
230+- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
231+- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
232+- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
233+- */
234+-#include "parser.h"
235+-#include <assert.h>
236+-#include <stdlib.h>
237+-#include <errno.h>
238+-#include <stdint.h>
239+-#include <limits.h>
240+-
241+-extern void m4_warnx(const char *, ...);
242+-extern int mimic_gnu;
243+-extern int32_t yylval;
244+-
245+-int32_t number(void);
246+-int32_t parse_radix(void);
247+-%}
248+-
249+-delim 	[ \t\n]
250+-ws	{delim}+
251+-hex	0[xX][0-9a-fA-F]+
252+-oct	0[0-7]*
253+-dec	[1-9][0-9]*
254+-radix	0[rR][0-9]+:[0-9a-zA-Z]+
255+-
256+-%option noyywrap
257+-
258+-%%
259+-{ws}			{/* just skip it */}
260+-{hex}|{oct}|{dec}	{ yylval = number(); return(NUMBER); }
261+-{radix}			{ if (mimic_gnu) {
262+-				yylval = parse_radix(); return(NUMBER);
263+-			  } else {
264+-			  	return(ERROR);
265+-			  }
266+-			}
267+-"<="			{ return(LE); }
268+-">="			{ return(GE); }
269+-"<<"			{ return(LSHIFT); }
270+-">>"			{ return(RSHIFT); }
271+-"=="			{ return(EQ); }
272+-"!="			{ return(NE); }
273+-"&&"			{ return(LAND); }
274+-"||"			{ return(LOR); }
275+-"**"			{ if (mimic_gnu) { return (EXPONENT); } }
276+-.			{ return yytext[0]; }
277+-%%
278+-
279+-int32_t
280+-number()
281+-{
282+-	long l;
283+-
284+-	errno = 0;
285+-	l = strtol(yytext, NULL, 0);
286+-	if (((l == LONG_MAX || l == LONG_MIN) && errno == ERANGE) ||
287+-	    l > INT32_MAX || l < INT32_MIN)
288+-		m4_warnx("numeric overflow in expr: %s", yytext);
289+-	return l;
290+-}
291+-
292+-int32_t
293+-parse_radix()
294+-{
295+-	long base;
296+-	char *next;
297+-	long l;
298+-	int d;
299+-
300+-	l = 0;
301+-	base = strtol(yytext+2, &next, 0);
302+-	if (base > 36 || next == NULL) {
303+-		m4_warnx("error in number %s", yytext);
304+-	} else {
305+-		next++;
306+-		while (*next != 0) {
307+-			if (*next >= '0' && *next <= '9')
308+-				d = *next - '0';
309+-			else if (*next >= 'a' && *next <= 'z')
310+-				d = *next - 'a' + 10;
311+-			else {
312+-				assert(*next >= 'A' && *next <= 'Z');
313+-				d = *next - 'A' + 10;
314+-			}
315+-			if (d >= base) {
316+-				m4_warnx("error in number %s", yytext);
317+-				return 0;
318+-			}
319+-			l = base * l + d;
320+-			next++;
321+-		}
322+-	}
323+-	return l;
324+-}
325+-
326+-- 
327+2.17.0
328+
+25, -0
 1@@ -0,0 +1,25 @@
 2+From 0f0eb43f3d6fb749fac229e3d6c8f74b2c40ece2 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 10 Apr 2018 16:03:44 -0700
 5+Subject: [PATCH] m4: Use _Noreturn instead of __dead
 6+
 7+---
 8+ usr.bin/m4/extern.h | 2 +-
 9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/usr.bin/m4/extern.h b/usr.bin/m4/extern.h
12+index ea8406b8540..0c07599777d 100644
13+--- a/usr.bin/m4/extern.h
14++++ b/usr.bin/m4/extern.h
15+@@ -113,7 +113,7 @@ extern void	usage(void);
16+ extern void	resizedivs(int);
17+ extern size_t	buffer_mark(void);
18+ extern void	dump_buffer(FILE *, size_t);
19+-extern void	__dead m4errx(int, const char *, ...);
20++extern void	_Noreturn m4errx(int, const char *, ...);
21+ 
22+ extern int	obtain_char(struct input_file *);
23+ extern void	set_input(struct input_file *, FILE *, const char *);
24+-- 
25+2.17.0
26+
+50, -0
 1@@ -0,0 +1,50 @@
 2+From 3cc2a61c553d138778a6ec1dd84cd042ce834b4e Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 10 Apr 2018 16:24:12 -0700
 5+Subject: [PATCH] m4: Add missing includes
 6+
 7+---
 8+ usr.bin/m4/look.c   | 1 +
 9+ usr.bin/m4/main.c   | 1 +
10+ usr.bin/m4/parser.y | 1 +
11+ 3 files changed, 3 insertions(+)
12+
13+diff --git a/usr.bin/m4/look.c b/usr.bin/m4/look.c
14+index ac504570a9f..5feb0413cd6 100644
15+--- a/usr.bin/m4/look.c
16++++ b/usr.bin/m4/look.c
17+@@ -38,6 +38,7 @@
18+  * by: oz
19+  */
20+ 
21++#include <sys/cdefs.h>
22+ #include <stdio.h>
23+ #include <stdlib.h>
24+ #include <stdint.h>
25+diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c
26+index f1b8fa5a55b..4e664c0a50b 100644
27+--- a/usr.bin/m4/main.c
28++++ b/usr.bin/m4/main.c
29+@@ -39,6 +39,7 @@
30+  * by: oz
31+  */
32+ 
33++#include <sys/cdefs.h>
34+ #include <assert.h>
35+ #include <signal.h>
36+ #include <err.h>
37+diff --git a/usr.bin/m4/parser.y b/usr.bin/m4/parser.y
38+index 5b46d261a9a..fedded1e44c 100644
39+--- a/usr.bin/m4/parser.y
40++++ b/usr.bin/m4/parser.y
41+@@ -17,6 +17,7 @@
42+  */
43+ #include <math.h>
44+ #include <stdint.h>
45++#include <stdlib.h>
46+ #define YYSTYPE	int32_t
47+ extern int32_t end_result;
48+ extern int yylex(void);
49+-- 
50+2.22.0
51+
+24, -0
 1@@ -0,0 +1,24 @@
 2+From 72cfeec702c7b76cce88be4c411ce40a8abb628c Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 10 Apr 2018 16:23:22 -0700
 5+Subject: [PATCH] libutil: Add missing includes
 6+
 7+---
 8+ lib/libutil/ohash.c | 1 +
 9+ 1 file changed, 1 insertion(+)
10+
11+diff --git a/lib/libutil/ohash.c b/lib/libutil/ohash.c
12+index 74ca4fafd9c..9537c60eac4 100644
13+--- a/lib/libutil/ohash.c
14++++ b/lib/libutil/ohash.c
15+@@ -15,6 +15,7 @@
16+  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17+  */
18+ 
19++#include <sys/cdefs.h>
20+ #include <stddef.h>
21+ #include <stdint.h>
22+ #include <stdlib.h>
23+-- 
24+2.17.0
25+
+25, -0
 1@@ -0,0 +1,25 @@
 2+From 7ea4349d2ed8afd672348a7d2f3534007e5dc442 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 18 Mar 2019 14:52:31 -0700
 5+Subject: [PATCH] acme-client: Add missing includes
 6+
 7+---
 8+ usr.sbin/acme-client/extern.h | 2 ++
 9+ 1 file changed, 2 insertions(+)
10+
11+diff --git a/usr.sbin/acme-client/extern.h b/usr.sbin/acme-client/extern.h
12+index dda2edde4..d83ead634 100644
13+--- a/usr.sbin/acme-client/extern.h
14++++ b/usr.sbin/acme-client/extern.h
15+@@ -17,6 +17,8 @@
16+ #ifndef EXTERN_H
17+ #define EXTERN_H
18+ 
19++#include <sys/cdefs.h>
20++#include <sys/types.h>
21+ #include "parse.h"
22+ 
23+ #define MAX_SERVERS_DNS 8
24+-- 
25+2.21.0
26+
+42, -0
 1@@ -0,0 +1,42 @@
 2+From d423093f8dec64533733deb0762353f68b0adeb2 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 14 Jun 2019 12:40:56 -0700
 5+Subject: [PATCH] rsync: Add missing includes
 6+
 7+- stdio.h in socket.c for sscanf
 8+- stdint.h in extern.h for fixed-width integer types
 9+- sys/types.h in extern.h for various type definitions
10+---
11+ usr.bin/rsync/extern.h | 3 +++
12+ usr.bin/rsync/socket.c | 1 +
13+ 2 files changed, 4 insertions(+)
14+
15+diff --git a/usr.bin/rsync/extern.h b/usr.bin/rsync/extern.h
16+index 2815f82cf89..a3f2a15b959 100644
17+--- a/usr.bin/rsync/extern.h
18++++ b/usr.bin/rsync/extern.h
19+@@ -17,6 +17,9 @@
20+ #ifndef EXTERN_H
21+ #define EXTERN_H
22+ 
23++#include <stdint.h>
24++#include <sys/types.h>
25++
26+ /*
27+  * This is the rsync protocol version that we support.
28+  */
29+diff --git a/usr.bin/rsync/socket.c b/usr.bin/rsync/socket.c
30+index 953b229afbc..aa95cce9369 100644
31+--- a/usr.bin/rsync/socket.c
32++++ b/usr.bin/rsync/socket.c
33+@@ -28,6 +28,7 @@
34+ #include <poll.h>
35+ #include <resolv.h>
36+ #include <stdlib.h>
37++#include <stdio.h>
38+ #include <string.h>
39+ #include <unistd.h>
40+ #include <err.h>
41+-- 
42+2.34.1
43+
+34, -0
 1@@ -0,0 +1,34 @@
 2+From d5670219baefe6769a42984abb93e19d8a43dada Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 14 Jun 2019 12:42:15 -0700
 5+Subject: [PATCH] rsync: Use standard S_ISVTX instead of S_ISTXT
 6+
 7+---
 8+ usr.bin/rsync/receiver.c | 4 ++--
 9+ 1 file changed, 2 insertions(+), 2 deletions(-)
10+
11+diff --git a/usr.bin/rsync/receiver.c b/usr.bin/rsync/receiver.c
12+index 6e5b01670cd..67510b3e932 100644
13+--- a/usr.bin/rsync/receiver.c
14++++ b/usr.bin/rsync/receiver.c
15+@@ -87,7 +87,7 @@ rsync_set_metadata(struct sess *sess, int newfile,
16+ 				    "to user.group: %u.%u", f->path, uid, gid);
17+ 		} else
18+ 			LOG4("%s: updated uid and/or gid", f->path);
19+-		mode &= ~(S_ISTXT | S_ISUID | S_ISGID);
20++		mode &= ~(S_ISVTX | S_ISUID | S_ISGID);
21+ 	}
22+ 
23+ 	/* Conditionally adjust file permissions. */
24+@@ -148,7 +148,7 @@ rsync_set_metadata_at(struct sess *sess, int newfile, int rootfd,
25+ 				    "to user.group: %u.%u", f->path, uid, gid);
26+ 		} else
27+ 			LOG4("%s: updated uid and/or gid", f->path);
28+-		mode &= ~(S_ISTXT | S_ISUID | S_ISGID);
29++		mode &= ~(S_ISVTX | S_ISUID | S_ISGID);
30+ 	}
31+ 
32+ 	/* Conditionally adjust file permissions. */
33+-- 
34+2.34.1
35+
+149, -0
  1@@ -0,0 +1,149 @@
  2+From b93dee95670eccc6a5c34f1f8a3b828998d0da7b Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sat, 15 Jun 2019 20:06:13 -0700
  5+Subject: [PATCH] rsync: Avoid pointer arithmetic on `void *`
  6+
  7+---
  8+ usr.bin/rsync/blocks.c     |  8 ++++----
  9+ usr.bin/rsync/downloader.c |  2 +-
 10+ usr.bin/rsync/io.c         | 12 ++++++------
 11+ usr.bin/rsync/sender.c     |  5 +++--
 12+ 4 files changed, 14 insertions(+), 13 deletions(-)
 13+
 14+diff --git a/usr.bin/rsync/blocks.c b/usr.bin/rsync/blocks.c
 15+index 56790729f27..906733c968e 100644
 16+--- a/usr.bin/rsync/blocks.c
 17++++ b/usr.bin/rsync/blocks.c
 18+@@ -157,7 +157,7 @@ blk_find(struct sess *sess, struct blkstat *st,
 19+ 	if (!recomp) {
 20+ 		fhash = (st->s1 & 0xFFFF) | (st->s2 << 16);
 21+ 	} else {
 22+-		fhash = hash_fast(st->map + st->offs, (size_t)osz);
 23++		fhash = hash_fast((char *)st->map + st->offs, (size_t)osz);
 24+ 		st->s1 = fhash & 0xFFFF;
 25+ 		st->s2 = fhash >> 16;
 26+ 	}
 27+@@ -170,7 +170,7 @@ blk_find(struct sess *sess, struct blkstat *st,
 28+ 	if (st->hint < blks->blksz &&
 29+ 	    fhash == blks->blks[st->hint].chksum_short &&
 30+ 	    (size_t)osz == blks->blks[st->hint].len) {
 31+-		hash_slow(st->map + st->offs, (size_t)osz, md, sess);
 32++		hash_slow((char *)st->map + st->offs, (size_t)osz, md, sess);
 33+ 		have_md = 1;
 34+ 		if (memcmp(md, blks->blks[st->hint].chksum_long, blks->csum) == 0) {
 35+ 			LOG4("%s: found matching hinted match: "
 36+@@ -203,7 +203,7 @@ blk_find(struct sess *sess, struct blkstat *st,
 37+ 		    (intmax_t)ent->blk->offs, ent->blk->len);
 38+ 
 39+ 		if (have_md == 0) {
 40+-			hash_slow(st->map + st->offs, (size_t)osz, md, sess);
 41++			hash_slow((char *)st->map + st->offs, (size_t)osz, md, sess);
 42+ 			have_md = 1;
 43+ 		}
 44+ 
 45+@@ -221,7 +221,7 @@ blk_find(struct sess *sess, struct blkstat *st,
 46+ 	 * block in the sequence.
 47+ 	 */
 48+ 
 49+-	map = st->map + st->offs;
 50++	map = (char *)st->map + st->offs;
 51+ 	st->s1 -= map[0];
 52+ 	st->s2 -= osz * map[0];
 53+ 
 54+diff --git a/usr.bin/rsync/downloader.c b/usr.bin/rsync/downloader.c
 55+index cab6eb23f9f..07ec334f6b4 100644
 56+--- a/usr.bin/rsync/downloader.c
 57++++ b/usr.bin/rsync/downloader.c
 58+@@ -495,7 +495,7 @@ again:
 59+ 		sz = tok == p->blk.blksz - 1 ? p->blk.rem : p->blk.len;
 60+ 		assert(sz);
 61+ 		assert(p->map != MAP_FAILED);
 62+-		buf = p->map + (tok * p->blk.len);
 63++		buf = (char *)p->map + (tok * p->blk.len);
 64+ 
 65+ 		/*
 66+ 		 * Now we read from our block.
 67+diff --git a/usr.bin/rsync/io.c b/usr.bin/rsync/io.c
 68+index dc224ae8aed..fcf9e92dbaa 100644
 69+--- a/usr.bin/rsync/io.c
 70++++ b/usr.bin/rsync/io.c
 71+@@ -117,7 +117,7 @@ io_write_blocking(int fd, const void *buf, size_t sz)
 72+ 			ERRX("io_write_nonblocking: short write");
 73+ 			return 0;
 74+ 		}
 75+-		buf += wsz;
 76++		buf = (char *)buf + wsz;
 77+ 		sz -= wsz;
 78+ 	}
 79+ 
 80+@@ -156,7 +156,7 @@ io_write_buf(struct sess *sess, int fd, const void *buf, size_t sz)
 81+ 		}
 82+ 		sess->total_write += wsz;
 83+ 		sz -= wsz;
 84+-		buf += wsz;
 85++		buf = (char *)buf + wsz;
 86+ 	}
 87+ 
 88+ 	return 1;
 89+@@ -250,7 +250,7 @@ io_read_blocking(int fd, void *buf, size_t sz)
 90+ 			ERRX("io_read_nonblocking: short read");
 91+ 			return 0;
 92+ 		}
 93+-		buf += rsz;
 94++		buf = (char *)buf + rsz;
 95+ 		sz -= rsz;
 96+ 	}
 97+ 
 98+@@ -367,7 +367,7 @@ io_read_buf(struct sess *sess, int fd, void *buf, size_t sz)
 99+ 			}
100+ 			sz -= rsz;
101+ 			sess->mplex_read_remain -= rsz;
102+-			buf += rsz;
103++			buf = (char *)buf + rsz;
104+ 			sess->total_read += rsz;
105+ 			continue;
106+ 		}
107+@@ -463,7 +463,7 @@ io_buffer_buf(void *buf, size_t *bufpos, size_t buflen, const void *val,
108+ {
109+ 
110+ 	assert(*bufpos + valsz <= buflen);
111+-	memcpy(buf + *bufpos, val, valsz);
112++	memcpy((char *)buf + *bufpos, val, valsz);
113+ 	*bufpos += valsz;
114+ }
115+ 
116+@@ -662,7 +662,7 @@ io_unbuffer_buf(const void *buf, size_t *bufpos, size_t bufsz, void *val,
117+ {
118+ 
119+ 	assert(*bufpos + valsz <= bufsz);
120+-	memcpy(val, buf + *bufpos, valsz);
121++	memcpy(val, (char *)buf + *bufpos, valsz);
122+ 	*bufpos += valsz;
123+ }
124+ 
125+diff --git a/usr.bin/rsync/sender.c b/usr.bin/rsync/sender.c
126+index e2999aa2589..9dd008def01 100644
127+--- a/usr.bin/rsync/sender.c
128++++ b/usr.bin/rsync/sender.c
129+@@ -128,7 +128,7 @@ send_up_fsm(struct sess *sess, size_t *phase,
130+ 			return 0;
131+ 		}
132+ 		io_lowbuffer_buf(sess, *wb, &pos, *wbsz,
133+-			up->stat.map + up->stat.curpos, sz);
134++			(char *)up->stat.map + up->stat.curpos, sz);
135+ 
136+ 		up->stat.curpos += sz;
137+ 		if (up->stat.curpos == up->stat.curlen)
138+@@ -557,7 +557,8 @@ rsync_sender(struct sess *sess, int fdin,
139+ 		if ((pfd[1].revents & POLLOUT) && wbufsz > 0) {
140+ 			assert(pfd[2].fd == -1);
141+ 			assert(wbufsz - wbufpos);
142+-			ssz = write(fdout, wbuf + wbufpos, wbufsz - wbufpos);
143++			ssz = write(fdout,
144++				(char *)wbuf + wbufpos, wbufsz - wbufpos);
145+ 			if (ssz == -1) {
146+ 				ERR("write");
147+ 				goto out;
148+-- 
149+2.37.3
150+
+73, -0
 1@@ -0,0 +1,73 @@
 2+From 0d3a091280d0874fb561c83431803eb2489876cb Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 5 Aug 2019 21:42:54 -0700
 5+Subject: [PATCH] Include sys/sysmacros.h if necessary
 6+
 7+---
 8+ bin/pax/cpio.c        | 4 ++++
 9+ bin/pax/gen_subs.c    | 3 +++
10+ bin/pax/tar.c         | 3 +++
11+ usr.bin/rsync/flist.c | 4 ++++
12+ 4 files changed, 14 insertions(+)
13+
14+diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c
15+index 92fe965163a..3832b1e87aa 100644
16+--- a/bin/pax/cpio.c
17++++ b/bin/pax/cpio.c
18+@@ -41,6 +41,10 @@
19+ #include <stdio.h>
20+ #include <unistd.h>
21+ #include <stdlib.h>
22++#ifndef major
23++#include <sys/sysmacros.h>
24++#endif
25++
26+ #include "pax.h"
27+ #include "cpio.h"
28+ #include "extern.h"
29+diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c
30+index 42c70804fb7..405dd2c24ed 100644
31+--- a/bin/pax/gen_subs.c
32++++ b/bin/pax/gen_subs.c
33+@@ -45,6 +45,9 @@
34+ #include <unistd.h>
35+ #include <utmp.h>
36+ #include <vis.h>
37++#ifndef major
38++#include <sys/sysmacros.h>
39++#endif
40+ 
41+ #include "pax.h"
42+ #include "extern.h"
43+diff --git a/bin/pax/tar.c b/bin/pax/tar.c
44+index 9d8a92d9d13..e84a9c69a09 100644
45+--- a/bin/pax/tar.c
46++++ b/bin/pax/tar.c
47+@@ -45,6 +45,9 @@
48+ #include <stdlib.h>
49+ #include <string.h>
50+ #include <unistd.h>
51++#ifndef major
52++#include <sys/sysmacros.h>
53++#endif
54+ 
55+ #include "pax.h"
56+ #include "extern.h"
57+diff --git a/usr.bin/rsync/flist.c b/usr.bin/rsync/flist.c
58+index 392ba494423..5f15487623a 100644
59+--- a/usr.bin/rsync/flist.c
60++++ b/usr.bin/rsync/flist.c
61+@@ -16,6 +16,10 @@
62+  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
63+  */
64+ #include <sys/stat.h>
65++#include <sys/types.h>
66++#ifndef major
67++#include <sys/sysmacros.h>
68++#endif
69+ 
70+ #include <assert.h>
71+ #include <errno.h>
72+-- 
73+2.34.1
74+
+194, -0
  1@@ -0,0 +1,194 @@
  2+From 6c278af8cc6a9fcb94b9bbe572b0bd3f7dd492c1 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Mon, 2 Dec 2019 21:11:04 -0800
  5+Subject: [PATCH] nc: Portability fixes from libressl-portable
  6+
  7+---
  8+ usr.bin/nc/netcat.c | 55 +++++++++++++++++++++++++++++++++++++++------
  9+ 1 file changed, 48 insertions(+), 7 deletions(-)
 10+
 11+diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
 12+index c8f1cdd9f75..7369ed85619 100644
 13+--- a/usr.bin/nc/netcat.c
 14++++ b/usr.bin/nc/netcat.c
 15+@@ -93,9 +93,13 @@ int	zflag;					/* Port Scan Flag */
 16+ int	Dflag;					/* sodebug */
 17+ int	Iflag;					/* TCP receive buffer size */
 18+ int	Oflag;					/* TCP send buffer size */
 19++#ifdef TCP_MD5SIG
 20+ int	Sflag;					/* TCP MD5 signature option */
 21++#endif
 22+ int	Tflag = -1;				/* IP Type of Service */
 23++#ifdef SO_RTABLE
 24+ int	rtableid = -1;
 25++#endif
 26+ 
 27+ int	usetls;					/* use TLS */
 28+ const char    *Cflag;				/* Public cert file */
 29+@@ -268,12 +272,14 @@ main(int argc, char *argv[])
 30+ 		case 'u':
 31+ 			uflag = 1;
 32+ 			break;
 33++#ifdef SO_RTABLE
 34+ 		case 'V':
 35+ 			rtableid = (int)strtonum(optarg, 0,
 36+ 			    RT_TABLEID_MAX, &errstr);
 37+ 			if (errstr)
 38+ 				errx(1, "rtable %s: %s", errstr, optarg);
 39+ 			break;
 40++#endif
 41+ 		case 'v':
 42+ 			vflag = 1;
 43+ 			break;
 44+@@ -320,9 +326,11 @@ main(int argc, char *argv[])
 45+ 		case 'o':
 46+ 			oflag = optarg;
 47+ 			break;
 48++#ifdef TCP_MD5SIG
 49+ 		case 'S':
 50+ 			Sflag = 1;
 51+ 			break;
 52++#endif
 53+ 		case 'T':
 54+ 			errstr = NULL;
 55+ 			errno = 0;
 56+@@ -346,9 +354,11 @@ main(int argc, char *argv[])
 57+ 	argc -= optind;
 58+ 	argv += optind;
 59+ 
 60++#ifdef SO_RTABLE
 61+ 	if (rtableid >= 0)
 62+ 		if (setrtable(rtableid) == -1)
 63+ 			err(1, "setrtable");
 64++#endif
 65+ 
 66+ 	/* Cruft to make sure options are clean, and used properly. */
 67+ 	if (argc == 1 && family == AF_UNIX) {
 68+@@ -927,7 +937,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints,
 69+     char *ipaddr)
 70+ {
 71+ 	struct addrinfo *res, *res0;
 72+-	int s = -1, error, herr, on = 1, save_errno;
 73++	int s = -1, error, herr, save_errno;
 74++#ifdef SO_BINDANY
 75++	int on = 1;
 76++#endif
 77+ 
 78+ 	if ((error = getaddrinfo(host, port, &hints, &res0)))
 79+ 		errx(1, "getaddrinfo for host \"%s\" port %s: %s", host,
 80+@@ -942,8 +955,10 @@ remote_connect(const char *host, const char *port, struct addrinfo hints,
 81+ 		if (sflag || pflag) {
 82+ 			struct addrinfo ahints, *ares;
 83+ 
 84++#ifdef SO_BINDANY
 85+ 			/* try SO_BINDANY, but don't insist */
 86+ 			setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on));
 87++#endif
 88+ 			memset(&ahints, 0, sizeof(struct addrinfo));
 89+ 			ahints.ai_family = res->ai_family;
 90+ 			ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
 91+@@ -1035,8 +1050,11 @@ int
 92+ local_listen(const char *host, const char *port, struct addrinfo hints)
 93+ {
 94+ 	struct addrinfo *res, *res0;
 95+-	int s = -1, ret, x = 1, save_errno;
 96++	int s = -1, save_errno;
 97+ 	int error;
 98++#ifdef SO_REUSEPORT
 99++	int ret, x = 1;
100++#endif
101+ 
102+ 	/* Allow nodename to be null. */
103+ 	hints.ai_flags |= AI_PASSIVE;
104+@@ -1056,9 +1074,11 @@ local_listen(const char *host, const char *port, struct addrinfo hints)
105+ 		    res->ai_protocol)) == -1)
106+ 			continue;
107+ 
108++#ifdef SO_REUSEPORT
109+ 		ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x));
110+ 		if (ret == -1)
111+ 			err(1, NULL);
112++#endif
113+ 
114+ 		set_common_sockopts(s, res->ai_family);
115+ 
116+@@ -1557,11 +1577,13 @@ set_common_sockopts(int s, int af)
117+ {
118+ 	int x = 1;
119+ 
120++#ifdef TCP_MD5SIG
121+ 	if (Sflag) {
122+ 		if (setsockopt(s, IPPROTO_TCP, TCP_MD5SIG,
123+ 		    &x, sizeof(x)) == -1)
124+ 			err(1, NULL);
125+ 	}
126++#endif
127+ 	if (Dflag) {
128+ 		if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
129+ 		    &x, sizeof(x)) == -1)
130+@@ -1572,9 +1594,16 @@ set_common_sockopts(int s, int af)
131+ 		    IP_TOS, &Tflag, sizeof(Tflag)) == -1)
132+ 			err(1, "set IP ToS");
133+ 
134++#ifdef IPV6_TCLASS
135+ 		else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6,
136+ 		    IPV6_TCLASS, &Tflag, sizeof(Tflag)) == -1)
137+ 			err(1, "set IPv6 traffic class");
138++#else
139++		else if (af == AF_INET6) {
140++			errno = ENOPROTOOPT;
141++			err(1, "set IPv6 traffic class not supported");
142++		}
143++#endif
144+ 	}
145+ 	if (Iflag) {
146+ 		if (setsockopt(s, SOL_SOCKET, SO_RCVBUF,
147+@@ -1598,13 +1627,17 @@ set_common_sockopts(int s, int af)
148+ 	}
149+ 
150+ 	if (minttl != -1) {
151++#ifdef IP_MINTTL
152+ 		if (af == AF_INET && setsockopt(s, IPPROTO_IP,
153+ 		    IP_MINTTL, &minttl, sizeof(minttl)))
154+ 			err(1, "set IP min TTL");
155++#endif
156+ 
157+-		else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6,
158++#ifdef IPV6_MINHOPCOUNT
159++		if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6,
160+ 		    IPV6_MINHOPCOUNT, &minttl, sizeof(minttl)))
161+ 			err(1, "set IPv6 min hop count");
162++#endif
163+ 	}
164+ }
165+ 
166+@@ -1829,14 +1862,22 @@ help(void)
167+ 	\t-P proxyuser\tUsername for proxy authentication\n\
168+ 	\t-p port\t	Specify local port for remote connects\n\
169+ 	\t-R CAfile	CA bundle\n\
170+-	\t-r		Randomize remote ports\n\
171+-	\t-S		Enable the TCP MD5 signature option\n\
172++	\t-r		Randomize remote ports\n"
173++#ifdef TCP_MD5SIG
174++	"\
175++	\t-S		Enable the TCP MD5 signature option\n"
176++#endif
177++	"\
178+ 	\t-s sourceaddr	Local source address\n\
179+ 	\t-T keyword	TOS value or TLS options\n\
180+ 	\t-t		Answer TELNET negotiation\n\
181+ 	\t-U		Use UNIX domain socket\n\
182+-	\t-u		UDP mode\n\
183+-	\t-V rtable	Specify alternate routing table\n\
184++	\t-u		UDP mode\n"
185++#ifdef SO_RTABLE
186++	"\
187++	\t-V rtable	Specify alternate routing table\n"
188++#endif
189++	"\
190+ 	\t-v		Verbose\n\
191+ 	\t-W recvlimit	Terminate after receiving a number of packets\n\
192+ 	\t-w timeout	Timeout for connects and final net reads\n\
193+-- 
194+2.37.3
195+
+26, -0
 1@@ -0,0 +1,26 @@
 2+From 0f49ae38698a163f7954d28bbaba473b6bf28239 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 10 Jan 2020 21:40:03 -0800
 5+Subject: [PATCH] pax: Ignore EOPNOTSUPP from fchmodat
 6+
 7+Linux does not support changing the mode of symlinks.
 8+---
 9+ bin/pax/file_subs.c | 2 +-
10+ 1 file changed, 1 insertion(+), 1 deletion(-)
11+
12+diff --git a/bin/pax/file_subs.c b/bin/pax/file_subs.c
13+index 8aa3d249923..2c0994feca6 100644
14+--- a/bin/pax/file_subs.c
15++++ b/bin/pax/file_subs.c
16+@@ -795,7 +795,7 @@ void
17+ set_pmode(char *fnm, mode_t mode)
18+ {
19+ 	mode &= ABITS;
20+-	if (fchmodat(AT_FDCWD, fnm, mode, AT_SYMLINK_NOFOLLOW) == -1)
21++	if (fchmodat(AT_FDCWD, fnm, mode, AT_SYMLINK_NOFOLLOW) == -1 && errno != EOPNOTSUPP)
22+ 		syswarn(1, errno, "Could not set permissions on %s", fnm);
23+ }
24+ 
25+-- 
26+2.26.2
27+
+24, -0
 1@@ -0,0 +1,24 @@
 2+From c3aab43559f17feb64a29f8b0d395532cb423e8b Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Wed, 15 Apr 2020 20:26:16 -0700
 5+Subject: [PATCH] acme-client: Fix build with old bison versions
 6+
 7+---
 8+ usr.sbin/acme-client/parse.y | 1 +
 9+ 1 file changed, 1 insertion(+)
10+
11+diff --git a/usr.sbin/acme-client/parse.y b/usr.sbin/acme-client/parse.y
12+index 20818328d92..f392e516b63 100644
13+--- a/usr.sbin/acme-client/parse.y
14++++ b/usr.sbin/acme-client/parse.y
15+@@ -97,6 +97,7 @@ typedef struct {
16+ 	} v;
17+ 	int lineno;
18+ } YYSTYPE;
19++#define YYSTYPE_IS_DECLARED 1
20+ 
21+ %}
22+ 
23+-- 
24+2.26.1
25+
+410, -0
  1@@ -0,0 +1,410 @@
  2+From 01657f2c1445cf4874337a0966a76f24ba9c9536 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Wed, 15 Apr 2020 22:10:06 -0700
  5+Subject: [PATCH] rsync: Add implementation of MD4
  6+
  7+---
  8+ usr.bin/rsync/Makefile     |   2 +-
  9+ usr.bin/rsync/blocks.c     |   2 +-
 10+ usr.bin/rsync/downloader.c |   2 +-
 11+ usr.bin/rsync/hash.c       |   2 +-
 12+ usr.bin/rsync/md4.c        | 266 +++++++++++++++++++++++++++++++++++++
 13+ usr.bin/rsync/md4.h        |  47 +++++++
 14+ usr.bin/rsync/sender.c     |   2 +-
 15+ 7 files changed, 318 insertions(+), 5 deletions(-)
 16+ create mode 100644 usr.bin/rsync/md4.c
 17+ create mode 100644 usr.bin/rsync/md4.h
 18+
 19+diff --git a/usr.bin/rsync/Makefile b/usr.bin/rsync/Makefile
 20+index 3c60f18e07f..172045ce7ac 100644
 21+--- a/usr.bin/rsync/Makefile
 22++++ b/usr.bin/rsync/Makefile
 23+@@ -2,7 +2,7 @@
 24+ 
 25+ PROG=	openrsync
 26+ SRCS=	blocks.c client.c copy.c downloader.c fargs.c flist.c hash.c ids.c \
 27+-	io.c log.c main.c misc.c mkpath.c mktemp.c receiver.c rmatch.c \
 28++	io.c log.c main.c md4.c misc.c mkpath.c mktemp.c receiver.c rmatch.c \
 29+ 	rules.c sender.c server.c session.c socket.c symlinks.c uploader.c
 30+ LDADD+= -lcrypto -lm -lutil
 31+ DPADD+= ${LIBCRYPTO} ${LIBM} ${LIBUTIL}
 32+diff --git a/usr.bin/rsync/blocks.c b/usr.bin/rsync/blocks.c
 33+index 906733c968e..0a8c3f485d1 100644
 34+--- a/usr.bin/rsync/blocks.c
 35++++ b/usr.bin/rsync/blocks.c
 36+@@ -26,7 +26,7 @@
 37+ #include <string.h>
 38+ #include <unistd.h>
 39+ 
 40+-#include <openssl/md4.h>
 41++#include "md4.h"
 42+ 
 43+ #include "extern.h"
 44+ 
 45+diff --git a/usr.bin/rsync/downloader.c b/usr.bin/rsync/downloader.c
 46+index 07ec334f6b4..6543851fd2c 100644
 47+--- a/usr.bin/rsync/downloader.c
 48++++ b/usr.bin/rsync/downloader.c
 49+@@ -28,7 +28,7 @@
 50+ #include <time.h>
 51+ #include <unistd.h>
 52+ 
 53+-#include <openssl/md4.h>
 54++#include "md4.h"
 55+ 
 56+ #include "extern.h"
 57+ 
 58+diff --git a/usr.bin/rsync/hash.c b/usr.bin/rsync/hash.c
 59+index b87c56f527c..44ae0d26282 100644
 60+--- a/usr.bin/rsync/hash.c
 61++++ b/usr.bin/rsync/hash.c
 62+@@ -21,7 +21,7 @@
 63+ #include <stdint.h>
 64+ #include <stdlib.h>
 65+ 
 66+-#include <openssl/md4.h>
 67++#include "md4.h"
 68+ 
 69+ #include "extern.h"
 70+ 
 71+diff --git a/usr.bin/rsync/md4.c b/usr.bin/rsync/md4.c
 72+new file mode 100644
 73+index 00000000000..528f985563f
 74+--- /dev/null
 75++++ b/usr.bin/rsync/md4.c
 76+@@ -0,0 +1,266 @@
 77++/*
 78++ * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
 79++ * MD4 Message-Digest Algorithm (RFC 1320).
 80++ *
 81++ * Homepage:
 82++ * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md4
 83++ *
 84++ * Author:
 85++ * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
 86++ *
 87++ * This software was written by Alexander Peslyak in 2001.  No copyright is
 88++ * claimed, and the software is hereby placed in the public domain.
 89++ * In case this attempt to disclaim copyright and place the software in the
 90++ * public domain is deemed null and void, then the software is
 91++ * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
 92++ * general public under the following terms:
 93++ *
 94++ * Redistribution and use in source and binary forms, with or without
 95++ * modification, are permitted.
 96++ *
 97++ * There's ABSOLUTELY NO WARRANTY, express or implied.
 98++ *
 99++ * (This is a heavily cut-down "BSD license".)
100++ *
101++ * This differs from Colin Plumb's older public domain implementation in that
102++ * no exactly 32-bit integer data type is required (any 32-bit or wider
103++ * unsigned integer data type will do), there's no compile-time endianness
104++ * configuration, and the function prototypes match OpenSSL's.  No code from
105++ * Colin Plumb's implementation has been reused; this comment merely compares
106++ * the properties of the two independent implementations.
107++ *
108++ * The primary goals of this implementation are portability and ease of use.
109++ * It is meant to be fast, but not as fast as possible.  Some known
110++ * optimizations are not included to reduce source code size and avoid
111++ * compile-time configuration.
112++ */
113++
114++#include <string.h>
115++
116++#include "md4.h"
117++
118++/*
119++ * The basic MD4 functions.
120++ *
121++ * F and G are optimized compared to their RFC 1320 definitions, with the
122++ * optimization for F borrowed from Colin Plumb's MD5 implementation.
123++ */
124++#define F(x, y, z)			((z) ^ ((x) & ((y) ^ (z))))
125++#define G(x, y, z)			(((x) & ((y) | (z))) | ((y) & (z)))
126++#define H(x, y, z)			((x) ^ (y) ^ (z))
127++
128++/*
129++ * The MD4 transformation for all three rounds.
130++ */
131++#define STEP(f, a, b, c, d, x, s) \
132++	(a) += f((b), (c), (d)) + (x); \
133++	(a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s))));
134++
135++/*
136++ * SET reads 4 input bytes in little-endian byte order and stores them in a
137++ * properly aligned word in host byte order.
138++ *
139++ * The check for little-endian architectures that tolerate unaligned memory
140++ * accesses is just an optimization.  Nothing will break if it fails to detect
141++ * a suitable architecture.
142++ *
143++ * Unfortunately, this optimization may be a C strict aliasing rules violation
144++ * if the caller's data buffer has effective type that cannot be aliased by
145++ * MD4_u32plus.  In practice, this problem may occur if these MD4 routines are
146++ * inlined into a calling function, or with future and dangerously advanced
147++ * link-time optimizations.  For the time being, keeping these MD4 routines in
148++ * their own translation unit avoids the problem.
149++ */
150++#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
151++#define SET(n) \
152++	(*(MD4_u32plus *)&ptr[(n) * 4])
153++#define GET(n) \
154++	SET(n)
155++#else
156++#define SET(n) \
157++	(ctx->block[(n)] = \
158++	(MD4_u32plus)ptr[(n) * 4] | \
159++	((MD4_u32plus)ptr[(n) * 4 + 1] << 8) | \
160++	((MD4_u32plus)ptr[(n) * 4 + 2] << 16) | \
161++	((MD4_u32plus)ptr[(n) * 4 + 3] << 24))
162++#define GET(n) \
163++	(ctx->block[(n)])
164++#endif
165++
166++/*
167++ * This processes one or more 64-byte data blocks, but does NOT update the bit
168++ * counters.  There are no alignment requirements.
169++ */
170++static const void *body(MD4_CTX *ctx, const void *data, unsigned long size)
171++{
172++	const unsigned char *ptr;
173++	MD4_u32plus a, b, c, d;
174++	MD4_u32plus saved_a, saved_b, saved_c, saved_d;
175++	const MD4_u32plus ac1 = 0x5a827999, ac2 = 0x6ed9eba1;
176++
177++	ptr = (const unsigned char *)data;
178++
179++	a = ctx->a;
180++	b = ctx->b;
181++	c = ctx->c;
182++	d = ctx->d;
183++
184++	do {
185++		saved_a = a;
186++		saved_b = b;
187++		saved_c = c;
188++		saved_d = d;
189++
190++/* Round 1 */
191++		STEP(F, a, b, c, d, SET(0), 3)
192++		STEP(F, d, a, b, c, SET(1), 7)
193++		STEP(F, c, d, a, b, SET(2), 11)
194++		STEP(F, b, c, d, a, SET(3), 19)
195++		STEP(F, a, b, c, d, SET(4), 3)
196++		STEP(F, d, a, b, c, SET(5), 7)
197++		STEP(F, c, d, a, b, SET(6), 11)
198++		STEP(F, b, c, d, a, SET(7), 19)
199++		STEP(F, a, b, c, d, SET(8), 3)
200++		STEP(F, d, a, b, c, SET(9), 7)
201++		STEP(F, c, d, a, b, SET(10), 11)
202++		STEP(F, b, c, d, a, SET(11), 19)
203++		STEP(F, a, b, c, d, SET(12), 3)
204++		STEP(F, d, a, b, c, SET(13), 7)
205++		STEP(F, c, d, a, b, SET(14), 11)
206++		STEP(F, b, c, d, a, SET(15), 19)
207++
208++/* Round 2 */
209++		STEP(G, a, b, c, d, GET(0) + ac1, 3)
210++		STEP(G, d, a, b, c, GET(4) + ac1, 5)
211++		STEP(G, c, d, a, b, GET(8) + ac1, 9)
212++		STEP(G, b, c, d, a, GET(12) + ac1, 13)
213++		STEP(G, a, b, c, d, GET(1) + ac1, 3)
214++		STEP(G, d, a, b, c, GET(5) + ac1, 5)
215++		STEP(G, c, d, a, b, GET(9) + ac1, 9)
216++		STEP(G, b, c, d, a, GET(13) + ac1, 13)
217++		STEP(G, a, b, c, d, GET(2) + ac1, 3)
218++		STEP(G, d, a, b, c, GET(6) + ac1, 5)
219++		STEP(G, c, d, a, b, GET(10) + ac1, 9)
220++		STEP(G, b, c, d, a, GET(14) + ac1, 13)
221++		STEP(G, a, b, c, d, GET(3) + ac1, 3)
222++		STEP(G, d, a, b, c, GET(7) + ac1, 5)
223++		STEP(G, c, d, a, b, GET(11) + ac1, 9)
224++		STEP(G, b, c, d, a, GET(15) + ac1, 13)
225++
226++/* Round 3 */
227++		STEP(H, a, b, c, d, GET(0) + ac2, 3)
228++		STEP(H, d, a, b, c, GET(8) + ac2, 9)
229++		STEP(H, c, d, a, b, GET(4) + ac2, 11)
230++		STEP(H, b, c, d, a, GET(12) + ac2, 15)
231++		STEP(H, a, b, c, d, GET(2) + ac2, 3)
232++		STEP(H, d, a, b, c, GET(10) + ac2, 9)
233++		STEP(H, c, d, a, b, GET(6) + ac2, 11)
234++		STEP(H, b, c, d, a, GET(14) + ac2, 15)
235++		STEP(H, a, b, c, d, GET(1) + ac2, 3)
236++		STEP(H, d, a, b, c, GET(9) + ac2, 9)
237++		STEP(H, c, d, a, b, GET(5) + ac2, 11)
238++		STEP(H, b, c, d, a, GET(13) + ac2, 15)
239++		STEP(H, a, b, c, d, GET(3) + ac2, 3)
240++		STEP(H, d, a, b, c, GET(11) + ac2, 9)
241++		STEP(H, c, d, a, b, GET(7) + ac2, 11)
242++		STEP(H, b, c, d, a, GET(15) + ac2, 15)
243++
244++		a += saved_a;
245++		b += saved_b;
246++		c += saved_c;
247++		d += saved_d;
248++
249++		ptr += 64;
250++	} while (size -= 64);
251++
252++	ctx->a = a;
253++	ctx->b = b;
254++	ctx->c = c;
255++	ctx->d = d;
256++
257++	return ptr;
258++}
259++
260++void MD4_Init(MD4_CTX *ctx)
261++{
262++	ctx->a = 0x67452301;
263++	ctx->b = 0xefcdab89;
264++	ctx->c = 0x98badcfe;
265++	ctx->d = 0x10325476;
266++
267++	ctx->lo = 0;
268++	ctx->hi = 0;
269++}
270++
271++void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
272++{
273++	MD4_u32plus saved_lo;
274++	unsigned long used, available;
275++
276++	saved_lo = ctx->lo;
277++	if ((ctx->lo = (saved_lo + size) & 0x1fffffff) < saved_lo)
278++		ctx->hi++;
279++	ctx->hi += size >> 29;
280++
281++	used = saved_lo & 0x3f;
282++
283++	if (used) {
284++		available = 64 - used;
285++
286++		if (size < available) {
287++			memcpy(&ctx->buffer[used], data, size);
288++			return;
289++		}
290++
291++		memcpy(&ctx->buffer[used], data, available);
292++		data = (const unsigned char *)data + available;
293++		size -= available;
294++		body(ctx, ctx->buffer, 64);
295++	}
296++
297++	if (size >= 64) {
298++		data = body(ctx, data, size & ~(unsigned long)0x3f);
299++		size &= 0x3f;
300++	}
301++
302++	memcpy(ctx->buffer, data, size);
303++}
304++
305++#define OUT(dst, src) \
306++	(dst)[0] = (unsigned char)(src); \
307++	(dst)[1] = (unsigned char)((src) >> 8); \
308++	(dst)[2] = (unsigned char)((src) >> 16); \
309++	(dst)[3] = (unsigned char)((src) >> 24);
310++
311++void MD4_Final(unsigned char *result, MD4_CTX *ctx)
312++{
313++	unsigned long used, available;
314++
315++	used = ctx->lo & 0x3f;
316++
317++	ctx->buffer[used++] = 0x80;
318++
319++	available = 64 - used;
320++
321++	if (available < 8) {
322++		memset(&ctx->buffer[used], 0, available);
323++		body(ctx, ctx->buffer, 64);
324++		used = 0;
325++		available = 64;
326++	}
327++
328++	memset(&ctx->buffer[used], 0, available - 8);
329++
330++	ctx->lo <<= 3;
331++	OUT(&ctx->buffer[56], ctx->lo)
332++	OUT(&ctx->buffer[60], ctx->hi)
333++
334++	body(ctx, ctx->buffer, 64);
335++
336++	OUT(&result[0], ctx->a)
337++	OUT(&result[4], ctx->b)
338++	OUT(&result[8], ctx->c)
339++	OUT(&result[12], ctx->d)
340++
341++	memset(ctx, 0, sizeof(*ctx));
342++}
343+diff --git a/usr.bin/rsync/md4.h b/usr.bin/rsync/md4.h
344+new file mode 100644
345+index 00000000000..ebf5bb555a0
346+--- /dev/null
347++++ b/usr.bin/rsync/md4.h
348+@@ -0,0 +1,47 @@
349++/*
350++ * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
351++ * MD4 Message-Digest Algorithm (RFC 1320).
352++ *
353++ * Homepage:
354++ * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md4
355++ *
356++ * Author:
357++ * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
358++ *
359++ * This software was written by Alexander Peslyak in 2001.  No copyright is
360++ * claimed, and the software is hereby placed in the public domain.
361++ * In case this attempt to disclaim copyright and place the software in the
362++ * public domain is deemed null and void, then the software is
363++ * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
364++ * general public under the following terms:
365++ *
366++ * Redistribution and use in source and binary forms, with or without
367++ * modification, are permitted.
368++ *
369++ * There's ABSOLUTELY NO WARRANTY, express or implied.
370++ *
371++ * See md4.c for more information.
372++ */
373++
374++#ifndef _MD4_H
375++#define _MD4_H
376++
377++#include <stdint.h>
378++
379++#define MD4_DIGEST_LENGTH 16
380++
381++/* Any 32-bit or wider unsigned integer data type will do */
382++typedef uint_fast32_t MD4_u32plus;
383++
384++typedef struct {
385++	MD4_u32plus lo, hi;
386++	MD4_u32plus a, b, c, d;
387++	unsigned char buffer[64];
388++	MD4_u32plus block[16];
389++} MD4_CTX;
390++
391++extern void MD4_Init(MD4_CTX *ctx);
392++extern void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size);
393++extern void MD4_Final(unsigned char *result, MD4_CTX *ctx);
394++
395++#endif
396+diff --git a/usr.bin/rsync/sender.c b/usr.bin/rsync/sender.c
397+index 9dd008def01..2aeb99b64a0 100644
398+--- a/usr.bin/rsync/sender.c
399++++ b/usr.bin/rsync/sender.c
400+@@ -26,7 +26,7 @@
401+ #include <string.h>
402+ #include <unistd.h>
403+ 
404+-#include <openssl/md4.h>
405++#include "md4.h"
406+ 
407+ #include "extern.h"
408+ 
409+-- 
410+2.35.1
411+
+48, -0
 1@@ -0,0 +1,48 @@
 2+From f855b534ca2c34c3691a0c89d1be482a33a3610c Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 4 Jun 2020 21:36:11 -0700
 5+Subject: [PATCH] pax: Fix some incorrect format specifiers
 6+
 7+---
 8+ bin/pax/cpio.c     | 2 +-
 9+ bin/pax/gen_subs.c | 4 ++--
10+ 2 files changed, 3 insertions(+), 3 deletions(-)
11+
12+diff --git a/bin/pax/cpio.c b/bin/pax/cpio.c
13+index 3832b1e87aa..769a9dfb990 100644
14+--- a/bin/pax/cpio.c
15++++ b/bin/pax/cpio.c
16+@@ -214,7 +214,7 @@ rd_ln_nm(ARCHD *arcn)
17+ 	 */
18+ 	if ((arcn->sb.st_size <= 0) ||
19+ 	    (arcn->sb.st_size >= (off_t)sizeof(arcn->ln_name))) {
20+-		paxwarn(1, "Cpio link name length is invalid: %lld",
21++		paxwarn(1, "Cpio link name length is invalid: %zu",
22+ 		    arcn->sb.st_size);
23+ 		return(-1);
24+ 	}
25+diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c
26+index 405dd2c24ed..7eb82007e3b 100644
27+--- a/bin/pax/gen_subs.c
28++++ b/bin/pax/gen_subs.c
29+@@ -109,7 +109,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
30+ 	if (strftime(f_date, sizeof(f_date), TIMEFMT(sbp->st_mtime, now),
31+ 	    localtime(&(sbp->st_mtime))) == 0)
32+ 		f_date[0] = '\0';
33+-	(void)fprintf(fp, "%s%2u %-*.*s %-*.*s ", f_mode, sbp->st_nlink,
34++	(void)fprintf(fp, "%s%2u %-*.*s %-*.*s ", f_mode, (unsigned)sbp->st_nlink,
35+ 		NAME_WIDTH, UT_NAMESIZE, user_from_uid(sbp->st_uid, 0),
36+ 		NAME_WIDTH, UT_NAMESIZE, group_from_gid(sbp->st_gid, 0));
37+ 
38+@@ -121,7 +121,7 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
39+ 		    (unsigned long)MAJOR(sbp->st_rdev),
40+ 		    (unsigned long)MINOR(sbp->st_rdev));
41+ 	else {
42+-		(void)fprintf(fp, "%9llu ", sbp->st_size);
43++		(void)fprintf(fp, "%9zu ", sbp->st_size);
44+ 	}
45+ 
46+ 	/*
47+-- 
48+2.27.0
49+
+27, -0
 1@@ -0,0 +1,27 @@
 2+From e5c8e801a42459bf0c416f6751b687d61f46fcf1 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 4 Jun 2020 21:44:26 -0700
 5+Subject: [PATCH] pax: Use memcpy to set TMAGIC and TVERSION to avoid warning
 6+
 7+---
 8+ bin/pax/tar.c | 4 ++--
 9+ 1 file changed, 2 insertions(+), 2 deletions(-)
10+
11+diff --git a/bin/pax/tar.c b/bin/pax/tar.c
12+index 8d6b3f37012..1f4012123c3 100644
13+--- a/bin/pax/tar.c
14++++ b/bin/pax/tar.c
15+@@ -1040,8 +1040,8 @@ ustar_wr(ARCHD *arcn)
16+ 		break;
17+ 	}
18+ 
19+-	strncpy(hd->magic, TMAGIC, TMAGLEN);
20+-	strncpy(hd->version, TVERSION, TVERSLEN);
21++	memcpy(hd->magic, TMAGIC, TMAGLEN);
22++	memcpy(hd->version, TVERSION, TVERSLEN);
23+ 
24+ 	/*
25+ 	 * set the remaining fields. Some versions want all 16 bits of mode
26+-- 
27+2.35.1
28+
+42, -0
 1@@ -0,0 +1,42 @@
 2+From 0a32d4f555441c1928547f8f08a6373a6c9d8bf1 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 4 Jun 2020 21:36:24 -0700
 5+Subject: [PATCH] rsync: Fix some incorrect format specifiers
 6+
 7+---
 8+ usr.bin/rsync/fargs.c    | 4 ++--
 9+ usr.bin/rsync/uploader.c | 2 +-
10+ 2 files changed, 3 insertions(+), 3 deletions(-)
11+
12+diff --git a/usr.bin/rsync/fargs.c b/usr.bin/rsync/fargs.c
13+index 7ccb5bff7d2..ef1aaf37c87 100644
14+--- a/usr.bin/rsync/fargs.c
15++++ b/usr.bin/rsync/fargs.c
16+@@ -132,9 +132,9 @@ fargs_cmdline(struct sess *sess, const struct fargs *f, size_t *skip)
17+ 		/* --devices is sent as -D --no-specials */
18+ 		addargs(&args, "--no-specials");
19+ 	if (sess->opts->max_size >= 0)
20+-		addargs(&args, "--max-size=%lld", sess->opts->max_size);
21++		addargs(&args, "--max-size=%jd", (intmax_t)sess->opts->max_size);
22+ 	if (sess->opts->min_size >= 0)
23+-		addargs(&args, "--min-size=%lld", sess->opts->min_size);
24++		addargs(&args, "--min-size=%jd", (intmax_t)sess->opts->min_size);
25+ 
26+ 	/* only add --compare-dest, etc if this is the sender */
27+ 	if (sess->opts->alt_base_mode != 0 &&
28+diff --git a/usr.bin/rsync/uploader.c b/usr.bin/rsync/uploader.c
29+index 678b6c96218..951a5ee4133 100644
30+--- a/usr.bin/rsync/uploader.c
31++++ b/usr.bin/rsync/uploader.c
32+@@ -1010,7 +1010,7 @@ rsync_uploader(struct upload *u, int *fileinfd,
33+ 			init_blk(&blk.blks[i], &blk, offs, i, mbuf, sess);
34+ 			offs += blk.len;
35+ 			LOG3(
36+-			    "i=%ld, offs=%lld, msz=%ld, blk.len=%lu, blk.rem=%lu",
37++			    "i=%zu, offs=%td, msz=%zd, blk.len=%zu, blk.rem=%zu",
38+ 			    i, offs, msz, blk.len, blk.rem);
39+ 			i++;
40+ 		} while (i < blk.blksz);
41+-- 
42+2.35.1
43+
+26, -0
 1@@ -0,0 +1,26 @@
 2+From 666a050e706230ba5b0316a316100d8c7e86c93c Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 4 Jun 2020 21:42:18 -0700
 5+Subject: [PATCH] m4: Declare dopaste only when it's used
 6+
 7+---
 8+ usr.bin/m4/eval.c | 2 ++
 9+ 1 file changed, 2 insertions(+)
10+
11+diff --git a/usr.bin/m4/eval.c b/usr.bin/m4/eval.c
12+index d226505cab3..fe9fbde3d9c 100644
13+--- a/usr.bin/m4/eval.c
14++++ b/usr.bin/m4/eval.c
15+@@ -61,7 +61,9 @@ static void	dodump(const char *[], int);
16+ static void	dotrace(const char *[], int, int);
17+ static void	doifelse(const char *[], int);
18+ static int	doincl(const char *);
19++#ifdef EXTENDED
20+ static int	dopaste(const char *);
21++#endif
22+ static void	dochq(const char *[], int);
23+ static void	dochc(const char *[], int);
24+ static void	dom4wrap(const char *);
25+-- 
26+2.27.0
27+
+160, -0
  1@@ -0,0 +1,160 @@
  2+From cc94758cade79724cc820e654ae12bee639c2692 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Fri, 23 Apr 2021 20:10:05 -0700
  5+Subject: [PATCH] acme-client: Fix signed-ness of base64buf_url input
  6+
  7+This make most of the pointer casts unnecessary.
  8+---
  9+ usr.sbin/acme-client/acctproc.c   | 17 +++++++++--------
 10+ usr.sbin/acme-client/base64.c     |  2 +-
 11+ usr.sbin/acme-client/extern.h     |  2 +-
 12+ usr.sbin/acme-client/keyproc.c    |  5 +++--
 13+ usr.sbin/acme-client/revokeproc.c |  6 ++++--
 14+ 5 files changed, 18 insertions(+), 14 deletions(-)
 15+
 16+diff --git a/usr.sbin/acme-client/acctproc.c b/usr.sbin/acme-client/acctproc.c
 17+index e3a0eb64dec..23d8a1c3a33 100644
 18+--- a/usr.sbin/acme-client/acctproc.c
 19++++ b/usr.sbin/acme-client/acctproc.c
 20+@@ -43,8 +43,9 @@
 21+ static char *
 22+ bn2string(const BIGNUM *bn)
 23+ {
 24+-	int	 len;
 25+-	char	*buf, *bbuf;
 26++	int		 len;
 27++	unsigned char	*buf;
 28++	char		*bbuf;
 29+ 
 30+ 	/* Extract big-endian representation of BIGNUM. */
 31+ 
 32+@@ -52,7 +53,7 @@ bn2string(const BIGNUM *bn)
 33+ 	if ((buf = malloc(len)) == NULL) {
 34+ 		warn("malloc");
 35+ 		return NULL;
 36+-	} else if (len != BN_bn2bin(bn, (unsigned char *)buf)) {
 37++	} else if (len != BN_bn2bin(bn, buf)) {
 38+ 		warnx("BN_bn2bin");
 39+ 		free(buf);
 40+ 		return NULL;
 41+@@ -168,7 +169,7 @@ op_thumbprint(int fd, EVP_PKEY *pkey)
 42+ 		warnx("EVP_Digest");
 43+ 		goto out;
 44+ 	}
 45+-	if ((dig64 = base64buf_url((char *)dig, digsz)) == NULL) {
 46++	if ((dig64 = base64buf_url(dig, digsz)) == NULL) {
 47+ 		warnx("base64buf_url");
 48+ 		goto out;
 49+ 	}
 50+@@ -282,7 +283,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
 51+ 
 52+ 	/* Base64-encode the payload. */
 53+ 
 54+-	if ((pay64 = base64buf_url(pay, strlen(pay))) == NULL) {
 55++	if ((pay64 = base64buf_url((unsigned char *)pay, strlen(pay))) == NULL) {
 56+ 		warnx("base64buf_url");
 57+ 		goto out;
 58+ 	}
 59+@@ -325,7 +326,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
 60+ 
 61+ 	/* The header combined with the nonce, base64. */
 62+ 
 63+-	if ((prot64 = base64buf_url(prot, strlen(prot))) == NULL) {
 64++	if ((prot64 = base64buf_url((unsigned char *)prot, strlen(prot))) == NULL) {
 65+ 		warnx("base64buf_url");
 66+ 		goto out;
 67+ 	}
 68+@@ -364,7 +365,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
 69+ 
 70+ 	switch (EVP_PKEY_base_id(pkey)) {
 71+ 	case EVP_PKEY_RSA:
 72+-		if ((dig64 = base64buf_url((char *)dig, digsz)) == NULL) {
 73++		if ((dig64 = base64buf_url(dig, digsz)) == NULL) {
 74+ 			warnx("base64buf_url");
 75+ 			goto out;
 76+ 		}
 77+@@ -403,7 +404,7 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
 78+ 			goto out;
 79+ 		}
 80+ 
 81+-		if ((dig64 = base64buf_url((char *)buf, 2 * bn_len)) == NULL) {
 82++		if ((dig64 = base64buf_url(buf, 2 * bn_len)) == NULL) {
 83+ 			warnx("base64buf_url");
 84+ 			goto out;
 85+ 		}
 86+diff --git a/usr.sbin/acme-client/base64.c b/usr.sbin/acme-client/base64.c
 87+index 2b6377f0d81..0d84ad4b458 100644
 88+--- a/usr.sbin/acme-client/base64.c
 89++++ b/usr.sbin/acme-client/base64.c
 90+@@ -39,7 +39,7 @@ base64len(size_t len)
 91+  * Returns NULL on allocation failure (not logged).
 92+  */
 93+ char *
 94+-base64buf_url(const char *data, size_t len)
 95++base64buf_url(const unsigned char *data, size_t len)
 96+ {
 97+ 	size_t	 i, sz;
 98+ 	char	*buf;
 99+diff --git a/usr.sbin/acme-client/extern.h b/usr.sbin/acme-client/extern.h
100+index 32d4b4b3d85..701733df786 100644
101+--- a/usr.sbin/acme-client/extern.h
102++++ b/usr.sbin/acme-client/extern.h
103+@@ -245,7 +245,7 @@ int		 checkexit_ext(int *, pid_t, enum comp);
104+  */
105+ size_t		 base64buf(char *, const char *, size_t);
106+ size_t		 base64len(size_t);
107+-char		*base64buf_url(const char *, size_t);
108++char		*base64buf_url(const unsigned char *, size_t);
109+ 
110+ /*
111+  * JSON parsing routines.
112+diff --git a/usr.sbin/acme-client/keyproc.c b/usr.sbin/acme-client/keyproc.c
113+index a3b6666c279..f0df9f292d4 100644
114+--- a/usr.sbin/acme-client/keyproc.c
115++++ b/usr.sbin/acme-client/keyproc.c
116+@@ -77,7 +77,8 @@ int
117+ keyproc(int netsock, const char *keyfile, const char **alts, size_t altsz,
118+     enum keytype keytype)
119+ {
120+-	char		*der64 = NULL, *der = NULL, *dercp;
121++	char		*der64 = NULL;
122++	unsigned char	*der = NULL, *dercp;
123+ 	char		*sans = NULL, *san = NULL;
124+ 	FILE		*f;
125+ 	size_t		 i, sansz;
126+@@ -238,7 +239,7 @@ keyproc(int netsock, const char *keyfile, const char **alts, size_t altsz,
127+ 	} else if ((der = dercp = malloc(len)) == NULL) {
128+ 		warn("malloc");
129+ 		goto out;
130+-	} else if (len != i2d_X509_REQ(x, (u_char **)&dercp)) {
131++	} else if (len != i2d_X509_REQ(x, &dercp)) {
132+ 		warnx("i2d_X509_REQ");
133+ 		goto out;
134+ 	} else if ((der64 = base64buf_url(der, len)) == NULL) {
135+diff --git a/usr.sbin/acme-client/revokeproc.c b/usr.sbin/acme-client/revokeproc.c
136+index 0f1bf32678b..58e81233f1a 100644
137+--- a/usr.sbin/acme-client/revokeproc.c
138++++ b/usr.sbin/acme-client/revokeproc.c
139+@@ -63,7 +63,9 @@ revokeproc(int fd, const char *certfile, int force,
140+     int revocate, const char *const *alts, size_t altsz)
141+ {
142+ 	GENERAL_NAMES			*sans = NULL;
143+-	char				*der = NULL, *dercp, *der64 = NULL;
144++	unsigned char			*der = NULL, *dercp;
145++	char				*der64 = NULL;
146++	char				*san = NULL, *str, *tok;
147+ 	int				 rc = 0, cc, i, len;
148+ 	size_t				*found = NULL;
149+ 	FILE				*f = NULL;
150+@@ -240,7 +242,7 @@ revokeproc(int fd, const char *certfile, int force,
151+ 		} else if ((der = dercp = malloc(len)) == NULL) {
152+ 			warn("malloc");
153+ 			goto out;
154+-		} else if (len != i2d_X509(x, (u_char **)&dercp)) {
155++		} else if (len != i2d_X509(x, &dercp)) {
156+ 			warnx("i2d_X509");
157+ 			goto out;
158+ 		} else if ((der64 = base64buf_url(der, len)) == NULL) {
159+-- 
160+2.37.3
161+
+1548, -0
   1@@ -0,0 +1,1548 @@
   2+From 01e722b50d1f5b56bd1f4a1673d0d812958cc49c Mon Sep 17 00:00:00 2001
   3+From: Michael Forney <mforney@mforney.org>
   4+Date: Fri, 23 Apr 2021 23:14:16 -0700
   5+Subject: [PATCH] acme-client: Port to BearSSL
   6+
   7+---
   8+ usr.sbin/acme-client/acctproc.c   | 299 +++++++++------------------
   9+ usr.sbin/acme-client/certproc.c   |   5 -
  10+ usr.sbin/acme-client/key.c        | 333 ++++++++++++++++++++++++------
  11+ usr.sbin/acme-client/key.h        |  22 +-
  12+ usr.sbin/acme-client/keyproc.c    | 198 ++++++------------
  13+ usr.sbin/acme-client/revokeproc.c | 235 ++++++++++-----------
  14+ 6 files changed, 558 insertions(+), 534 deletions(-)
  15+
  16+diff --git a/usr.sbin/acme-client/acctproc.c b/usr.sbin/acme-client/acctproc.c
  17+index 23d8a1c3a33..3d3e32c1a57 100644
  18+--- a/usr.sbin/acme-client/acctproc.c
  19++++ b/usr.sbin/acme-client/acctproc.c
  20+@@ -19,74 +19,29 @@
  21+ 
  22+ #include <err.h>
  23+ #include <errno.h>
  24+-#include <limits.h>
  25+ #include <stdio.h>
  26+ #include <stdlib.h>
  27+ #include <string.h>
  28+ #include <unistd.h>
  29+ 
  30+-#include <openssl/bn.h>
  31+-#include <openssl/ec.h>
  32+-#include <openssl/ecdsa.h>
  33+-#include <openssl/evp.h>
  34+-#include <openssl/rsa.h>
  35+-#include <openssl/err.h>
  36++#include <bearssl.h>
  37+ 
  38+ #include "extern.h"
  39+ #include "key.h"
  40+ 
  41+-/*
  42+- * Converts a BIGNUM to the form used in JWK.
  43+- * This is essentially a base64-encoded big-endian binary string
  44+- * representation of the number.
  45+- */
  46+-static char *
  47+-bn2string(const BIGNUM *bn)
  48+-{
  49+-	int		 len;
  50+-	unsigned char	*buf;
  51+-	char		*bbuf;
  52+-
  53+-	/* Extract big-endian representation of BIGNUM. */
  54+-
  55+-	len = BN_num_bytes(bn);
  56+-	if ((buf = malloc(len)) == NULL) {
  57+-		warn("malloc");
  58+-		return NULL;
  59+-	} else if (len != BN_bn2bin(bn, buf)) {
  60+-		warnx("BN_bn2bin");
  61+-		free(buf);
  62+-		return NULL;
  63+-	}
  64+-
  65+-	/* Convert to base64url. */
  66+-
  67+-	if ((bbuf = base64buf_url(buf, len)) == NULL) {
  68+-		warnx("base64buf_url");
  69+-		free(buf);
  70+-		return NULL;
  71+-	}
  72+-
  73+-	free(buf);
  74+-	return bbuf;
  75+-}
  76+-
  77+ /*
  78+  * Extract the relevant RSA components from the key and create the JSON
  79+  * thumbprint from them.
  80+  */
  81+ static char *
  82+-op_thumb_rsa(EVP_PKEY *pkey)
  83++op_thumb_rsa(struct key *key)
  84+ {
  85+ 	char	*exp = NULL, *mod = NULL, *json = NULL;
  86+-	RSA	*r;
  87+-
  88+-	if ((r = EVP_PKEY_get0_RSA(pkey)) == NULL)
  89+-		warnx("EVP_PKEY_get0_RSA");
  90+-	else if ((mod = bn2string(RSA_get0_n(r))) == NULL)
  91+-		warnx("bn2string");
  92+-	else if ((exp = bn2string(RSA_get0_e(r))) == NULL)
  93+-		warnx("bn2string");
  94++
  95++	if ((mod = base64buf_url(key->rsa.pk.n, key->rsa.pk.nlen)) == NULL)
  96++		warnx("base64buf_url");
  97++	else if ((exp = base64buf_url(key->rsa.pk.e, key->rsa.pk.elen)) == NULL)
  98++		warnx("base64buf_url");
  99+ 	else if ((json = json_fmt_thumb_rsa(exp, mod)) == NULL)
 100+ 		warnx("json_fmt_thumb_rsa");
 101+ 
 102+@@ -100,31 +55,23 @@ op_thumb_rsa(EVP_PKEY *pkey)
 103+  * thumbprint from them.
 104+  */
 105+ static char *
 106+-op_thumb_ec(EVP_PKEY *pkey)
 107++op_thumb_ec(struct key *key)
 108+ {
 109+-	BIGNUM	*X = NULL, *Y = NULL;
 110+-	EC_KEY	*ec = NULL;
 111++	size_t	len;
 112+ 	char	*x = NULL, *y = NULL;
 113+ 	char	*json = NULL;
 114+ 
 115+-	if ((ec = EVP_PKEY_get0_EC_KEY(pkey)) == NULL)
 116+-		warnx("EVP_PKEY_get0_EC_KEY");
 117+-	else if ((X = BN_new()) == NULL)
 118+-		warnx("BN_new");
 119+-	else if ((Y = BN_new()) == NULL)
 120+-		warnx("BN_new");
 121+-	else if (!EC_POINT_get_affine_coordinates(EC_KEY_get0_group(ec),
 122+-	    EC_KEY_get0_public_key(ec), X, Y, NULL))
 123+-		warnx("EC_POINT_get_affine_coordinates");
 124+-	else if ((x = bn2string(X)) == NULL)
 125+-		warnx("bn2string");
 126+-	else if ((y = bn2string(Y)) == NULL)
 127+-		warnx("bn2string");
 128++	/* Points are stored in uncompressed format. */
 129++	len = key->ec.pk.qlen / 2;
 130++	if (key->ec.pk.qlen % 2 != 1 || key->ec.pk.q[0] != 0x04)
 131++		warnx("invalid EC public key");
 132++	else if ((x = base64buf_url(key->ec.pk.q + 1, len)) == NULL)
 133++		warnx("base64buf_url");
 134++	else if ((y = base64buf_url(key->ec.pk.q + 1 + len, len)) == NULL)
 135++		warnx("base64buf_url");
 136+ 	else if ((json = json_fmt_thumb_ec(x, y)) == NULL)
 137+ 		warnx("json_fmt_thumb_ec");
 138+ 
 139+-	BN_free(X);
 140+-	BN_free(Y);
 141+ 	free(x);
 142+ 	free(y);
 143+ 	return json;
 144+@@ -134,26 +81,26 @@ op_thumb_ec(EVP_PKEY *pkey)
 145+  * The thumbprint operation is used for the challenge sequence.
 146+  */
 147+ static int
 148+-op_thumbprint(int fd, EVP_PKEY *pkey)
 149++op_thumbprint(int fd, struct key *pkey)
 150+ {
 151+-	char		*thumb = NULL, *dig64 = NULL;
 152+-	unsigned char	 dig[EVP_MAX_MD_SIZE];
 153+-	unsigned int	 digsz;
 154+-	int		 rc = 0;
 155++	char			*thumb = NULL, *dig64 = NULL;
 156++	br_sha256_context	 ctx;
 157++	unsigned char		 dig[br_sha256_SIZE];
 158++	int			 rc = 0;
 159+ 
 160+ 	/* Construct the thumbprint input itself. */
 161+ 
 162+-	switch (EVP_PKEY_base_id(pkey)) {
 163+-	case EVP_PKEY_RSA:
 164++	switch (pkey->type) {
 165++	case BR_KEYTYPE_RSA:
 166+ 		if ((thumb = op_thumb_rsa(pkey)) != NULL)
 167+ 			break;
 168+ 		goto out;
 169+-	case EVP_PKEY_EC:
 170++	case BR_KEYTYPE_EC:
 171+ 		if ((thumb = op_thumb_ec(pkey)) != NULL)
 172+ 			break;
 173+ 		goto out;
 174+ 	default:
 175+-		warnx("EVP_PKEY_base_id: unknown key type");
 176++		warnx("unknown key type");
 177+ 		goto out;
 178+ 	}
 179+ 
 180+@@ -164,12 +111,10 @@ op_thumbprint(int fd, EVP_PKEY *pkey)
 181+ 	 * it up in the read loop).
 182+ 	 */
 183+ 
 184+-	if (!EVP_Digest(thumb, strlen(thumb), dig, &digsz, EVP_sha256(),
 185+-	    NULL)) {
 186+-		warnx("EVP_Digest");
 187+-		goto out;
 188+-	}
 189+-	if ((dig64 = base64buf_url(dig, digsz)) == NULL) {
 190++	br_sha256_init(&ctx);
 191++	br_sha256_update(&ctx, thumb, strlen(thumb));
 192++	br_sha256_out(&ctx, dig);
 193++	if ((dig64 = base64buf_url(dig, sizeof(dig))) == NULL) {
 194+ 		warnx("base64buf_url");
 195+ 		goto out;
 196+ 	}
 197+@@ -184,11 +129,10 @@ out:
 198+ }
 199+ 
 200+ static int
 201+-op_sign_rsa(char **prot, EVP_PKEY *pkey, const char *nonce, const char *url)
 202++op_sign_rsa(char **prot, struct key *key, const char *nonce, const char *url)
 203+ {
 204+ 	char	*exp = NULL, *mod = NULL;
 205+ 	int	rc = 0;
 206+-	RSA	*r;
 207+ 
 208+ 	*prot = NULL;
 209+ 
 210+@@ -197,12 +141,10 @@ op_sign_rsa(char **prot, EVP_PKEY *pkey, const char *nonce, const char *url)
 211+ 	 * Finally, format the header combined with the nonce.
 212+ 	 */
 213+ 
 214+-	if ((r = EVP_PKEY_get0_RSA(pkey)) == NULL)
 215+-		warnx("EVP_PKEY_get0_RSA");
 216+-	else if ((mod = bn2string(RSA_get0_n(r))) == NULL)
 217+-		warnx("bn2string");
 218+-	else if ((exp = bn2string(RSA_get0_e(r))) == NULL)
 219+-		warnx("bn2string");
 220++	if ((mod = base64buf_url(key->rsa.pk.n, key->rsa.pk.nlen)) == NULL)
 221++		warnx("base64buf_url");
 222++	else if ((exp = base64buf_url(key->rsa.pk.e, key->rsa.pk.elen)) == NULL)
 223++		warnx("base64buf_url");
 224+ 	else if ((*prot = json_fmt_protected_rsa(exp, mod, nonce, url)) == NULL)
 225+ 		warnx("json_fmt_protected_rsa");
 226+ 	else
 227+@@ -214,35 +156,27 @@ op_sign_rsa(char **prot, EVP_PKEY *pkey, const char *nonce, const char *url)
 228+ }
 229+ 
 230+ static int
 231+-op_sign_ec(char **prot, EVP_PKEY *pkey, const char *nonce, const char *url)
 232++op_sign_ec(char **prot, struct key *key, const char *nonce, const char *url)
 233+ {
 234+-	BIGNUM	*X = NULL, *Y = NULL;
 235+-	EC_KEY	*ec = NULL;
 236++	size_t	len;
 237+ 	char	*x = NULL, *y = NULL;
 238+ 	int	rc = 0;
 239+ 
 240+ 	*prot = NULL;
 241+ 
 242+-	if ((ec = EVP_PKEY_get0_EC_KEY(pkey)) == NULL)
 243+-		warnx("EVP_PKEY_get0_EC_KEY");
 244+-	else if ((X = BN_new()) == NULL)
 245+-		warnx("BN_new");
 246+-	else if ((Y = BN_new()) == NULL)
 247+-		warnx("BN_new");
 248+-	else if (!EC_POINT_get_affine_coordinates(EC_KEY_get0_group(ec),
 249+-	    EC_KEY_get0_public_key(ec), X, Y, NULL))
 250+-		warnx("EC_POINT_get_affine_coordinates");
 251+-	else if ((x = bn2string(X)) == NULL)
 252+-		warnx("bn2string");
 253+-	else if ((y = bn2string(Y)) == NULL)
 254+-		warnx("bn2string");
 255++	/* Points are stored in uncompressed format. */
 256++	len = key->ec.pk.qlen / 2;
 257++	if (key->ec.pk.qlen % 2 != 1 || key->ec.pk.q[0] != 0x04)
 258++		warnx("invalid EC public key");
 259++	else if ((x = base64buf_url(key->ec.pk.q + 1, len)) == NULL)
 260++		warnx("base64buf_url");
 261++	else if ((y = base64buf_url(key->ec.pk.q + 1 + len, len)) == NULL)
 262++		warnx("base64buf_url");
 263+ 	else if ((*prot = json_fmt_protected_ec(x, y, nonce, url)) == NULL)
 264+ 		warnx("json_fmt_protected_ec");
 265+ 	else
 266+ 		rc = 1;
 267+ 
 268+-	BN_free(X);
 269+-	BN_free(Y);
 270+ 	free(x);
 271+ 	free(y);
 272+ 	return rc;
 273+@@ -253,20 +187,18 @@ op_sign_ec(char **prot, EVP_PKEY *pkey, const char *nonce, const char *url)
 274+  * This requires the sender ("fd") to provide the payload and a nonce.
 275+  */
 276+ static int
 277+-op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
 278++op_sign(int fd, struct key *key, enum acctop op)
 279+ {
 280+-	EVP_MD_CTX		*ctx = NULL;
 281+-	const EVP_MD		*evp_md = NULL;
 282+-	ECDSA_SIG		*ec_sig = NULL;
 283+-	const BIGNUM		*ec_sig_r = NULL, *ec_sig_s = NULL;
 284+-	int			 bn_len, sign_len, rc = 0;
 285++	br_hash_compat_context	 ctx;
 286++	int			 sign_len, rc = 0;
 287++	unsigned int		 digsz, sigsz;
 288+ 	char			*nonce = NULL, *pay = NULL, *pay64 = NULL;
 289+ 	char			*prot = NULL, *prot64 = NULL;
 290+-	char			*sign = NULL, *dig64 = NULL, *fin = NULL;
 291++	char			*sign = NULL, *sig64 = NULL, *fin = NULL;
 292+ 	char			*url = NULL, *kid = NULL, *alg = NULL;
 293+-	const unsigned char	*digp;
 294+-	unsigned char		*dig = NULL, *buf = NULL;
 295+-	size_t			 digsz;
 296++	unsigned char		 dig[64];
 297++	unsigned char		*sig = NULL;
 298++	const unsigned char	*oid = NULL;
 299+ 
 300+ 	/* Read our payload and nonce from the requestor. */
 301+ 
 302+@@ -283,19 +215,22 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
 303+ 
 304+ 	/* Base64-encode the payload. */
 305+ 
 306+-	if ((pay64 = base64buf_url((unsigned char *)pay, strlen(pay))) == NULL) {
 307++	if ((pay64 = base64buf_url(pay, strlen(pay))) == NULL) {
 308+ 		warnx("base64buf_url");
 309+ 		goto out;
 310+ 	}
 311+ 
 312+-	switch (EVP_PKEY_base_id(pkey)) {
 313+-	case EVP_PKEY_RSA:
 314++	switch (key->type) {
 315++	case BR_KEYTYPE_RSA:
 316+ 		alg = "RS256";
 317+-		evp_md = EVP_sha256();
 318++		ctx.vtable = &br_sha256_vtable;
 319++		oid = BR_HASH_OID_SHA256;
 320++		sigsz = (key->rsa.sk.n_bitlen + 7) / 8;
 321+ 		break;
 322+-	case EVP_PKEY_EC:
 323++	case BR_KEYTYPE_EC:
 324+ 		alg = "ES384";
 325+-		evp_md = EVP_sha384();
 326++		ctx.vtable = &br_sha384_vtable;
 327++		sigsz = 96;
 328+ 		break;
 329+ 	default:
 330+ 		warnx("unknown account key type");
 331+@@ -309,17 +244,17 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
 332+ 			goto out;
 333+ 		}
 334+ 	} else {
 335+-		switch (EVP_PKEY_base_id(pkey)) {
 336+-		case EVP_PKEY_RSA:
 337+-			if (!op_sign_rsa(&prot, pkey, nonce, url))
 338++		switch (key->type) {
 339++		case BR_KEYTYPE_RSA:
 340++			if (!op_sign_rsa(&prot, key, nonce, url))
 341+ 				goto out;
 342+ 			break;
 343+-		case EVP_PKEY_EC:
 344+-			if (!op_sign_ec(&prot, pkey, nonce, url))
 345++		case BR_KEYTYPE_EC:
 346++			if (!op_sign_ec(&prot, key, nonce, url))
 347+ 				goto out;
 348+ 			break;
 349+ 		default:
 350+-			warnx("EVP_PKEY_base_id");
 351++			warnx("unknown key type");
 352+ 			goto out;
 353+ 		}
 354+ 	}
 355+@@ -342,76 +277,34 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
 356+ 
 357+ 	/* Sign the message. */
 358+ 
 359+-	if ((ctx = EVP_MD_CTX_new()) == NULL) {
 360+-		warnx("EVP_MD_CTX_new");
 361+-		goto out;
 362+-	}
 363+-	if (!EVP_DigestSignInit(ctx, NULL, evp_md, NULL, pkey)) {
 364+-		warnx("EVP_DigestSignInit");
 365+-		goto out;
 366+-	}
 367+-	if (!EVP_DigestSign(ctx, NULL, &digsz, sign, sign_len)) {
 368+-		warnx("EVP_DigestSign");
 369+-		goto out;
 370+-	}
 371+-	if ((dig = malloc(digsz)) == NULL) {
 372++	ctx.vtable->init(&ctx.vtable);
 373++	ctx.vtable->update(&ctx.vtable, sign, sign_len);
 374++	ctx.vtable->out(&ctx.vtable, dig);
 375++	digsz = ctx.vtable->desc >> BR_HASHDESC_OUT_OFF & BR_HASHDESC_OUT_MASK;
 376++
 377++	if ((sig = malloc(sigsz)) == NULL) {
 378+ 		warn("malloc");
 379+ 		goto out;
 380+ 	}
 381+-	if (!EVP_DigestSign(ctx, dig, &digsz, sign, sign_len)) {
 382+-		warnx("EVP_DigestSign");
 383+-		goto out;
 384+-	}
 385+ 
 386+-	switch (EVP_PKEY_base_id(pkey)) {
 387+-	case EVP_PKEY_RSA:
 388+-		if ((dig64 = base64buf_url(dig, digsz)) == NULL) {
 389+-			warnx("base64buf_url");
 390++	switch (key->type) {
 391++	case BR_KEYTYPE_RSA:
 392++		if (!br_rsa_pkcs1_sign_get_default()(oid, dig, digsz,
 393++		    &key->rsa.sk, sig)) {
 394++			warnx("br_rsa_pkcs1_sign");
 395+ 			goto out;
 396+ 		}
 397+ 		break;
 398+-	case EVP_PKEY_EC:
 399+-		if (digsz > LONG_MAX) {
 400+-			warnx("EC signature too long");
 401+-			goto out;
 402+-		}
 403+-
 404+-		digp = dig;
 405+-		if ((ec_sig = d2i_ECDSA_SIG(NULL, &digp, digsz)) == NULL) {
 406+-			warnx("d2i_ECDSA_SIG");
 407++	case BR_KEYTYPE_EC:
 408++		sigsz = br_ecdsa_sign_raw_get_default()(br_ec_get_default(),
 409++		    ctx.vtable, dig, &key->ec.sk, sig);
 410++		if (sigsz == 0 || sigsz % 2 != 0) {
 411++			warnx("br_ecdsa_sign_raw");
 412+ 			goto out;
 413+ 		}
 414+-
 415+-		if ((ec_sig_r = ECDSA_SIG_get0_r(ec_sig)) == NULL ||
 416+-		    (ec_sig_s = ECDSA_SIG_get0_s(ec_sig)) == NULL) {
 417+-			warnx("ECDSA_SIG_get0");
 418+-			goto out;
 419+-		}
 420+-
 421+-		if ((bn_len = (EVP_PKEY_bits(pkey) + 7) / 8) <= 0) {
 422+-			warnx("EVP_PKEY_bits");
 423+-			goto out;
 424+-		}
 425+-
 426+-		if ((buf = calloc(2, bn_len)) == NULL) {
 427+-			warnx("calloc");
 428+-			goto out;
 429+-		}
 430+-
 431+-		if (BN_bn2binpad(ec_sig_r, buf, bn_len) != bn_len ||
 432+-		    BN_bn2binpad(ec_sig_s, buf + bn_len, bn_len) != bn_len) {
 433+-			warnx("BN_bn2binpad");
 434+-			goto out;
 435+-		}
 436+-
 437+-		if ((dig64 = base64buf_url(buf, 2 * bn_len)) == NULL) {
 438+-			warnx("base64buf_url");
 439+-			goto out;
 440+-		}
 441+-
 442+ 		break;
 443+ 	default:
 444+-		warnx("EVP_PKEY_base_id");
 445++		warnx("unknown key type");
 446+ 		goto out;
 447+ 	}
 448+ 
 449+@@ -421,7 +314,11 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
 450+ 	 * when we next enter the read loop).
 451+ 	 */
 452+ 
 453+-	if ((fin = json_fmt_signed(prot64, pay64, dig64)) == NULL) {
 454++	if ((sig64 = base64buf_url(sig, sigsz)) == NULL) {
 455++		warnx("base64buf_url");
 456++		goto out;
 457++	}
 458++	if ((fin = json_fmt_signed(prot64, pay64, sig64)) == NULL) {
 459+ 		warnx("json_fmt_signed");
 460+ 		goto out;
 461+ 	} else if (writestr(fd, COMM_REQ, fin) < 0)
 462+@@ -429,8 +326,6 @@ op_sign(int fd, EVP_PKEY *pkey, enum acctop op)
 463+ 
 464+ 	rc = 1;
 465+ out:
 466+-	ECDSA_SIG_free(ec_sig);
 467+-	EVP_MD_CTX_free(ctx);
 468+ 	free(pay);
 469+ 	free(sign);
 470+ 	free(pay64);
 471+@@ -439,10 +334,9 @@ out:
 472+ 	free(kid);
 473+ 	free(prot);
 474+ 	free(prot64);
 475+-	free(dig);
 476+-	free(dig64);
 477++	free(sig);
 478++	free(sig64);
 479+ 	free(fin);
 480+-	free(buf);
 481+ 	return rc;
 482+ }
 483+ 
 484+@@ -450,7 +344,7 @@ int
 485+ acctproc(int netsock, const char *acctkey, enum keytype keytype)
 486+ {
 487+ 	FILE		*f = NULL;
 488+-	EVP_PKEY	*pkey = NULL;
 489++	struct key	*pkey = NULL;
 490+ 	long		 lval;
 491+ 	enum acctop	 op;
 492+ 	int		 rc = 0, cc, newacct = 0;
 493+@@ -476,8 +370,6 @@ acctproc(int netsock, const char *acctkey, enum keytype keytype)
 494+ 
 495+ 	/* File-system, user, and sandbox jailing. */
 496+ 
 497+-	ERR_load_crypto_strings();
 498+-
 499+ 	if (pledge("stdio", NULL) == -1) {
 500+ 		warn("pledge");
 501+ 		goto out;
 502+@@ -555,8 +447,7 @@ out:
 503+ 	close(netsock);
 504+ 	if (f != NULL)
 505+ 		fclose(f);
 506+-	EVP_PKEY_free(pkey);
 507+-	ERR_print_errors_fp(stderr);
 508+-	ERR_free_strings();
 509++	if (pkey != NULL)
 510++		freezero(pkey, sizeof(*pkey) + pkey->datasz);
 511+ 	return rc;
 512+ }
 513+diff --git a/usr.sbin/acme-client/certproc.c b/usr.sbin/acme-client/certproc.c
 514+index f443d573675..85c3897a4b8 100644
 515+--- a/usr.sbin/acme-client/certproc.c
 516++++ b/usr.sbin/acme-client/certproc.c
 517+@@ -21,11 +21,6 @@
 518+ #include <string.h>
 519+ #include <unistd.h>
 520+ 
 521+-#include <openssl/pem.h>
 522+-#include <openssl/x509.h>
 523+-#include <openssl/x509v3.h>
 524+-#include <openssl/err.h>
 525+-
 526+ #include "extern.h"
 527+ 
 528+ #define BEGIN_MARKER "-----BEGIN CERTIFICATE-----"
 529+diff --git a/usr.sbin/acme-client/key.c b/usr.sbin/acme-client/key.c
 530+index a6fc437f863..c0e54b15742 100644
 531+--- a/usr.sbin/acme-client/key.c
 532++++ b/usr.sbin/acme-client/key.c
 533+@@ -17,15 +17,11 @@
 534+  */
 535+ 
 536+ #include <err.h>
 537++#include <stdio.h>
 538+ #include <stdlib.h>
 539+ #include <unistd.h>
 540+ 
 541+-#include <openssl/evp.h>
 542+-#include <openssl/pem.h>
 543+-#include <openssl/rsa.h>
 544+-#include <openssl/ecdsa.h>
 545+-#include <openssl/ec.h>
 546+-#include <openssl/obj_mac.h>
 547++#include <bearssl.h>
 548+ 
 549+ #include "key.h"
 550+ 
 551+@@ -34,111 +30,318 @@
 552+  */
 553+ #define	KBITS 4096
 554+ 
 555++static void
 556++prng_init(const br_prng_class **ctx, const void *params, const void *seed, size_t len)
 557++{
 558++}
 559++
 560++static void
 561++prng_generate(const br_prng_class **ctx, void *out, size_t len)
 562++{
 563++	arc4random_buf(out, len);
 564++}
 565++
 566++static void
 567++prng_update(const br_prng_class **ctx, const void *seed, size_t len)
 568++{
 569++}
 570++
 571++static const br_prng_class prng_class = {
 572++	0, prng_init, prng_generate, prng_update
 573++}, *prng = &prng_class;
 574++
 575+ /*
 576+  * Create an RSA key with the default KBITS number of bits.
 577+  */
 578+-EVP_PKEY *
 579++struct key *
 580+ rsa_key_create(FILE *f, const char *fname)
 581+ {
 582+-	EVP_PKEY_CTX	*ctx = NULL;
 583+-	EVP_PKEY	*pkey = NULL;
 584++	struct key	*key = NULL;
 585++	size_t		 slen, plen;
 586++	unsigned char	*sbuf, *pbuf;
 587++	unsigned char	 d[KBITS / 8];
 588++	unsigned char	*der = NULL, *pem = NULL;
 589++	size_t		 derlen, pemlen;
 590+ 
 591+-	/* First, create the context and the key. */
 592++	/* First, allocate and generate the key. */
 593+ 
 594+-	if ((ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL)) == NULL) {
 595+-		warnx("EVP_PKEY_CTX_new_id");
 596+-		goto err;
 597+-	} else if (EVP_PKEY_keygen_init(ctx) <= 0) {
 598+-		warnx("EVP_PKEY_keygen_init");
 599++	slen = BR_RSA_KBUF_PRIV_SIZE(KBITS);
 600++	plen = BR_RSA_KBUF_PUB_SIZE(KBITS);
 601++	if ((key = malloc(sizeof(*key) + slen + plen)) == NULL) {
 602++		warnx("malloc");
 603+ 		goto err;
 604+-	} else if (EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, KBITS) <= 0) {
 605+-		warnx("EVP_PKEY_set_rsa_keygen_bits");
 606++	}
 607++	key->type = BR_KEYTYPE_RSA;
 608++	key->datasz = slen + plen;
 609++	sbuf = key->data;
 610++	pbuf = key->data + slen;
 611++	if (!br_rsa_keygen_get_default()(&prng, &key->rsa.sk, sbuf,
 612++	    &key->rsa.pk, pbuf, KBITS, 0x10001)) {
 613++		warnx("br_rsa_keygen");
 614+ 		goto err;
 615+-	} else if (EVP_PKEY_keygen(ctx, &pkey) <= 0) {
 616+-		warnx("EVP_PKEY_keygen");
 617++	}
 618++
 619++	/* Compute the private exponent. */
 620++
 621++	if (!br_rsa_compute_privexp_get_default()(d, &key->rsa.sk, 0x10001)) {
 622++		warnx("br_rsa_compute_modulus");
 623+ 		goto err;
 624+ 	}
 625+ 
 626+-	/* Serialise the key to the disc. */
 627++	/* Serialise the key to the disk. */
 628+ 
 629+-	if (PEM_write_PrivateKey(f, pkey, NULL, NULL, 0, NULL, NULL))
 630++	derlen = br_encode_rsa_raw_der(NULL, &key->rsa.sk, &key->rsa.pk,
 631++	    d, sizeof(d));
 632++	if ((der = malloc(derlen)) == NULL) {
 633++		warn("malloc");
 634++		goto err;
 635++	}
 636++	br_encode_rsa_raw_der(der, &key->rsa.sk, &key->rsa.pk, d, sizeof(d));
 637++	pemlen = br_pem_encode(NULL, der, derlen, BR_ENCODE_PEM_RSA_RAW, 0);
 638++	if ((pem = malloc(pemlen + 1)) == NULL) {
 639++		warn("malloc");
 640++		goto err;
 641++	}
 642++	br_pem_encode(pem, der, derlen, BR_ENCODE_PEM_RSA_RAW, 0);
 643++	if (fwrite(pem, 1, pemlen, f) == pemlen)
 644+ 		goto out;
 645+ 
 646+-	warnx("%s: PEM_write_PrivateKey", fname);
 647++	warn("write private key");
 648+ 
 649+ err:
 650+-	EVP_PKEY_free(pkey);
 651+-	pkey = NULL;
 652++	free(key);
 653++	key = NULL;
 654+ out:
 655+-	EVP_PKEY_CTX_free(ctx);
 656+-	return pkey;
 657++	free(der);
 658++	free(pem);
 659++	return key;
 660+ }
 661+ 
 662+-EVP_PKEY *
 663++struct key *
 664+ ec_key_create(FILE *f, const char *fname)
 665+ {
 666+-	EC_KEY		*eckey = NULL;
 667+-	EVP_PKEY	*pkey = NULL;
 668++	struct key 		*key = NULL;
 669++	const br_ec_impl	*ec;
 670++	size_t			 slen, plen;
 671++	unsigned char		*sbuf, *pbuf;
 672++	unsigned char		*der = NULL, *pem = NULL;
 673++	size_t			 derlen, pemlen;
 674+ 
 675+-	if ((eckey = EC_KEY_new_by_curve_name(NID_secp384r1)) == NULL ) {
 676+-		warnx("EC_KEY_new_by_curve_name");
 677++	slen = BR_EC_KBUF_PRIV_MAX_SIZE;
 678++	plen = BR_EC_KBUF_PUB_MAX_SIZE;
 679++	if ((key = malloc(sizeof(*key) + slen + plen)) == NULL) {
 680++		warn("malloc");
 681+ 		goto err;
 682+ 	}
 683++	key->type = BR_KEYTYPE_EC;
 684++	key->datasz = slen + plen;
 685++	sbuf = key->data;
 686++	pbuf = key->data + slen;
 687+ 
 688+-	if (!EC_KEY_generate_key(eckey)) {
 689+-		warnx("EC_KEY_generate_key");
 690++	ec = br_ec_get_default();
 691++	if (br_ec_keygen(&prng, ec, &key->ec.sk, sbuf, BR_EC_secp384r1) == 0) {
 692++		warnx("br_ec_keygen");
 693+ 		goto err;
 694+ 	}
 695+-
 696+-	/* set OPENSSL_EC_NAMED_CURVE to be able to load the key */
 697+-
 698+-	EC_KEY_set_asn1_flag(eckey, OPENSSL_EC_NAMED_CURVE);
 699+-
 700+-	/* Serialise the key to the disc in EC format */
 701+-
 702+-	if (!PEM_write_ECPrivateKey(f, eckey, NULL, NULL, 0, NULL, NULL)) {
 703+-		warnx("%s: PEM_write_ECPrivateKey", fname);
 704++	if (br_ec_compute_pub(ec, &key->ec.pk, pbuf, &key->ec.sk) == 0) {
 705++		warnx("br_ec_compute_pub");
 706+ 		goto err;
 707+ 	}
 708+ 
 709+-	/* Convert the EC key into a PKEY structure */
 710++	/* Serialise the key to the disk in EC format */
 711+ 
 712+-	if ((pkey = EVP_PKEY_new()) == NULL) {
 713+-		warnx("EVP_PKEY_new");
 714++	if ((derlen = br_encode_ec_raw_der(NULL, &key->ec.sk,
 715++	    &key->ec.pk)) == 0) {
 716++		warnx("br_encode_ec_raw_der");
 717++		goto err;
 718++	}
 719++	if ((der = malloc(derlen)) == NULL) {
 720++		warn("malloc");
 721+ 		goto err;
 722+ 	}
 723+-	if (!EVP_PKEY_set1_EC_KEY(pkey, eckey)) {
 724+-		warnx("EVP_PKEY_assign_EC_KEY");
 725++	br_encode_ec_raw_der(der, &key->ec.sk, &key->ec.pk);
 726++	pemlen = br_pem_encode(NULL, der, derlen, BR_ENCODE_PEM_EC_RAW, 0);
 727++	if ((pem = malloc(pemlen + 1)) == NULL) {
 728++		warn("malloc");
 729+ 		goto err;
 730+ 	}
 731++	br_pem_encode(pem, der, derlen, BR_ENCODE_PEM_EC_RAW, 0);
 732++	if (fwrite(pem, 1, pemlen, f) == pemlen)
 733++		goto out;
 734+ 
 735+-	goto out;
 736++	warn("write private key");
 737+ 
 738+ err:
 739+-	EVP_PKEY_free(pkey);
 740+-	pkey = NULL;
 741++	free(key);
 742++	key = NULL;
 743+ out:
 744+-	EC_KEY_free(eckey);
 745+-	return pkey;
 746++	free(der);
 747++	free(pem);
 748++	return key;
 749+ }
 750+ 
 751++static void
 752++append_skey(void *ctx, const void *src, size_t len)
 753++{
 754++	br_skey_decoder_push(ctx, src, len);
 755++}
 756+ 
 757+-
 758+-EVP_PKEY *
 759++struct key *
 760+ key_load(FILE *f, const char *fname)
 761+ {
 762+-	EVP_PKEY	*pkey;
 763++	struct key			*key = NULL;
 764++	size_t				 datasz, len = 0, n;
 765++	int				 type = 0, err;
 766++	unsigned char			 buf[8192], *pos;
 767++	br_pem_decoder_context		 pemctx;
 768++	br_skey_decoder_context		 keyctx;
 769++	br_rsa_compute_modulus		 compute_modulus;
 770++	br_rsa_compute_pubexp		 compute_pubexp;
 771++	const br_ec_impl		*ecimpl;
 772++	const br_rsa_private_key	*rsa;
 773++	const br_ec_private_key		*ec;
 774++	const char			*name = NULL;
 775++	uint32_t			 pubexp;
 776++
 777++	br_pem_decoder_init(&pemctx);
 778++	br_skey_decoder_init(&keyctx);
 779++	while (type == 0) {
 780++		if (len == 0) {
 781++			if (feof(f)) {
 782++				warnx("%s: missing private key", fname);
 783++				break;
 784++			}
 785++			len = fread(buf, 1, sizeof(buf), f);
 786++			if (ferror(f)) {
 787++				warn("%s: read", fname);
 788++				goto err;
 789++			}
 790++			pos = buf;
 791++		}
 792++		n = br_pem_decoder_push(&pemctx, pos, len);
 793++		pos += n;
 794++		len -= n;
 795++		switch (br_pem_decoder_event(&pemctx)) {
 796++		case BR_PEM_BEGIN_OBJ:
 797++			name = br_pem_decoder_name(&pemctx);
 798++			if (strcmp(name, BR_ENCODE_PEM_PKCS8) != 0 &&
 799++			    strcmp(name, BR_ENCODE_PEM_RSA_RAW) != 0 &&
 800++			    strcmp(name, BR_ENCODE_PEM_EC_RAW) != 0) {
 801++				name = NULL;
 802++				break;
 803++			}
 804++			br_pem_decoder_setdest(&pemctx, append_skey, &keyctx);
 805++			break;
 806++		case BR_PEM_END_OBJ:
 807++			if (name == NULL)
 808++				break;
 809++			if ((err = br_skey_decoder_last_error(&keyctx)) != 0) {
 810++				warnx("%s: br_skey_decoder: %d", fname, err);
 811++				goto err;
 812++			}
 813++			type = br_skey_decoder_key_type(&keyctx);
 814++			break;
 815++		case 0:
 816++			break;
 817++		default:
 818++			warnx("%s: PEM decoding failed", fname);
 819++			goto err;
 820++		}
 821++	}
 822++
 823++	switch (type) {
 824++	case BR_KEYTYPE_RSA:
 825++		rsa = br_skey_decoder_get_rsa(&keyctx);
 826++		compute_modulus = br_rsa_compute_modulus_get_default();
 827++		compute_pubexp = br_rsa_compute_pubexp_get_default();
 828++
 829++		/* Compute public modulus size. This will fail if
 830++		 * p or q is not 3 mod 4. */
 831++		if ((datasz = compute_modulus(NULL, rsa)) == 0) {
 832++			warnx("%s: br_rsa_compute_modulus", fname);
 833++			goto err;
 834++		}
 835++		datasz += 4 + rsa->plen + rsa->qlen + rsa->dplen + rsa->dqlen +
 836++		    rsa->iqlen;
 837+ 
 838+-	pkey = PEM_read_PrivateKey(f, NULL, NULL, NULL);
 839+-	if (pkey == NULL) {
 840+-		warnx("%s: PEM_read_PrivateKey", fname);
 841+-		return NULL;
 842++		if ((key = malloc(sizeof(*key) + datasz)) == NULL) {
 843++			warn("malloc");
 844++			goto err;
 845++		}
 846++		key->type = BR_KEYTYPE_RSA;
 847++		key->datasz = datasz;
 848++
 849++		if ((pubexp = compute_pubexp(rsa)) == 0) {
 850++			warnx("%s: br_rsa_compute_pubexp", fname);
 851++			goto err;
 852++		}
 853++
 854++		/* Copy private key. */
 855++		key->rsa.sk.n_bitlen = rsa->n_bitlen;
 856++		key->rsa.sk.p = key->data;
 857++		key->rsa.sk.plen = rsa->plen;
 858++		key->rsa.sk.q = key->rsa.sk.p + rsa->plen;
 859++		key->rsa.sk.qlen = rsa->qlen;
 860++		key->rsa.sk.dp = key->rsa.sk.q + rsa->qlen;
 861++		key->rsa.sk.dplen = rsa->dplen;
 862++		key->rsa.sk.dq = key->rsa.sk.dp + rsa->dplen;
 863++		key->rsa.sk.dqlen = rsa->dqlen;
 864++		key->rsa.sk.iq = key->rsa.sk.dq + rsa->dqlen;
 865++		key->rsa.sk.iqlen = rsa->iqlen;
 866++		memcpy(key->rsa.sk.p, rsa->p, rsa->plen);
 867++		memcpy(key->rsa.sk.q, rsa->q, rsa->qlen);
 868++		memcpy(key->rsa.sk.dp, rsa->dp, rsa->dplen);
 869++		memcpy(key->rsa.sk.dq, rsa->dq, rsa->dqlen);
 870++		memcpy(key->rsa.sk.iq, rsa->iq, rsa->iqlen);
 871++
 872++		/* Compute public modulus and encode public exponent. */
 873++		key->rsa.pk.n = key->rsa.sk.iq + rsa->iqlen;
 874++		key->rsa.pk.nlen = compute_modulus(key->rsa.pk.n, rsa);
 875++		key->rsa.pk.elen = 4;
 876++		key->rsa.pk.e = key->rsa.pk.n + key->rsa.pk.nlen;
 877++		key->rsa.pk.e[0] = pubexp >> 24;
 878++		key->rsa.pk.e[1] = pubexp >> 16;
 879++		key->rsa.pk.e[2] = pubexp >> 8;
 880++		key->rsa.pk.e[3] = pubexp;
 881++
 882++		/* Trim leading zeros. */
 883++		while (key->rsa.pk.elen > 0 && key->rsa.pk.e[0] == 0) {
 884++			--key->rsa.pk.elen;
 885++			++key->rsa.pk.e;
 886++		}
 887++		goto out;
 888++	case BR_KEYTYPE_EC:
 889++		ec = br_skey_decoder_get_ec(&keyctx);
 890++		ecimpl = br_ec_get_default();
 891++		if ((datasz = br_ec_compute_pub(ecimpl, NULL, NULL, ec)) == 0) {
 892++			warnx("%s: br_ec_compute_pub", fname);
 893++			goto err;
 894++		}
 895++		datasz += ec->xlen;
 896++
 897++		if ((key = malloc(sizeof(*key) + datasz)) == NULL) {
 898++			warn("malloc");
 899++			goto err;
 900++		}
 901++		key->type = BR_KEYTYPE_EC;
 902++		key->datasz = datasz;
 903++
 904++		key->ec.sk.curve = ec->curve;
 905++		key->ec.sk.x = key->data;
 906++		key->ec.sk.xlen = ec->xlen;
 907++		memcpy(key->ec.sk.x, ec->x, ec->xlen);
 908++		br_ec_compute_pub(ecimpl, &key->ec.pk,
 909++		    key->ec.sk.x + key->ec.sk.xlen, &key->ec.sk);
 910++		goto out;
 911+ 	}
 912+-	if (EVP_PKEY_base_id(pkey) == EVP_PKEY_RSA ||
 913+-	    EVP_PKEY_base_id(pkey) == EVP_PKEY_EC)
 914+-		return pkey;
 915+ 
 916+-	warnx("%s: unsupported key type", fname);
 917+-	EVP_PKEY_free(pkey);
 918+-	return NULL;
 919++	warnx("%s: missing private key", fname);
 920++
 921++err:
 922++	free(key);
 923++	key = NULL;
 924++out:
 925++	explicit_bzero(&pemctx, sizeof(pemctx));
 926++	explicit_bzero(&keyctx, sizeof(keyctx));
 927++	return key;
 928+ }
 929+diff --git a/usr.sbin/acme-client/key.h b/usr.sbin/acme-client/key.h
 930+index 272d36eb09a..12abdec813c 100644
 931+--- a/usr.sbin/acme-client/key.h
 932++++ b/usr.sbin/acme-client/key.h
 933+@@ -18,8 +18,24 @@
 934+ #ifndef KEY_H
 935+ #define KEY_H
 936+ 
 937+-EVP_PKEY	*rsa_key_create(FILE *, const char *);
 938+-EVP_PKEY	*ec_key_create(FILE *, const char *);
 939+-EVP_PKEY	*key_load(FILE *, const char *);
 940++struct key {
 941++	int type;
 942++	union {
 943++		struct {
 944++			br_rsa_public_key pk;
 945++			br_rsa_private_key sk;
 946++		} rsa;
 947++		struct {
 948++			br_ec_public_key pk;
 949++			br_ec_private_key sk;
 950++		} ec;
 951++	};
 952++	size_t datasz;
 953++	unsigned char data[];
 954++};
 955++
 956++struct key	*rsa_key_create(FILE *, const char *);
 957++struct key	*ec_key_create(FILE *, const char *);
 958++struct key	*key_load(FILE *, const char *);
 959+ 
 960+ #endif /* ! KEY_H */
 961+diff --git a/usr.sbin/acme-client/keyproc.c b/usr.sbin/acme-client/keyproc.c
 962+index f0df9f292d4..fc7de74b616 100644
 963+--- a/usr.sbin/acme-client/keyproc.c
 964++++ b/usr.sbin/acme-client/keyproc.c
 965+@@ -18,55 +18,18 @@
 966+ #include <sys/stat.h>
 967+ 
 968+ #include <err.h>
 969++#include <errno.h>
 970+ #include <stdio.h>
 971+ #include <stdlib.h>
 972+ #include <string.h>
 973+ #include <unistd.h>
 974+ 
 975+-#include <openssl/pem.h>
 976+-#include <openssl/err.h>
 977+-#include <openssl/rand.h>
 978+-#include <openssl/x509.h>
 979+-#include <openssl/x509v3.h>
 980++#include <bearssl.h>
 981++#include <x509cert.h>
 982+ 
 983+ #include "extern.h"
 984+ #include "key.h"
 985+ 
 986+-/*
 987+- * This was lifted more or less directly from demos/x509/mkreq.c of the
 988+- * OpenSSL source code.
 989+- */
 990+-static int
 991+-add_ext(STACK_OF(X509_EXTENSION) *sk, int nid, const char *value)
 992+-{
 993+-	X509_EXTENSION	*ex;
 994+-	char		*cp;
 995+-
 996+-	/*
 997+-	 * XXX: I don't like this at all.
 998+-	 * There's no documentation for X509V3_EXT_conf_nid, so I'm not
 999+-	 * sure if the "value" parameter is ever written to, touched,
1000+-	 * etc.
1001+-	 * The 'official' examples suggest not (they use a string
1002+-	 * literal as the input), but to be safe, I'm doing an
1003+-	 * allocation here and just letting it go.
1004+-	 * This leaks memory, but bounded to the number of SANs.
1005+-	 */
1006+-
1007+-	if ((cp = strdup(value)) == NULL) {
1008+-		warn("strdup");
1009+-		return (0);
1010+-	}
1011+-	ex = X509V3_EXT_conf_nid(NULL, NULL, nid, cp);
1012+-	if (ex == NULL) {
1013+-		warnx("X509V3_EXT_conf_nid");
1014+-		free(cp);
1015+-		return (0);
1016+-	}
1017+-	sk_X509_EXTENSION_push(sk, ex);
1018+-	return (1);
1019+-}
1020+-
1021+ /*
1022+  * Create an X509 certificate from the private key we have on file.
1023+  * To do this, we first open the key file, then jail ourselves.
1024+@@ -77,18 +40,20 @@ int
1025+ keyproc(int netsock, const char *keyfile, const char **alts, size_t altsz,
1026+     enum keytype keytype)
1027+ {
1028+-	char		*der64 = NULL;
1029+-	unsigned char	*der = NULL, *dercp;
1030+-	char		*sans = NULL, *san = NULL;
1031+-	FILE		*f;
1032+-	size_t		 i, sansz;
1033+-	void		*pp;
1034+-	EVP_PKEY	*pkey = NULL;
1035+-	X509_REQ	*x = NULL;
1036+-	X509_NAME	*name = NULL;
1037+-	int		 len, rc = 0, cc, nid, newkey = 0;
1038+-	mode_t		 prev;
1039+-	STACK_OF(X509_EXTENSION) *exts = NULL;
1040++	char			*der64 = NULL;
1041++	unsigned char		*der = NULL;
1042++	FILE			*f;
1043++	size_t			 i;
1044++	struct key		*pkey = NULL;
1045++	struct x509cert_req	 req;
1046++	struct x509cert_skey	 skey;
1047++	struct x509cert_dn	 dn;
1048++	struct x509cert_rdn	 rdn;
1049++	struct x509cert_item	 item;
1050++	int			 len, rc = 0, newkey = 0;
1051++	mode_t			 prev;
1052++
1053++	req.alts = NULL;
1054+ 
1055+ 	/*
1056+ 	 * First, open our private key file read-only or write-only if
1057+@@ -110,8 +75,6 @@ keyproc(int netsock, const char *keyfile, const char **alts, size_t altsz,
1058+ 
1059+ 	/* File-system, user, and sandbox jail. */
1060+ 
1061+-	ERR_load_crypto_strings();
1062+-
1063+ 	if (pledge("stdio", NULL) == -1) {
1064+ 		warn("pledge");
1065+ 		goto out;
1066+@@ -145,102 +108,61 @@ keyproc(int netsock, const char *keyfile, const char **alts, size_t altsz,
1067+ 	 * Then set it as the X509 requester's key.
1068+ 	 */
1069+ 
1070+-	if ((x = X509_REQ_new()) == NULL) {
1071+-		warnx("X509_REQ_new");
1072+-		goto out;
1073+-	} else if (!X509_REQ_set_version(x, 0)) {
1074+-		warnx("X509_REQ_set_version");
1075+-		goto out;
1076+-	} else if (!X509_REQ_set_pubkey(x, pkey)) {
1077+-		warnx("X509_REQ_set_pubkey");
1078+-		goto out;
1079++	req.pkey.key_type = pkey->type;
1080++	skey.type = pkey->type;
1081++	switch (pkey->type) {
1082++	case BR_KEYTYPE_RSA:
1083++		req.pkey.key.rsa = pkey->rsa.pk;
1084++		skey.u.rsa = &pkey->rsa.sk;
1085++		break;
1086++	case BR_KEYTYPE_EC:
1087++		req.pkey.key.ec = pkey->ec.pk;
1088++		skey.u.ec = &pkey->ec.sk;
1089++		break;
1090+ 	}
1091+ 
1092+ 	/* Now specify the common name that we'll request. */
1093+ 
1094+-	if ((name = X509_NAME_new()) == NULL) {
1095+-		warnx("X509_NAME_new");
1096+-		goto out;
1097+-	} else if (!X509_NAME_add_entry_by_txt(name, "CN",
1098+-		MBSTRING_ASC, (u_char *)alts[0], -1, -1, 0)) {
1099+-		warnx("X509_NAME_add_entry_by_txt: CN=%s", alts[0]);
1100+-		goto out;
1101+-	} else if (!X509_REQ_set_subject_name(x, name)) {
1102+-		warnx("X509_req_set_issuer_name");
1103+-		goto out;
1104+-	}
1105++	rdn.oid = x509cert_oid_CN;
1106++	rdn.val.tag = X509CERT_ASN1_UTF8STRING;
1107++	rdn.val.val = alts[0];
1108++	rdn.val.len = strlen(alts[0]);
1109++	rdn.val.enc = NULL;
1110++	dn.rdn = &rdn;
1111++	dn.rdn_len = 1;
1112++	req.subject.enc = x509cert_dn_encoder;
1113++	req.subject.val = &dn;
1114+ 
1115+-	/*
1116+-	 * Now add the SAN extensions.
1117+-	 * This was lifted more or less directly from demos/x509/mkreq.c
1118+-	 * of the OpenSSL source code.
1119+-	 * (The zeroth altname is the domain name.)
1120+-	 * TODO: is this the best way of doing this?
1121+-	 */
1122++	/* Now add the SAN extension. */
1123+ 
1124+-	nid = NID_subject_alt_name;
1125+-	if ((exts = sk_X509_EXTENSION_new_null()) == NULL) {
1126+-		warnx("sk_X509_EXTENSION_new_null");
1127++	req.alts_len = altsz;
1128++	req.alts = calloc(altsz, sizeof(req.alts[0]));
1129++	if (req.alts == NULL) {
1130++		warn("calloc");
1131+ 		goto out;
1132+ 	}
1133+-	/* Initialise to empty string. */
1134+-	if ((sans = strdup("")) == NULL) {
1135+-		warn("strdup");
1136+-		goto out;
1137+-	}
1138+-	sansz = strlen(sans) + 1;
1139+ 
1140+-	/*
1141+-	 * For each SAN entry, append it to the string.
1142+-	 * We need a single SAN entry for all of the SAN
1143+-	 * domains: NOT an entry per domain!
1144+-	 */
1145++	/* Add a dNSName SAN entry for each alternate name. */
1146+ 
1147+ 	for (i = 0; i < altsz; i++) {
1148+-		cc = asprintf(&san, "%sDNS:%s",
1149+-		    i ? "," : "", alts[i]);
1150+-		if (cc == -1) {
1151+-			warn("asprintf");
1152+-			goto out;
1153+-		}
1154+-		pp = recallocarray(sans, sansz, sansz + strlen(san), 1);
1155+-		if (pp == NULL) {
1156+-			warn("recallocarray");
1157+-			goto out;
1158+-		}
1159+-		sans = pp;
1160+-		sansz += strlen(san);
1161+-		strlcat(sans, san, sansz);
1162+-		free(san);
1163+-		san = NULL;
1164+-	}
1165+-
1166+-	if (!add_ext(exts, nid, sans)) {
1167+-		warnx("add_ext");
1168+-		goto out;
1169+-	} else if (!X509_REQ_add_extensions(x, exts)) {
1170+-		warnx("X509_REQ_add_extensions");
1171+-		goto out;
1172+-	}
1173+-	sk_X509_EXTENSION_pop_free(exts, X509_EXTENSION_free);
1174+-
1175+-	/* Sign the X509 request using SHA256. */
1176+-
1177+-	if (!X509_REQ_sign(x, pkey, EVP_sha256())) {
1178+-		warnx("X509_sign");
1179+-		goto out;
1180++		req.alts[i].tag = X509CERT_SAN_DNSNAME;
1181++		req.alts[i].val = alts[i];
1182++		req.alts[i].len = strlen(alts[i]);
1183+ 	}
1184+ 
1185+-	/* Now, serialise to DER, then base64. */
1186++	/* Sign the X.509 request using SHA256, and serialise to
1187++	 * DER then base64. */
1188+ 
1189+-	if ((len = i2d_X509_REQ(x, NULL)) < 0) {
1190+-		warnx("i2d_X509_REQ");
1191++	item.enc = x509cert_req_encoder;
1192++	item.val = &req;
1193++	if ((len = x509cert_sign(&item, &skey, &br_sha256_vtable, NULL)) == 0) {
1194++		warnx("x509cert_sign");
1195+ 		goto out;
1196+-	} else if ((der = dercp = malloc(len)) == NULL) {
1197++	} else if ((der = malloc(len)) == NULL) {
1198+ 		warn("malloc");
1199+ 		goto out;
1200+-	} else if (len != i2d_X509_REQ(x, &dercp)) {
1201+-		warnx("i2d_X509_REQ");
1202++	} else if ((len = x509cert_sign(&item, &skey, &br_sha256_vtable, der)) == 0) {
1203++		warnx("x509cert_sign");
1204+ 		goto out;
1205+ 	} else if ((der64 = base64buf_url(der, len)) == NULL) {
1206+ 		warnx("base64buf_url");
1207+@@ -265,12 +187,8 @@ out:
1208+ 		fclose(f);
1209+ 	free(der);
1210+ 	free(der64);
1211+-	free(sans);
1212+-	free(san);
1213+-	X509_REQ_free(x);
1214+-	X509_NAME_free(name);
1215+-	EVP_PKEY_free(pkey);
1216+-	ERR_print_errors_fp(stderr);
1217+-	ERR_free_strings();
1218++	free(req.alts);
1219++	if (pkey != NULL)
1220++		freezero(pkey, pkey->datasz);
1221+ 	return rc;
1222+ }
1223+diff --git a/usr.sbin/acme-client/revokeproc.c b/usr.sbin/acme-client/revokeproc.c
1224+index 58e81233f1a..6d0f2b39d02 100644
1225+--- a/usr.sbin/acme-client/revokeproc.c
1226++++ b/usr.sbin/acme-client/revokeproc.c
1227+@@ -22,58 +22,54 @@
1228+ #include <stdio.h>
1229+ #include <stdlib.h>
1230+ #include <string.h>
1231++#include <time.h>
1232+ #include <unistd.h>
1233+ #include <vis.h>
1234+ 
1235+-#include <openssl/pem.h>
1236+-#include <openssl/x509.h>
1237+-#include <openssl/x509v3.h>
1238+-#include <openssl/err.h>
1239++#include <bearssl.h>
1240+ 
1241+ #include "extern.h"
1242+ 
1243+ #define	RENEW_ALLOW (30 * 24 * 60 * 60)
1244+ 
1245+-/*
1246+- * Convert the X509's expiration time into a time_t value.
1247+- */
1248+-static time_t
1249+-X509expires(X509 *x)
1250++static void
1251++append_cert(void *ctx, const void *buf, size_t len)
1252+ {
1253+-	ASN1_TIME	*atim;
1254+-	struct tm	 t;
1255+-
1256+-	if ((atim = X509_getm_notAfter(x)) == NULL) {
1257+-		warnx("missing notAfter");
1258+-		return -1;
1259+-	}
1260+-
1261+-	memset(&t, 0, sizeof(t));
1262+-
1263+-	if (!ASN1_TIME_to_tm(atim, &t)) {
1264+-		warnx("invalid ASN1_TIME");
1265+-		return -1;
1266++	br_x509_certificate *cert = ctx;
1267++	size_t newlen;
1268++	unsigned char *newdata;
1269++
1270++	if (cert->data_len == -1)
1271++		return;
1272++	newlen = cert->data_len + len;
1273++	if ((newdata = realloc(cert->data, newlen)) != NULL) {
1274++		memcpy(newdata + cert->data_len, buf, len);
1275++		cert->data = newdata;
1276++		cert->data_len = newlen;
1277++	} else {
1278++		warn("realloc");
1279++		cert->data_len = -1;
1280+ 	}
1281+-
1282+-	return timegm(&t);
1283+ }
1284+ 
1285+ int
1286+ revokeproc(int fd, const char *certfile, int force,
1287+     int revocate, const char *const *alts, size_t altsz)
1288+ {
1289+-	GENERAL_NAMES			*sans = NULL;
1290+-	unsigned char			*der = NULL, *dercp;
1291+-	char				*der64 = NULL;
1292+-	char				*san = NULL, *str, *tok;
1293+-	int				 rc = 0, cc, i, len;
1294+-	size_t				*found = NULL;
1295++	static const unsigned char	 dnsname[] = {0, 2};
1296++	char				 buf[8192], *pos, *sans = NULL, *der64 = NULL;
1297++	int				 rc = 0, cc, state, err;
1298++	size_t				 i, j, n, len = 0, altlen, altmax, eltsz;
1299+ 	FILE				*f = NULL;
1300+-	X509				*x = NULL;
1301++	br_pem_decoder_context		 pc;
1302++	br_x509_decoder_context		 xd;
1303++	br_x509_minimal_context		 xc;
1304++	br_x509_certificate		 cert = {0};
1305++	br_name_element			*elts = NULL;
1306++	uint32_t			 days, secs;
1307+ 	long				 lval;
1308+ 	enum revokeop			 op, rop;
1309+ 	time_t				 t;
1310+-	size_t				 j;
1311+ 
1312+ 	/*
1313+ 	 * First try to open the certificate before we drop privileges
1314+@@ -88,8 +84,6 @@ revokeproc(int fd, const char *certfile, int force,
1315+ 
1316+ 	/* File-system and sandbox jailing. */
1317+ 
1318+-	ERR_load_crypto_strings();
1319+-
1320+ 	if (pledge("stdio", NULL) == -1) {
1321+ 		warn("pledge");
1322+ 		goto out;
1323+@@ -113,39 +107,84 @@ revokeproc(int fd, const char *certfile, int force,
1324+ 		goto out;
1325+ 	}
1326+ 
1327+-	if ((x = PEM_read_X509(f, NULL, NULL, NULL)) == NULL) {
1328+-		warnx("PEM_read_X509");
1329+-		goto out;
1330++	br_pem_decoder_init(&pc);
1331++	for (state = 0; state != 2;) {
1332++		if (len == 0) {
1333++			if (feof(f)) {
1334++				warnx("%s: truncated certificate", certfile);
1335++				goto out;
1336++			}
1337++			len = fread(buf, 1, sizeof(buf), f);
1338++			if (ferror(f)) {
1339++				warn("fread");
1340++				goto out;
1341++			}
1342++			pos = buf;
1343++		}
1344++		n = br_pem_decoder_push(&pc, pos, len);
1345++		pos += n;
1346++		len -= n;
1347++		switch (br_pem_decoder_event(&pc)) {
1348++		case BR_PEM_BEGIN_OBJ:
1349++			if (strcmp(br_pem_decoder_name(&pc), "CERTIFICATE") == 0) {
1350++				br_pem_decoder_setdest(&pc, append_cert, &cert);
1351++				state = 1;
1352++			}
1353++			break;
1354++		case BR_PEM_END_OBJ:
1355++			if (state == 1)
1356++				state = 2;
1357++			break;
1358++		case 0:
1359++			break;
1360++		default:
1361++			warnx("%s: PEM decoding error", certfile);
1362++			goto out;
1363++		}
1364+ 	}
1365+-
1366+-	/* Cache and sanity check X509v3 extensions. */
1367+-
1368+-	if (X509_check_purpose(x, -1, -1) <= 0) {
1369+-		warnx("%s: invalid X509v3 extensions", certfile);
1370++	if (cert.data_len == -1)
1371+ 		goto out;
1372+-	}
1373+ 
1374+ 	/* Read out the expiration date. */
1375+ 
1376+-	if ((t = X509expires(x)) == -1) {
1377+-		warnx("X509expires");
1378++	br_x509_decoder_init(&xd, NULL, NULL);
1379++	br_x509_decoder_push(&xd, cert.data, cert.data_len);
1380++	if ((err = br_x509_decoder_last_error(&xd)) != 0) {
1381++		warnx("%s: X.509 decoding error %d", certfile, err);
1382+ 		goto out;
1383+ 	}
1384++	br_x509_decoder_get_notafter(&xd, &days, &secs);
1385++	t = 86400ll * (days - 719528) + 86400;
1386+ 
1387+-	/* Extract list of SAN entries from the certificate. */
1388+-
1389+-	sans = X509_get_ext_d2i(x, NID_subject_alt_name, NULL, NULL);
1390+-	if (sans == NULL) {
1391+-		warnx("%s: does not have a SAN entry", certfile);
1392+-		if (revocate)
1393+-			goto out;
1394+-		force = 2;
1395++	for (i = 0, altmax = 0; i < altsz; ++i) {
1396++		altlen = strlen(alts[i]) + 1;
1397++		if (altlen > altmax)
1398++			altmax = altlen;
1399++	}
1400++	eltsz = altsz + 1;
1401++	if ((elts = calloc(eltsz, sizeof(elts[0]))) == NULL ||
1402++	    (sans = calloc(eltsz, altmax)) == NULL) {
1403++		warn("calloc");
1404++		goto out;
1405++	}
1406++	for (i = 0; i < eltsz; ++i) {
1407++		elts[i].oid = dnsname;
1408++		elts[i].buf = sans + i * altmax;
1409++		elts[i].len = altmax;
1410+ 	}
1411+ 
1412+-	/* An array of buckets: the number of entries found. */
1413++	/* Extract list of SAN entries from the certificate. */
1414+ 
1415+-	if ((found = calloc(altsz, sizeof(size_t))) == NULL) {
1416+-		warn("calloc");
1417++	br_x509_minimal_init(&xc, &br_sha256_vtable, NULL, 0);
1418++	br_x509_minimal_set_hash(&xc, br_sha256_ID, &br_sha256_vtable);
1419++	br_x509_minimal_set_name_elements(&xc, elts, eltsz);
1420++	xc.vtable->start_chain(&xc.vtable, NULL);
1421++	xc.vtable->start_cert(&xc.vtable, cert.data_len);
1422++	xc.vtable->append(&xc.vtable, cert.data, cert.data_len);
1423++	xc.vtable->end_cert(&xc.vtable);
1424++	err = xc.vtable->end_chain(&xc.vtable);
1425++	if (err != BR_ERR_X509_NOT_TRUSTED) {
1426++		warnx("%s: X.509 engine error %d", certfile, err);
1427+ 		goto out;
1428+ 	}
1429+ 
1430+@@ -154,63 +193,37 @@ revokeproc(int fd, const char *certfile, int force,
1431+ 	 * configuration file and that all domains are represented only once.
1432+ 	 */
1433+ 
1434+-	for (i = 0; i < sk_GENERAL_NAME_num(sans); i++) {
1435+-		GENERAL_NAME		*gen_name;
1436+-		const ASN1_IA5STRING	*name;
1437+-		const unsigned char	*name_buf;
1438+-		int			 name_len;
1439+-		int			 name_type;
1440+-
1441+-		gen_name = sk_GENERAL_NAME_value(sans, i);
1442+-		assert(gen_name != NULL);
1443+-
1444+-		name = GENERAL_NAME_get0_value(gen_name, &name_type);
1445+-		if (name_type != GEN_DNS)
1446+-			continue;
1447+-
1448+-		/* name_buf isn't a C string and could contain embedded NULs. */
1449+-		name_buf = ASN1_STRING_get0_data(name);
1450+-		name_len = ASN1_STRING_length(name);
1451+-
1452+-		for (j = 0; j < altsz; j++) {
1453+-			if ((size_t)name_len != strlen(alts[j]))
1454+-				continue;
1455+-			if (memcmp(name_buf, alts[j], name_len) == 0)
1456++	for (i = 0; i < altsz; i++) {
1457++		for (j = 0; j < eltsz; j++) {
1458++			if (elts[j].status == 1 &&
1459++			    strcmp(alts[i], elts[j].buf) == 0) {
1460++				elts[j].status = 0;
1461+ 				break;
1462+-		}
1463+-		if (j == altsz) {
1464+-			if (revocate) {
1465+-				char *visbuf;
1466+-
1467+-				visbuf = calloc(4, name_len + 1);
1468+-				if (visbuf == NULL) {
1469+-					warn("%s: unexpected SAN", certfile);
1470+-					goto out;
1471+-				}
1472+-				strvisx(visbuf, name_buf, name_len, VIS_SAFE);
1473+-				warnx("%s: unexpected SAN entry: %s",
1474+-				    certfile, visbuf);
1475+-				free(visbuf);
1476+-				goto out;
1477+ 			}
1478+-			force = 2;
1479+-			continue;
1480+ 		}
1481+-		if (found[j]++) {
1482++		if (j == eltsz) {
1483+ 			if (revocate) {
1484+-				warnx("%s: duplicate SAN entry: %.*s",
1485+-				    certfile, name_len, name_buf);
1486++				warnx("%s: domain not listed: %s", certfile, alts[i]);
1487+ 				goto out;
1488+ 			}
1489+ 			force = 2;
1490+ 		}
1491+ 	}
1492+ 
1493+-	for (j = 0; j < altsz; j++) {
1494+-		if (found[j])
1495++	for (i = 0; i < eltsz; i++) {
1496++		if (elts[i].status == 0)
1497+ 			continue;
1498+ 		if (revocate) {
1499+-			warnx("%s: domain not listed: %s", certfile, alts[j]);
1500++			char *visbuf;
1501++
1502++			if (elts[i].status != 1 ||
1503++			    stravis(&visbuf, elts[i].buf, VIS_SAFE) < 0) {
1504++				warnx("%s: unexpected SAN", certfile);
1505++				goto out;
1506++			}
1507++			warnx("%s: unexpected SAN entry: %s",
1508++			    certfile, visbuf);
1509++			free(visbuf);
1510+ 			goto out;
1511+ 		}
1512+ 		force = 2;
1513+@@ -236,16 +249,7 @@ revokeproc(int fd, const char *certfile, int force,
1514+ 		if (cc <= 0)
1515+ 			goto out;
1516+ 
1517+-		if ((len = i2d_X509(x, NULL)) < 0) {
1518+-			warnx("i2d_X509");
1519+-			goto out;
1520+-		} else if ((der = dercp = malloc(len)) == NULL) {
1521+-			warn("malloc");
1522+-			goto out;
1523+-		} else if (len != i2d_X509(x, &dercp)) {
1524+-			warnx("i2d_X509");
1525+-			goto out;
1526+-		} else if ((der64 = base64buf_url(der, len)) == NULL) {
1527++		if ((der64 = base64buf_url(cert.data, cert.data_len)) == NULL) {
1528+ 			warnx("base64buf_url");
1529+ 			goto out;
1530+ 		} else if (writestr(fd, COMM_CSR, der64) >= 0)
1531+@@ -298,12 +302,9 @@ out:
1532+ 	close(fd);
1533+ 	if (f != NULL)
1534+ 		fclose(f);
1535+-	X509_free(x);
1536+-	GENERAL_NAMES_free(sans);
1537+-	free(der);
1538+-	free(found);
1539++	free(cert.data);
1540++	free(sans);
1541++	free(elts);
1542+ 	free(der64);
1543+-	ERR_print_errors_fp(stderr);
1544+-	ERR_free_strings();
1545+ 	return rc;
1546+ }
1547+-- 
1548+2.37.3
1549+
+46, -0
 1@@ -0,0 +1,46 @@
 2+From 82646d38665109ec5f0753ba384da94d529bbbe9 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Wed, 27 Apr 2022 19:57:54 -0700
 5+Subject: [PATCH] pax: Use POSIX struct stat fields for high resolution
 6+ timestamps
 7+
 8+---
 9+ bin/pax/tar.c | 15 +++++----------
10+ 1 file changed, 5 insertions(+), 10 deletions(-)
11+
12+diff --git a/bin/pax/tar.c b/bin/pax/tar.c
13+index 1f4012123c3..7ede7938c3d 100644
14+--- a/bin/pax/tar.c
15++++ b/bin/pax/tar.c
16+@@ -417,8 +417,7 @@ tar_rd(ARCHD *arcn, char *buf)
17+ 		arcn->sb.st_mtime = INT_MAX;                    /* XXX 2038 */
18+ 	else
19+ 		arcn->sb.st_mtime = val;
20+-	arcn->sb.st_ctime = arcn->sb.st_atime = arcn->sb.st_mtime;
21+-	arcn->sb.st_ctimensec = arcn->sb.st_atimensec = arcn->sb.st_mtimensec;
22++	arcn->sb.st_ctim = arcn->sb.st_atim = arcn->sb.st_mtim;
23+ 
24+ 	/*
25+ 	 * have to look at the last character, it may be a '/' and that is used
26+@@ -795,14 +794,10 @@ reset:
27+ 		else
28+ 			arcn->sb.st_mtime = val;
29+ 	}
30+-	if (arcn->sb.st_ctime == 0) {
31+-		arcn->sb.st_ctime = arcn->sb.st_mtime;
32+-		arcn->sb.st_ctimensec = arcn->sb.st_mtimensec;
33+-	}
34+-	if (arcn->sb.st_atime == 0) {
35+-		arcn->sb.st_atime = arcn->sb.st_mtime;
36+-		arcn->sb.st_atimensec = arcn->sb.st_mtimensec;
37+-	}
38++	if (arcn->sb.st_ctime == 0)
39++		arcn->sb.st_ctim = arcn->sb.st_mtim;
40++	if (arcn->sb.st_atime == 0)
41++		arcn->sb.st_atim = arcn->sb.st_mtim;
42+ 
43+ 	/*
44+ 	 * If we can find the ascii names for gname and uname in the password
45+-- 
46+2.35.1
47+
+42, -0
 1@@ -0,0 +1,42 @@
 2+From 0e9ff28bc2e5bd4828b98b50333d12a6d24486fe Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Wed, 27 Apr 2022 20:03:45 -0700
 5+Subject: [PATCH] rsync: Pass long long * to scan_scaled
 6+
 7+off_t might not be long long.
 8+---
 9+ usr.bin/rsync/main.c | 7 +++++--
10+ 1 file changed, 5 insertions(+), 2 deletions(-)
11+
12+diff --git a/usr.bin/rsync/main.c b/usr.bin/rsync/main.c
13+index dd175597914..5d7f055a9ae 100644
14+--- a/usr.bin/rsync/main.c
15++++ b/usr.bin/rsync/main.c
16+@@ -353,6 +353,7 @@ main(int argc, char *argv[])
17+ 	struct fargs	*fargs;
18+ 	char		**args;
19+ 	const char	*errstr;
20++	long long	 size;
21+ 
22+ 	/* Global pledge. */
23+ 
24+@@ -488,12 +489,14 @@ basedir:
25+ 			opts.basedir[basedir_cnt++] = optarg;
26+ 			break;
27+ 		case OP_MAX_SIZE:
28+-			if (scan_scaled(optarg, &opts.max_size) == -1)
29++			if (scan_scaled(optarg, &size) == -1)
30+ 				err(1, "bad max-size");
31++			opts.max_size = size;
32+ 			break;
33+ 		case OP_MIN_SIZE:
34+-			if (scan_scaled(optarg, &opts.min_size) == -1)
35++			if (scan_scaled(optarg, &size) == -1)
36+ 				err(1, "bad min-size");
37++			opts.max_size = size;
38+ 			break;
39+ 		case OP_VERSION:
40+ 			fprintf(stderr, "openrsync: protocol version %u\n",
41+-- 
42+2.37.3
43+
+28, -0
 1@@ -0,0 +1,28 @@
 2+From 43cb99e0700fe904af34962b9b7ca4560dd70d62 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 6 Sep 2022 23:36:35 -0700
 5+Subject: [PATCH] libutil: Include <util.h> instead of "util.h"
 6+
 7+We provide our own util.h and want to use that instead of OpenBSD's
 8+version.
 9+---
10+ lib/libutil/fmt_scaled.c | 3 +--
11+ 1 file changed, 1 insertion(+), 2 deletions(-)
12+
13+diff --git a/lib/libutil/fmt_scaled.c b/lib/libutil/fmt_scaled.c
14+index 374901ffe1e..05ef9983afe 100644
15+--- a/lib/libutil/fmt_scaled.c
16++++ b/lib/libutil/fmt_scaled.c
17+@@ -42,8 +42,7 @@
18+ #include <string.h>
19+ #include <ctype.h>
20+ #include <limits.h>
21+-
22+-#include "util.h"
23++#include <util.h>
24+ 
25+ typedef enum {
26+ 	NONE = 0, KILO = 1, MEGA = 2, GIGA = 3, TERA = 4, PETA = 5, EXA = 6
27+-- 
28+2.35.1
29+
+59, -0
 1@@ -0,0 +1,59 @@
 2+From 506272f64ba252c562e3036d14713de780817d1a Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 20 May 2021 13:44:35 -0700
 5+Subject: [PATCH] nc: Add option to disable certificate time checking
 6+
 7+---
 8+ usr.bin/nc/nc.1     | 2 ++
 9+ usr.bin/nc/netcat.c | 8 ++++++--
10+ 2 files changed, 8 insertions(+), 2 deletions(-)
11+
12+diff --git a/usr.bin/nc/nc.1 b/usr.bin/nc/nc.1
13+index 0ef318e0e6f..5858ef763dc 100644
14+--- a/usr.bin/nc/nc.1
15++++ b/usr.bin/nc/nc.1
16+@@ -249,6 +249,8 @@ may be one of:
17+ which disables certificate verification;
18+ .Cm noname ,
19+ which disables certificate name checking;
20++.Cm notime ,
21++which disables certificate validity time checking;
22+ .Cm clientcert ,
23+ which requires a client certificate on incoming connections; or
24+ .Cm muststaple ,
25+diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
26+index 7369ed85619..29d2cb3bf29 100644
27+--- a/usr.bin/nc/netcat.c
28++++ b/usr.bin/nc/netcat.c
29+@@ -70,8 +70,9 @@
30+ 
31+ #define TLS_NOVERIFY	(1 << 1)
32+ #define TLS_NONAME	(1 << 2)
33+-#define TLS_CCERT	(1 << 3)
34+-#define TLS_MUSTSTAPLE	(1 << 4)
35++#define TLS_NOTIME	(1 << 3)
36++#define TLS_CCERT	(1 << 4)
37++#define TLS_MUSTSTAPLE	(1 << 5)
38+ 
39+ /* Command Line Options */
40+ int	dflag;					/* detached, no stdin */
41+@@ -546,6 +547,8 @@ main(int argc, char *argv[])
42+ 			errx(1, "clientcert is only valid with -l");
43+ 		if (TLSopt & TLS_NONAME)
44+ 			tls_config_insecure_noverifyname(tls_cfg);
45++		if (TLSopt & TLS_NOTIME)
46++			tls_config_insecure_noverifytime(tls_cfg);
47+ 		if (TLSopt & TLS_NOVERIFY) {
48+ 			if (tls_expecthash != NULL)
49+ 				errx(1, "-H and -T noverify may not be used "
50+@@ -1705,6 +1708,7 @@ process_tls_opt(char *s, int *flags)
51+ 		{ "muststaple",		TLS_MUSTSTAPLE,		NULL },
52+ 		{ "noverify",		TLS_NOVERIFY,		NULL },
53+ 		{ "noname",		TLS_NONAME,		NULL },
54++		{ "notime",		TLS_NOTIME,		NULL },
55+ 		{ "protocols",		-1,			&tls_protocols },
56+ 		{ NULL,			-1,			NULL },
57+ 	};
58+-- 
59+2.37.3
60+
+2, -0
1@@ -0,0 +1,2 @@
2+4d545e75c144848b06cb1ee661ab13b654683ae47fcd5f264a4520ab2bfe4c0f  src.tar.gz
3+bb0dfa11584d68464b3f788e43655f6454bb3ecba8ad5500377630bcf23570ec  sys.tar.gz
+5, -0
1@@ -0,0 +1,5 @@
2+remote-name
3+url = "https://cdn.openbsd.org/pub/OpenBSD/7.3/src.tar.gz"
4+
5+remote-name
6+url = "https://cdn.openbsd.org/pub/OpenBSD/7.3/sys.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+7.3 r0
+29, -0
 1@@ -0,0 +1,29 @@
 2+# openssh
 3+
 4+## config.h
 5+Generated with
 6+
 7+	./configure \
 8+		--disable-pkcs11 \
 9+		--disable-wtmp \
10+		--enable-security-key \
11+		--without-pie \
12+		--with-security-key-builtin \
13+		--with-bearssl \
14+		CPPFLAGS='-I/src/oasis/pkg/openbsd/include -I/src/oasis/out/pkg/libfido2/include -I/src/oasis/out/pkg/zlib/include' \
15+		LDFLAGS='-L/src/oasis/out/pkg/bearssl -L/src/oasis/out/pkg/openbsd -L/src/oasis/out/pkg/libfido2 -L/src/oasis/out/pkg/libcbor -L/src/oasis/out/pkg/zlib' \
16+		LIBS='-l bsd'
17+
18+Several changes were made:
19+* `SECCOMP_AUDIT_ARCH`, `SANDBOX_SECCOMP_FILTER`, and `SANDBOX_RLIMIT`
20+  were removed and instead defined in `gen.lua` dependent on the
21+  target toolchain architecture.
22+* `HAVE_STRNVIS` was undefined because although we do build it into
23+  `libbsd.a`, we don't include the whole openbsd header directory.
24+* `HAVE_PLEDGE` is defined because we have a stub definition in
25+  `pkg/openbsd/include/unistd.h`.
26+* `SIZEOF_*` are undefined because they are only used if C99 `int*_t` are not
27+  available.
28+* `_PATH_BTMP`, `_PATH_PASSWD_PROG`, `_PATH_SSH_PIDDIR` are moved to a top
29+  section along with a number of other paths which are normally defined
30+  with flags by the Makefile or automatically by `pathnames.h`.
+635, -0
  1@@ -0,0 +1,635 @@
  2+#define SSHDIR "/etc/ssh"
  3+#define _PATH_BTMP "/var/log/btmp"
  4+#define _PATH_PASSWD_PROG "/bin/passwd"
  5+#define _PATH_PRIVSEP_CHROOT_DIR "/var/empty"
  6+#define _PATH_SFTP_SERVER "/libexec/sftp-server"
  7+#define _PATH_SSH_ASKPASS_DEFAULT "/libexec/ssh-askpass"
  8+#define _PATH_SSH_KEY_SIGN "/libexec/ssh-keysign"
  9+#define _PATH_SSH_PIDDIR "/run"
 10+#define _PATH_SSH_PKCS11_HELPER "/libexec/ssh-pkcs11-helper"
 11+#define _PATH_SSH_SK_HELPER "/libexec/ssh-sk-helper"
 12+#define _PATH_SSH_PROGRAM "/bin/ssh"
 13+#define _PATH_XAUTH "/dev/null/xauth"
 14+
 15+/* #undef AC_APPLE_UNIVERSAL_BUILD */
 16+/* #undef AIX_GETNAMEINFO_HACK */
 17+/* #undef AIX_LOGINFAILED_4ARG */
 18+/* #undef AU_IPv4 */
 19+/* #undef BIND_8_COMPAT */
 20+/* #undef BROKEN_BSM_API */
 21+/* #undef BROKEN_CLOSEFROM */
 22+/* #undef BROKEN_CMSG_TYPE */
 23+/* #undef BROKEN_GETADDRINFO */
 24+/* #undef BROKEN_GETGROUPS */
 25+/* #undef BROKEN_GETLINE */
 26+/* #undef BROKEN_GLOB */
 27+/* #undef BROKEN_INET_NTOA */
 28+/* #undef BROKEN_ONE_BYTE_DIRENT_D_NAME */
 29+/* #undef BROKEN_POLL */
 30+/* #undef BROKEN_READV_COMPARISON */
 31+/* #undef BROKEN_READ_COMPARISON */
 32+/* #undef BROKEN_SAVED_UIDS */
 33+/* #undef BROKEN_SETREGID */
 34+/* #undef BROKEN_SETRESGID */
 35+/* #undef BROKEN_SETRESUID */
 36+/* #undef BROKEN_SETREUID */
 37+/* #undef BROKEN_SETVBUF */
 38+/* #undef BROKEN_SHADOW_EXPIRE */
 39+/* #undef BROKEN_SNPRINTF */
 40+/* #undef BROKEN_STRNDUP */
 41+/* #undef BROKEN_STRNLEN */
 42+/* #undef BROKEN_STRNVIS */
 43+/* #undef BROKEN_TCGETATTR_ICANON */
 44+/* #undef BROKEN_UPDWTMPX */
 45+/* #undef BSD_AUTH */
 46+/* #undef CONF_LASTLOG_FILE */
 47+/* #undef CONF_UTMP_FILE */
 48+/* #undef CONF_WTMPX_FILE */
 49+/* #undef CONF_WTMP_FILE */
 50+/* #undef DISABLE_FD_PASSING */
 51+/* #undef DISABLE_LASTLOG */
 52+/* #undef DISABLE_LOGIN */
 53+/* #undef DISABLE_PUTUTLINE */
 54+/* #undef DISABLE_PUTUTXLINE */
 55+/* #undef DISABLE_SHADOW */
 56+/* #undef DISABLE_UTMP */
 57+/* #undef DISABLE_UTMPX */
 58+#define DISABLE_WTMP 1
 59+#define DISABLE_WTMPX 1
 60+/* #undef ENABLE_PKCS11 */
 61+#define ENABLE_SK /**/
 62+#define ENABLE_SK_INTERNAL /**/
 63+/* #undef FFLUSH_NULL_BUG */
 64+/* #undef FILESYSTEM_NO_BACKSLASH */
 65+/* #undef FSID_HAS_VAL */
 66+/* #undef FSID_HAS___VAL */
 67+#define GETPGRP_VOID 1
 68+/* #undef GETSPNAM_CONFLICTING_DEFS */
 69+/* #undef GLOB_HAS_ALTDIRFUNC */
 70+/* #undef GLOB_HAS_GL_MATCHC */
 71+/* #undef GLOB_HAS_GL_STATV */
 72+/* #undef GSSAPI */
 73+#define HAS_SHADOW_EXPIRE 1
 74+/* #undef HAVE_ACCRIGHTS_IN_MSGHDR */
 75+#define HAVE_ADDR_IN_UTMP 1
 76+#define HAVE_ADDR_IN_UTMPX 1
 77+#define HAVE_ADDR_V6_IN_UTMP 1
 78+#define HAVE_ADDR_V6_IN_UTMPX 1
 79+#define HAVE_ARC4RANDOM 1
 80+#define HAVE_ARC4RANDOM_BUF 1
 81+/* #undef HAVE_ARC4RANDOM_STIR */
 82+#define HAVE_ARC4RANDOM_UNIFORM 1
 83+#define HAVE_ASPRINTF 1
 84+/* #undef HAVE_ATTRIBUTE__BOUNDED__ */
 85+#define HAVE_ATTRIBUTE__NONNULL__ 1
 86+/* #undef HAVE_ATTRIBUTE__SENTINEL__ */
 87+/* #undef HAVE_AUG_GET_MACHINE */
 88+#define HAVE_B64_NTOP 1
 89+#define HAVE_B64_PTON 1
 90+#define HAVE_BASENAME 1
 91+#define HAVE_BCOPY 1
 92+/* #undef HAVE_BCRYPT_PBKDF */
 93+/* #undef HAVE_BINDRESVPORT_SA */
 94+/* #undef HAVE_BLF_ENC */
 95+/* #undef HAVE_BLF_H */
 96+/* #undef HAVE_BLOWFISH_EXPAND0STATE */
 97+/* #undef HAVE_BLOWFISH_EXPANDSTATE */
 98+/* #undef HAVE_BLOWFISH_INITSTATE */
 99+/* #undef HAVE_BLOWFISH_STREAM2WORD */
100+/* #undef HAVE_BSD_LIBUTIL_H */
101+/* #undef HAVE_BSM_AUDIT_H */
102+/* #undef HAVE_BSTRING_H */
103+#define HAVE_BZERO 1
104+#define HAVE_CALLOC 1
105+/* #undef HAVE_CAP_RIGHTS_LIMIT */
106+#define HAVE_CLOCK 1
107+#define HAVE_CLOCK_GETTIME 1
108+#define HAVE_CLOCK_T 1
109+/* #undef HAVE_CLOSEFROM */
110+/* #undef HAVE_CLOSE_RANGE */
111+#define HAVE_CONST_GAI_STRERROR_PROTO 1
112+#define HAVE_CONTROL_IN_MSGHDR 1
113+#define HAVE_CRYPT 1
114+/* #undef HAVE_CRYPTO_SHA2_H */
115+#define HAVE_CRYPT_H 1
116+/* #undef HAVE_CYGWIN */
117+#define HAVE_DAEMON 1
118+#define HAVE_DECL_AI_NUMERICSERV 1
119+/* #undef HAVE_DECL_AUTHENTICATE */
120+#define HAVE_DECL_BZERO 1
121+#define HAVE_DECL_FTRUNCATE 1
122+#define HAVE_DECL_GETPEEREID 0
123+#define HAVE_DECL_GLOB_NOMATCH 1
124+/* #undef HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE */
125+#define HAVE_DECL_HOWMANY 1
126+#define HAVE_DECL_H_ERRNO 1
127+/* #undef HAVE_DECL_LOGINFAILED */
128+/* #undef HAVE_DECL_LOGINRESTRICTIONS */
129+/* #undef HAVE_DECL_LOGINSUCCESS */
130+#define HAVE_DECL_MAXSYMLINKS 1
131+#define HAVE_DECL_MEMMEM 0
132+#define HAVE_DECL_NFDBITS 1
133+#define HAVE_DECL_OFFSETOF 1
134+#define HAVE_DECL_O_NONBLOCK 1
135+/* #undef HAVE_DECL_PASSWDEXPIRED */
136+#define HAVE_DECL_READV 1
137+/* #undef HAVE_DECL_SETAUTHDB */
138+#define HAVE_DECL_SHUT_RD 1
139+#define HAVE_DECL_UINT32_MAX 1
140+#define HAVE_DECL_WRITEV 1
141+#define HAVE_DECL__GETLONG 0
142+#define HAVE_DECL__GETSHORT 0
143+/* #undef HAVE_DEV_PTMX */
144+/* #undef HAVE_DEV_PTS_AND_PTC */
145+#define HAVE_DIRENT_H 1
146+#define HAVE_DIRFD 1
147+#define HAVE_DIRNAME 1
148+#define HAVE_DLOPEN 1
149+#define HAVE_ELF_H 1
150+#define HAVE_ENDGRENT 1
151+#define HAVE_ENDIAN_H 1
152+#define HAVE_ENDUTENT 1
153+#define HAVE_ENDUTXENT 1
154+#define HAVE_ERR 1
155+#define HAVE_ERRX 1
156+#define HAVE_ERR_H 1
157+/* #undef HAVE_ETC_DEFAULT_LOGIN */
158+#define HAVE_EXIT_IN_UTMP 1
159+#define HAVE_EXPLICIT_BZERO 1
160+/* #undef HAVE_EXPLICIT_MEMSET */
161+#define HAVE_FCHMOD 1
162+#define HAVE_FCHMODAT 1
163+#define HAVE_FCHOWN 1
164+#define HAVE_FCHOWNAT 1
165+/* #undef HAVE_FCNTL_CLOSEM */
166+#define HAVE_FCNTL_H 1
167+#define HAVE_FD_MASK 1
168+#define HAVE_FEATURES_H 1
169+#define HAVE_FIDO_ASSERT_SET_CLIENTDATA 1
170+#define HAVE_FIDO_CRED_PROT 1
171+#define HAVE_FIDO_CRED_SET_CLIENTDATA 1
172+#define HAVE_FIDO_CRED_SET_PROT 1
173+#define HAVE_FIDO_DEV_GET_TOUCH_BEGIN 1
174+#define HAVE_FIDO_DEV_GET_TOUCH_STATUS 1
175+#define HAVE_FIDO_DEV_SUPPORTS_CRED_PROT 1
176+/* #undef HAVE_FLOATINGPOINT_H */
177+#define HAVE_FLOCK 1
178+#define HAVE_FMT_SCALED 1
179+#define HAVE_FNMATCH 1
180+#define HAVE_FNMATCH_H 1
181+#define HAVE_FREEADDRINFO 1
182+#define HAVE_FREEZERO 1
183+#define HAVE_FSBLKCNT_T 1
184+#define HAVE_FSFILCNT_T 1
185+#define HAVE_FSTATFS 1
186+#define HAVE_FSTATVFS 1
187+#define HAVE_FUTIMES 1
188+#define HAVE_GAI_STRERROR 1
189+#define HAVE_GETADDRINFO 1
190+/* #undef HAVE_GETAUDIT */
191+/* #undef HAVE_GETAUDIT_ADDR */
192+#define HAVE_GETCWD 1
193+#define HAVE_GETGROUPLIST 1
194+/* #undef HAVE_GETGRSET */
195+/* #undef HAVE_GETLASTLOGXBYNAME */
196+#define HAVE_GETLINE 1
197+/* #undef HAVE_GETLUID */
198+#define HAVE_GETNAMEINFO 1
199+#define HAVE_GETOPT 1
200+#define HAVE_GETOPT_H 1
201+#define HAVE_GETOPT_OPTRESET 1
202+#define HAVE_GETPAGESIZE 1
203+/* #undef HAVE_GETPEEREID */
204+/* #undef HAVE_GETPEERUCRED */
205+#define HAVE_GETPGID 1
206+#define HAVE_GETPGRP 1
207+/* #undef HAVE_GETPWANAM */
208+#define HAVE_GETRANDOM 1
209+#define HAVE_GETRLIMIT 1
210+/* #undef HAVE_GETRRSETBYNAME */
211+/* #undef HAVE_GETSEUSERBYNAME */
212+#define HAVE_GETSID 1
213+#define HAVE_GETTIMEOFDAY 1
214+/* #undef HAVE_GETTTYENT */
215+#define HAVE_GETUTENT 1
216+#define HAVE_GETUTID 1
217+#define HAVE_GETUTLINE 1
218+#define HAVE_GETUTXENT 1
219+#define HAVE_GETUTXID 1
220+#define HAVE_GETUTXLINE 1
221+/* #undef HAVE_GETUTXUSER */
222+/* #undef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL */
223+#define HAVE_GLOB 1
224+#define HAVE_GLOB_H 1
225+#define HAVE_GROUP_FROM_GID 1
226+/* #undef HAVE_GSSAPI_GENERIC_H */
227+/* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
228+/* #undef HAVE_GSSAPI_GSSAPI_H */
229+/* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */
230+/* #undef HAVE_GSSAPI_H */
231+/* #undef HAVE_GSSAPI_KRB5_H */
232+#define HAVE_HEADER_AD 1
233+#define HAVE_HOST_IN_UTMP 1
234+#define HAVE_HOST_IN_UTMPX 1
235+/* #undef HAVE_IAF_H */
236+/* #undef HAVE_IA_H */
237+#define HAVE_ID_IN_UTMP 1
238+#define HAVE_ID_IN_UTMPX 1
239+#define HAVE_IFADDRS_H 1
240+#define HAVE_INET_ATON 1
241+#define HAVE_INET_NTOA 1
242+#define HAVE_INET_NTOP 1
243+/* #undef HAVE_INNETGR */
244+#define HAVE_INT64_T 1
245+#define HAVE_INTMAX_T 1
246+#define HAVE_INTTYPES_H 1
247+#define HAVE_INTXX_T 1
248+#define HAVE_IN_ADDR_T 1
249+#define HAVE_IN_PORT_T 1
250+#define HAVE_ISBLANK 1
251+#define HAVE_KILLPG 1
252+/* #undef HAVE_KRB5_CC_NEW_UNIQUE */
253+/* #undef HAVE_KRB5_FREE_ERROR_MESSAGE */
254+/* #undef HAVE_KRB5_GET_ERROR_MESSAGE */
255+#define HAVE_LANGINFO_H 1
256+#define HAVE_LASTLOG_H 1
257+/* #undef HAVE_LDNS */
258+/* #undef HAVE_LIBAUDIT_H */
259+/* #undef HAVE_LIBBSM */
260+/* #undef HAVE_LIBDL */
261+#define HAVE_LIBGEN_H 1
262+/* #undef HAVE_LIBIAF */
263+/* #undef HAVE_LIBNETWORK */
264+/* #undef HAVE_LIBPAM */
265+/* #undef HAVE_LIBPROC_H */
266+/* #undef HAVE_LIBSOCKET */
267+/* #undef HAVE_LIBUTIL_H */
268+/* #undef HAVE_LIBXNET */
269+#define HAVE_LIBZ 1
270+#define HAVE_LIMITS_H 1
271+#define HAVE_LINUX_AUDIT_H 1
272+#define HAVE_LINUX_FILTER_H 1
273+#define HAVE_LINUX_IF_TUN_H 1
274+#define HAVE_LINUX_SECCOMP_H 1
275+#define HAVE_LLABS 1
276+#define HAVE_LOCALE_H 1
277+#define HAVE_LOCALTIME_R 1
278+/* #undef HAVE_LOGIN */
279+/* #undef HAVE_LOGIN_CAP_H */
280+/* #undef HAVE_LOGIN_GETCAPBOOL */
281+/* #undef HAVE_LOGIN_GETPWCLASS */
282+/* #undef HAVE_LOGIN_H */
283+/* #undef HAVE_LOGOUT */
284+/* #undef HAVE_LOGWTMP */
285+#define HAVE_LONG_DOUBLE 1
286+#define HAVE_LONG_LONG 1
287+/* #undef HAVE_MAILLOCK_H */
288+#define HAVE_MALLOC 1
289+#define HAVE_MBLEN 1
290+#define HAVE_MBTOWC 1
291+#define HAVE_MEMMEM 1
292+#define HAVE_MEMMOVE 1
293+/* #undef HAVE_MEMSET_S */
294+#define HAVE_MKDTEMP 1
295+#define HAVE_MODE_T 1
296+#define HAVE_NANOSLEEP 1
297+/* #undef HAVE_NDIR_H */
298+#define HAVE_NETDB_H 1
299+/* #undef HAVE_NETGROUP_H */
300+/* #undef HAVE_NET_IF_TUN_H */
301+#define HAVE_NET_ROUTE_H 1
302+/* #undef HAVE_NEXT */
303+#define HAVE_NFDS_T 1
304+/* #undef HAVE_NGETADDRINFO */
305+#define HAVE_NL_LANGINFO 1
306+/* #undef HAVE_NSLEEP */
307+/* #undef HAVE_OGETADDRINFO */
308+/* #undef HAVE_OLD_PAM */
309+/* #undef HAVE_OPENLOG_R */
310+#define HAVE_OPENPTY 1
311+/* #undef HAVE_OSF_SIA */
312+/* #undef HAVE_PAM_GETENVLIST */
313+/* #undef HAVE_PAM_PAM_APPL_H */
314+/* #undef HAVE_PAM_PUTENV */
315+#define HAVE_PATHS_H 1
316+#define HAVE_PID_IN_UTMP 1
317+#define HAVE_PID_T 1
318+#define HAVE_PLEDGE 1
319+#define HAVE_POLL 1
320+#define HAVE_POLL_H 1
321+#define HAVE_PPOLL 1
322+#define HAVE_PRCTL 1
323+/* #undef HAVE_PRIV_BASICSET */
324+/* #undef HAVE_PRIV_H */
325+/* #undef HAVE_PROCCTL */
326+#define HAVE_PROC_PID 1
327+/* #undef HAVE_PROC_PIDINFO */
328+#define HAVE_PSELECT 1
329+/* #undef HAVE_PSTAT */
330+#define HAVE_PTY_H 1
331+#define HAVE_PUTUTLINE 1
332+#define HAVE_PUTUTXLINE 1
333+#define HAVE_RAISE 1
334+#define HAVE_READPASSPHRASE 1
335+#define HAVE_READPASSPHRASE_H 1
336+#define HAVE_REALLOC 1
337+#define HAVE_REALLOCARRAY 1
338+#define HAVE_REALPATH 1
339+#define HAVE_RECALLOCARRAY 1
340+#define HAVE_RECVMSG 1
341+#define HAVE_RLIMIT_NPROC /**/
342+/* #undef HAVE_RPC_TYPES_H */
343+/* #undef HAVE_RRESVPORT_AF */
344+/* #undef HAVE_SANDBOX_H */
345+/* #undef HAVE_SANDBOX_INIT */
346+#define HAVE_SA_FAMILY_T 1
347+#define HAVE_SCAN_SCALED 1
348+/* #undef HAVE_SECUREWARE */
349+/* #undef HAVE_SECURITY_PAM_APPL_H */
350+#define HAVE_SENDMSG 1
351+/* #undef HAVE_SETAUTHDB */
352+/* #undef HAVE_SETDTABLESIZE */
353+#define HAVE_SETEGID 1
354+#define HAVE_SETENV 1
355+#define HAVE_SETEUID 1
356+/* #undef HAVE_SETGROUPENT */
357+#define HAVE_SETGROUPS 1
358+#define HAVE_SETLINEBUF 1
359+/* #undef HAVE_SETLOGIN */
360+/* #undef HAVE_SETLUID */
361+/* #undef HAVE_SETPASSENT */
362+/* #undef HAVE_SETPCRED */
363+/* #undef HAVE_SETPFLAGS */
364+/* #undef HAVE_SETPPRIV */
365+/* #undef HAVE_SETPROCTITLE */
366+#define HAVE_SETREGID 1
367+#define HAVE_SETRESGID 1
368+#define HAVE_SETRESUID 1
369+#define HAVE_SETREUID 1
370+#define HAVE_SETRLIMIT 1
371+#define HAVE_SETSID 1
372+#define HAVE_SETUTENT 1
373+/* #undef HAVE_SETUTXDB */
374+#define HAVE_SETUTXENT 1
375+#define HAVE_SETVBUF 1
376+/* #undef HAVE_SET_ID */
377+/* #undef HAVE_SHA256UPDATE */
378+/* #undef HAVE_SHA2_H */
379+/* #undef HAVE_SHA384UPDATE */
380+/* #undef HAVE_SHA512UPDATE */
381+#define HAVE_SHADOW_H 1
382+#define HAVE_SIGACTION 1
383+/* #undef HAVE_SIGHANDLER_T */
384+/* #undef HAVE_SIGVEC */
385+#define HAVE_SIG_ATOMIC_T 1
386+#define HAVE_SIZE_T 1
387+#define HAVE_SNPRINTF 1
388+#define HAVE_SOCKETPAIR 1
389+#define HAVE_SO_PEERCRED 1
390+#define HAVE_SSIZE_T 1
391+#define HAVE_SS_FAMILY_IN_SS 1
392+/* #undef HAVE_SS_IN_UTMPX */
393+#define HAVE_STATFS 1
394+#define HAVE_STATVFS 1
395+#define HAVE_STDDEF_H 1
396+#define HAVE_STDINT_H 1
397+#define HAVE_STDIO_H 1
398+#define HAVE_STDLIB_H 1
399+#define HAVE_STRCASESTR 1
400+#define HAVE_STRDUP 1
401+#define HAVE_STRERROR 1
402+#define HAVE_STRFTIME 1
403+#define HAVE_STRINGS_H 1
404+#define HAVE_STRING_H 1
405+#define HAVE_STRLCAT 1
406+#define HAVE_STRLCPY 1
407+#define HAVE_STRMODE 1
408+#define HAVE_STRNDUP 1
409+#define HAVE_STRNLEN 1
410+/* #undef HAVE_STRNVIS */
411+#define HAVE_STRPTIME 1
412+#define HAVE_STRSEP 1
413+#define HAVE_STRSIGNAL 1
414+#define HAVE_STRTOLL 1
415+#define HAVE_STRTONUM 1
416+#define HAVE_STRTOUL 1
417+#define HAVE_STRTOULL 1
418+#define HAVE_STRUCT_ADDRINFO 1
419+#define HAVE_STRUCT_IN6_ADDR 1
420+/* #undef HAVE_STRUCT_PASSWD_PW_CHANGE */
421+/* #undef HAVE_STRUCT_PASSWD_PW_CLASS */
422+/* #undef HAVE_STRUCT_PASSWD_PW_EXPIRE */
423+#define HAVE_STRUCT_PASSWD_PW_GECOS 1
424+#define HAVE_STRUCT_POLLFD_FD 1
425+#define HAVE_STRUCT_SOCKADDR_IN6 1
426+#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
427+#define HAVE_STRUCT_SOCKADDR_STORAGE 1
428+#define HAVE_STRUCT_STATFS_F_FILES 1
429+#define HAVE_STRUCT_STATFS_F_FLAGS 1
430+#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
431+#define HAVE_STRUCT_STAT_ST_MTIM 1
432+#define HAVE_STRUCT_STAT_ST_MTIME 1
433+#define HAVE_STRUCT_TIMESPEC 1
434+#define HAVE_STRUCT_TIMEVAL 1
435+/* #undef HAVE_SWAP32 */
436+#define HAVE_SYSCONF 1
437+/* #undef HAVE_SYSLEN_IN_UTMPX */
438+/* #undef HAVE_SYS_AUDIT_H */
439+/* #undef HAVE_SYS_BITYPES_H */
440+/* #undef HAVE_SYS_BSDTTY_H */
441+/* #undef HAVE_SYS_BYTEORDER_H */
442+/* #undef HAVE_SYS_CAPSICUM_H */
443+/* #undef HAVE_SYS_CDEFS_H */
444+#define HAVE_SYS_DIR_H 1
445+/* #undef HAVE_SYS_ERRLIST */
446+#define HAVE_SYS_FILE_H 1
447+/* #undef HAVE_SYS_LABEL_H */
448+#define HAVE_SYS_MMAN_H 1
449+#define HAVE_SYS_MOUNT_H 1
450+/* #undef HAVE_SYS_NDIR_H */
451+/* #undef HAVE_SYS_NERR */
452+#define HAVE_SYS_PARAM_H 1
453+#define HAVE_SYS_POLL_H 1
454+#define HAVE_SYS_PRCTL_H 1
455+/* #undef HAVE_SYS_PROCCTL_H */
456+/* #undef HAVE_SYS_PSTAT_H */
457+/* #undef HAVE_SYS_PTMS_H */
458+#define HAVE_SYS_PTRACE_H 1
459+#define HAVE_SYS_RANDOM_H 1
460+#define HAVE_SYS_SELECT_H 1
461+#define HAVE_SYS_STATVFS_H 1
462+#define HAVE_SYS_STAT_H 1
463+/* #undef HAVE_SYS_STREAM_H */
464+#define HAVE_SYS_STROPTS_H 1
465+/* #undef HAVE_SYS_STRTIO_H */
466+/* #undef HAVE_SYS_SYSCTL_H */
467+/* #undef HAVE_SYS_SYSLOG_H */
468+#define HAVE_SYS_SYSMACROS_H 1
469+/* #undef HAVE_SYS_TIMERS_H */
470+#define HAVE_SYS_TIME_H 1
471+#define HAVE_SYS_TYPES_H 1
472+#define HAVE_SYS_UN_H 1
473+#define HAVE_SYS_VFS_H 1
474+#define HAVE_TCGETPGRP 1
475+#define HAVE_TCSENDBREAK 1
476+#define HAVE_TIME 1
477+#define HAVE_TIME_H 1
478+/* #undef HAVE_TIME_IN_UTMP */
479+/* #undef HAVE_TIME_IN_UTMPX */
480+#define HAVE_TIMINGSAFE_BCMP 1
481+/* #undef HAVE_TMPDIR_H */
482+#define HAVE_TRUNCATE 1
483+/* #undef HAVE_TTYENT_H */
484+#define HAVE_TV_IN_UTMP 1
485+#define HAVE_TV_IN_UTMPX 1
486+#define HAVE_TYPE_IN_UTMP 1
487+#define HAVE_TYPE_IN_UTMPX 1
488+/* #undef HAVE_UCRED_H */
489+#define HAVE_UINTMAX_T 1
490+#define HAVE_UINTXX_T 1
491+#define HAVE_UNISTD_H 1
492+#define HAVE_UNSETENV 1
493+#define HAVE_UNSIGNED_LONG_LONG 1
494+#define HAVE_UPDWTMP 1
495+#define HAVE_UPDWTMPX 1
496+/* #undef HAVE_USERSEC_H */
497+#define HAVE_USER_FROM_UID 1
498+#define HAVE_USLEEP 1
499+#define HAVE_UTIL_H 1
500+#define HAVE_UTIMENSAT 1
501+#define HAVE_UTIMES 1
502+#define HAVE_UTIME_H 1
503+#define HAVE_UTMPNAME 1
504+#define HAVE_UTMPXNAME 1
505+#define HAVE_UTMPX_H 1
506+#define HAVE_UTMP_H 1
507+#define HAVE_U_CHAR 1
508+#define HAVE_U_INT 1
509+#define HAVE_U_INT64_T 1
510+#define HAVE_U_INTXX_T 1
511+#define HAVE_VASPRINTF 1
512+#define HAVE_VA_COPY 1
513+/* #undef HAVE_VIS_H */
514+#define HAVE_VSNPRINTF 1
515+#define HAVE_WAITPID 1
516+#define HAVE_WARN 1
517+#define HAVE_WCHAR_H 1
518+#define HAVE_WCWIDTH 1
519+/* #undef HAVE__GETLONG */
520+/* #undef HAVE__GETPTY */
521+/* #undef HAVE__GETSHORT */
522+#define HAVE__RES_EXTERN 1
523+/* #undef HAVE___B64_NTOP */
524+/* #undef HAVE___B64_PTON */
525+#define HAVE___FUNCTION__ 1
526+#define HAVE___PROGNAME 1
527+/* #undef HAVE___SS_FAMILY_IN_SS */
528+/* #undef HAVE___VA_COPY */
529+#define HAVE___func__ 1
530+/* #undef HEIMDAL */
531+/* #undef IPADDR_IN_DISPLAY */
532+#define IPV4_IN_IPV6 1
533+/* #undef IP_TOS_IS_BROKEN */
534+/* #undef KRB5 */
535+/* #undef LASTLOG_WRITE_PUTUTXLINE */
536+#define LINK_OPNOTSUPP_ERRNO EPERM
537+#define LINUX_OOM_ADJUST 1
538+/* #undef LLONG_MAX */
539+/* #undef LLONG_MIN */
540+#define LOCKED_PASSWD_PREFIX "!"
541+/* #undef LOCKED_PASSWD_STRING */
542+/* #undef LOCKED_PASSWD_SUBSTR */
543+/* #undef LOGIN_NEEDS_UTMPX */
544+/* #undef MAIL_DIRECTORY */
545+/* #undef NEED_SETPGRP */
546+/* #undef NO_ATTRIBUTE_ON_PROTOTYPE_ARGS */
547+/* #undef NO_ATTRIBUTE_ON_RETURN_TYPE */
548+/* #undef NO_SA_RESTART */
549+/* #undef NO_UID_RESTORATION_TEST */
550+/* #undef NO_X11_UNIX_SOCKETS */
551+#define PACKAGE_BUGREPORT "openssh-unix-dev@mindrot.org"
552+#define PACKAGE_NAME "OpenSSH"
553+#define PACKAGE_STRING "OpenSSH Portable"
554+#define PACKAGE_TARNAME "openssh"
555+#define PACKAGE_URL ""
556+#define PACKAGE_VERSION "Portable"
557+/* #undef PAM_SUN_CODEBASE */
558+#define PAM_TTY_KLUDGE 1
559+/* #undef PASSWD_NEEDS_USERNAME */
560+/* #undef PLATFORM_SYS_DIR_UID */
561+/* #undef PTY_ZEROREAD */
562+/* #undef SANDBOX_CAPSICUM */
563+/* #undef SANDBOX_DARWIN */
564+/* #undef SANDBOX_NULL */
565+/* #undef SANDBOX_PLEDGE */
566+/* #undef SANDBOX_SKIP_RLIMIT_FSIZE */
567+/* #undef SANDBOX_SKIP_RLIMIT_NOFILE */
568+/* #undef SANDBOX_SOLARIS */
569+/* #undef SANDBOX_SYSTRACE */
570+/* #undef SETEUID_BREAKS_SETUID */
571+#define SIZEOF_INT 4
572+#define SIZEOF_LONG_INT SIZEOF_LONG
573+#define SIZEOF_LONG_LONG_INT 8
574+#define SIZEOF_SHORT_INT 2
575+/* probe SIZEOF_TIME_T */
576+#define SNPRINTF_CONST const
577+#define SPT_TYPE SPT_REUSEARGV
578+/* #undef SSHD_ACQUIRES_CTTY */
579+/* #undef SSHD_PAM_SERVICE */
580+/* #undef SSHPAM_CHAUTHTOK_NEEDS_RUID */
581+/* #undef SSH_AUDIT_EVENTS */
582+/* #undef SSH_IOBUFSZ */
583+#define SSH_PRIVSEP_USER "sshd"
584+#define SSH_TUN_COMPAT_AF 1
585+/* #undef SSH_TUN_FREEBSD */
586+#define SSH_TUN_LINUX 1
587+/* #undef SSH_TUN_NO_L2 */
588+/* #undef SSH_TUN_OPENBSD */
589+#define SSH_TUN_PREPEND_AF 1
590+#define STDC_HEADERS 1
591+/* #undef SUPERUSER_PATH */
592+/* #undef SYSLOG_R_SAFE_IN_SIGHAND */
593+#define SYS_RDOMAIN_LINUX 1
594+/* #undef UNIXWARE_LONG_PASSWORDS */
595+#define USER_PATH "/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin"
596+/* #undef USE_AFS */
597+/* #undef USE_BSM_AUDIT */
598+#define USE_BTMP 1
599+/* #undef USE_LIBEDIT */
600+/* #undef USE_LINUX_AUDIT */
601+/* #undef USE_PAM */
602+/* #undef USE_PIPES */
603+/* #undef USE_SOLARIS_PRIVS */
604+/* #undef USE_SOLARIS_PROCESS_CONTRACTS */
605+/* #undef USE_SOLARIS_PROJECTS */
606+#define VARIABLE_DECLARATION_AFTER_CODE 1
607+/* #undef VARIABLE_LENGTH_ARRAYS */
608+/* #undef WITH_ABBREV_NO_TTY */
609+/* #undef WITH_AIXAUTHENTICATE */
610+#define WITH_BEARSSL 1
611+/* #undef WITH_IRIX_ARRAY */
612+/* #undef WITH_IRIX_AUDIT */
613+/* #undef WITH_IRIX_JOBS */
614+/* #undef WITH_IRIX_PROJECT */
615+/* #undef WITH_SELINUX */
616+#define WITH_ZLIB 1
617+#if defined AC_APPLE_UNIVERSAL_BUILD
618+# if defined __BIG_ENDIAN__
619+#  define WORDS_BIGENDIAN 1
620+# endif
621+#else
622+# ifndef WORDS_BIGENDIAN
623+/* #  undef WORDS_BIGENDIAN */
624+# endif
625+#endif
626+/* #undef XAUTH_PATH */
627+/* #undef _FILE_OFFSET_BITS */
628+/* #undef _LARGE_FILES */
629+/* #undef __res_state */
630+/* #undef calloc */
631+#ifndef __cplusplus
632+/* #undef inline */
633+#endif
634+/* #undef malloc */
635+/* #undef realloc */
636+/* #undef socklen_t */
+169, -0
  1@@ -0,0 +1,169 @@
  2+local arch = config.target.platform:match('[^-]*')
  3+local archflags = {
  4+	x86_64='-D SANDBOX_SECCOMP_FILTER=1 -D SECCOMP_AUDIT_ARCH=AUDIT_ARCH_X86_64',
  5+	aarch64='-D SANDBOX_SECCOMP_FILTER=1 -D SECCOMP_AUDIT_ARCH=AUDIT_ARCH_AARCH64',
  6+}
  7+cflags{
  8+	'-Wall', '-Wno-pointer-sign', '-Wno-format-truncation', '-Wno-stringop-truncation',
  9+	'-D _XOPEN_SOURCE=600',
 10+	'-D _DEFAULT_SOURCE',
 11+	archflags[arch] or '-D SANDBOX_RLIMIT=1',
 12+	'-I $outdir',
 13+	'-I $srcdir',
 14+	'-isystem $basedir/pkg/openbsd/include',
 15+	'-isystem $builddir/pkg/bearssl/include',
 16+	'-isystem $builddir/pkg/libfido2/include',
 17+	'-isystem $builddir/pkg/linux-headers/include',
 18+	'-isystem $builddir/pkg/zlib/include',
 19+	'-idirafter $srcdir/openbsd-compat',
 20+}
 21+
 22+pkg.deps = {
 23+	'pkg/bearssl/headers',
 24+	'pkg/libfido2/headers',
 25+	'pkg/linux-headers/headers',
 26+	'pkg/zlib/headers',
 27+	'$outdir/config.h',
 28+}
 29+
 30+build('cat', '$outdir/config.h', {
 31+	'$dir/config.h',
 32+	'$builddir/probe/SIZEOF_LONG',
 33+	'$builddir/probe/SIZEOF_TIME_T',
 34+})
 35+
 36+lib('libopenbsd-compat.a', [[openbsd-compat/(
 37+	base64.c basename.c bcrypt_pbkdf.c bindresvport.c blowfish.c daemon.c
 38+	dirname.c explicit_bzero.c fmt_scaled.c freezero.c getcwd.c
 39+	getgrouplist.c getopt_long.c getrrsetbyname.c glob.c inet_aton.c
 40+	inet_ntoa.c inet_ntop.c md5.c memmem.c mktemp.c pwcache.c
 41+	readpassphrase.c reallocarray.c recallocarray.c rresvport.c setenv.c
 42+	setproctitle.c sha1.c sha2.c sigact.c strcasestr.c strlcat.c strlcpy.c
 43+	strmode.c strndup.c strnlen.c strptime.c strsep.c strtoll.c strtonum.c
 44+	strtoull.c strtoul.c timingsafe_bcmp.c vis.c
 45+
 46+	arc4random.c bsd-asprintf.c bsd-closefrom.c bsd-cygwin_util.c bsd-err.c
 47+	bsd-flock.c bsd-getpagesize.c bsd-getpeereid.c bsd-malloc.c bsd-misc.c
 48+	bsd-nextstep.c bsd-openpty.c bsd-poll.c bsd-setres_id.c bsd-signal.c
 49+	bsd-snprintf.c bsd-statvfs.c bsd-waitpid.c fake-rfc2553.c
 50+	getrrsetbyname-ldns.c kludge-fd_set.c
 51+	xcrypt.c
 52+
 53+	port-aix.c port-irix.c port-linux.c port-solaris.c port-net.c port-uw.c
 54+)]])
 55+
 56+-- port-tun.c from openbsd-compat depends on sshbuf-getput-basic.c and ssherr.c
 57+-- from libssh.a, so just include it in libssh.a.
 58+lib('libssh.a', [[
 59+	ssh_api.c
 60+	ssherr.c
 61+	sshbuf.c
 62+	sshkey.c
 63+	sshbuf-getput-basic.c
 64+	sshbuf-misc.c
 65+	krl.c
 66+	bitmap.c
 67+
 68+	ssh-xmss.c
 69+	sshkey-xmss.c
 70+	xmss_commons.c
 71+	xmss_fast.c
 72+	xmss_hash.c
 73+	xmss_hash_address.c
 74+	xmss_wots.c
 75+
 76+	authfd.c authfile.c
 77+	canohost.c channels.c cipher.c cipher-aes.c cipher-aesctr.c
 78+	cleanup.c
 79+	compat.c fatal.c hostfile.c
 80+	log.c match.c moduli.c nchan.c packet.c
 81+	readpass.c ttymodes.c xmalloc.c addr.c addrmatch.c
 82+	atomicio.c dispatch.c mac.c misc.c utf8.c
 83+	monitor_fdpass.c rijndael.c ssh-ecdsa.c ssh-ecdsa-sk.c
 84+	ssh-ed25519-sk.c ssh-rsa.c dh.c
 85+	msg.c progressmeter.c dns.c entropy.c gss-genr.c umac.c umac128.c
 86+	ssh-pkcs11.c smult_curve25519_ref.c
 87+	poly1305.c chacha.c cipher-chachapoly.c cipher-chachapoly-bearssl.c
 88+	ssh-ed25519.c digest-bearssl.c digest-libc.c
 89+	hmac.c sc25519.c ge25519.c fe25519.c ed25519.c verify.c hash.c
 90+	kex.c kexdh.c kexgex.c kexecdh.c kexc25519.c
 91+	kexgexc.c kexgexs.c
 92+	kexsntrup761x25519.c sntrup761.c kexgen.c
 93+	sftp-realpath.c platform-pledge.c platform-tracing.c platform-misc.c
 94+	sshbuf-io.c
 95+
 96+	ssh-sk-client.c
 97+
 98+	sftp-common.c sftp-client.c sftp-glob.c sftp-server.c
 99+
100+	libopenbsd-compat.a
101+	$builddir/pkg/bearssl/libbearssl.a
102+	$builddir/pkg/libfido2/libfido2.a.d
103+	$builddir/pkg/zlib/libz.a
104+]])
105+
106+exe('ssh', [[
107+	ssh.c readconf.c clientloop.c sshtty.c
108+	sshconnect.c sshconnect2.c mux.c
109+	libssh.a.d
110+]])
111+file('bin/ssh', '755', '$outdir/ssh')
112+
113+exe('sshd', [[
114+	sshd.c auth-rhosts.c auth-passwd.c
115+	audit.c audit-bsm.c audit-linux.c platform.c
116+	sshpty.c sshlogin.c servconf.c serverloop.c
117+	auth.c auth2.c auth-options.c session.c
118+	auth2-chall.c groupaccess.c
119+	auth-bsdauth.c auth2-hostbased.c auth2-kbdint.c
120+	auth2-none.c auth2-passwd.c auth2-pubkey.c
121+	monitor.c monitor_wrap.c auth-krb5.c
122+	auth2-gss.c gss-serv.c gss-serv-krb5.c
123+	loginrec.c auth-pam.c auth-shadow.c auth-sia.c
124+	srclimit.c
125+	sandbox-null.c sandbox-rlimit.c sandbox-systrace.c sandbox-darwin.c
126+	sandbox-seccomp-filter.c sandbox-capsicum.c sandbox-pledge.c
127+	sandbox-solaris.c uidswap.c
128+	libssh.a.d
129+]])
130+file('bin/sshd', '755', '$outdir/sshd')
131+
132+exe('scp', {'scp.c', 'libssh.a.d'})
133+file('bin/scp', '755', '$outdir/scp')
134+
135+exe('ssh-add', {'ssh-add.c', 'libssh.a.d'})
136+file('bin/ssh-add', '755', '$outdir/ssh-add')
137+
138+exe('ssh-agent', {'ssh-agent.c', 'ssh-pkcs11-client.c', 'libssh.a.d'})
139+file('bin/ssh-agent', '755', '$outdir/ssh-agent')
140+
141+exe('ssh-keygen', {'ssh-keygen.c', 'sshsig.c', 'libssh.a.d'})
142+file('bin/ssh-keygen', '755', '$outdir/ssh-keygen')
143+
144+exe('ssh-keyscan', {'ssh-keyscan.c', 'libssh.a.d'})
145+file('bin/ssh-keyscan', '755', '$outdir/ssh-keyscan')
146+
147+exe('ssh-sk-helper', {'ssh-sk-helper.c', 'ssh-sk.c', 'sk-usbhid.c', 'libssh.a.d'})
148+file('libexec/ssh-sk-helper', '755', '$outdir/ssh-sk-helper')
149+
150+exe('sftp-server', {'sftp-server-main.c', 'libssh.a.d'})
151+file('libexec/sftp-server', '755', '$outdir/sftp-server')
152+
153+exe('sftp', {'sftp.c', 'libssh.a.d'})
154+file('bin/sftp', '755', '$outdir/sftp')
155+
156+man{
157+	'ssh.1',
158+	'scp.1',
159+	'ssh-add.1',
160+	'ssh-agent.1',
161+	'ssh-keygen.1',
162+	'ssh-keyscan.1',
163+	'ssh_config.5',
164+	'sshd_config.5',
165+	'sshd.8',
166+	'sftp-server.8',
167+	'sftp.1',
168+}
169+
170+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 2f0c259bb7159c98dd183a6b607b57fb59757aec
+1, -0
1@@ -0,0 +1 @@
2+9.0p1 r0
+18, -0
 1@@ -0,0 +1,18 @@
 2+cflags{
 3+	'-Wall', '-Wextra', '-Wno-clobbered', '-Wno-stringop-overflow',
 4+	'-D NOZOPFLI',
 5+	'-isystem $builddir/pkg/zlib/include',
 6+}
 7+
 8+exe('pigz', [[
 9+	pigz.c yarn.c try.c
10+	$builddir/pkg/zlib/libz.a
11+]], {'pkg/zlib/headers'})
12+file('bin/pigz', '755', '$outdir/pigz')
13+man{'pigz.1'}
14+for _, alias in ipairs{'gzip', 'gunzip', 'zcat'} do
15+	sym('bin/'..alias, 'pigz')
16+	sym('share/man/man1/'..alias..'.1.gz', 'pigz.1.gz')
17+end
18+
19+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit fe4894f57739e3039a2ffc2a2a360d35e19bacbe
+1, -0
1@@ -0,0 +1 @@
2+2.8 r0
+31, -0
 1@@ -0,0 +1,31 @@
 2+cflags{
 3+	'-Wpedantic',
 4+	'-D PREFIX=',
 5+}
 6+
 7+exe('rc', {
 8+	'code.c',
 9+	'exec.c',
10+	'getflags.c',
11+	'glob.c',
12+	'here.c',
13+	'io.c',
14+	'lex.c',
15+	'pcmd.c',
16+	'pfnc.c',
17+	'simple.c',
18+	'subr.c',
19+	'trap.c',
20+	'tree.c',
21+	'var.c',
22+	'y.tab.c',
23+	'unix.c',
24+	'havefork.c',
25+	'prompt-null.c',
26+})
27+file('bin/rc', '755', '$outdir/rc')
28+man{'rc.1'}
29+
30+file('lib/rcmain', '644', '$srcdir/rcmain.unix')
31+
32+fetch 'git'
+242, -0
  1@@ -0,0 +1,242 @@
  2+From 8d15541e85b391c1cd86907089d33f70d7ca0f65 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Mon, 4 Nov 2019 20:50:08 -0800
  5+Subject: [PATCH] Avoid multiple definitions of global variables
  6+
  7+---
  8+ exec.c   |  9 ++++++++-
  9+ exec.h   | 12 ++++++------
 10+ io.c     |  1 +
 11+ io.h     |  2 +-
 12+ lex.c    |  3 +++
 13+ rc.h     | 30 +++++++++++++++---------------
 14+ simple.c |  2 ++
 15+ subr.c   |  1 +
 16+ var.c    |  1 +
 17+ 9 files changed, 38 insertions(+), 23 deletions(-)
 18+
 19+diff --git a/exec.c b/exec.c
 20+index 3ad8a0d..268f429 100644
 21+--- a/exec.c
 22++++ b/exec.c
 23+@@ -3,10 +3,17 @@
 24+ #include "exec.h"
 25+ #include "io.h"
 26+ #include "fns.h"
 27++int mypid;
 28++thread *runq;
 29++code *codebuf;
 30++int ntrap;
 31++int trap[NSIG];
 32++int eflagok;
 33++
 34+ /*
 35+  * Start executing the given code at the given pc with the given redirection
 36+  */
 37+-char *argv0="rc";
 38++char *argv0 = "rc";
 39+ 
 40+ void
 41+ start(code *c, int pc, var *local)
 42+diff --git a/exec.h b/exec.h
 43+index 06d2991..ab0bfb4 100644
 44+--- a/exec.h
 45++++ b/exec.h
 46+@@ -56,18 +56,18 @@ struct thread{
 47+ 	tree *treenodes;		/* tree nodes created by this process */
 48+ 	thread *ret;		/* who continues when this finishes */
 49+ };
 50+-thread *runq;
 51++extern thread *runq;
 52+ code *codecopy(code*);
 53+-code *codebuf;				/* compiler output */
 54+-int ntrap;				/* number of outstanding traps */
 55+-int trap[NSIG];				/* number of outstanding traps per type */
 56++extern code *codebuf;			/* compiler output */
 57++extern int ntrap;			/* number of outstanding traps */
 58++extern int trap[NSIG];			/* number of outstanding traps per type */
 59+ struct builtin{
 60+ 	char *name;
 61+ 	void (*fnc)(void);
 62+ };
 63+ extern struct builtin Builtin[];
 64+-int eflagok;			/* kludge flag so that -e doesn't exit in startup */
 65+-int havefork;
 66++extern int eflagok;			/* kludge flag so that -e doesn't exit in startup */
 67++extern int havefork;
 68+ 
 69+ void execcd(void), execwhatis(void), execeval(void), execexec(void);
 70+ int execforkexec(void);
 71+diff --git a/io.c b/io.c
 72+index bb8af4a..228ec56 100644
 73+--- a/io.c
 74++++ b/io.c
 75+@@ -3,6 +3,7 @@
 76+ #include "exec.h"
 77+ #include "io.h"
 78+ #include "fns.h"
 79++io *err;
 80+ int pfmtnest = 0;
 81+ 
 82+ void
 83+diff --git a/io.h b/io.h
 84+index 21cc6b8..68b9e89 100644
 85+--- a/io.h
 86++++ b/io.h
 87+@@ -10,7 +10,7 @@ struct io{
 88+ 	int fd;
 89+ 	char *bufp, *ebuf, *strp, buf[NBUF];
 90+ };
 91+-io *err;
 92++extern io *err;
 93+ io *openfd(int), *openstr(void), *opencore(char *, int);
 94+ int emptybuf(io*);
 95+ void pchr(io*, int);
 96+diff --git a/lex.c b/lex.c
 97+index d2bef32..943112a 100644
 98+--- a/lex.c
 99++++ b/lex.c
100+@@ -22,6 +22,7 @@ idchr(int c)
101+ 	return c>' ' && !strchr("!\"#$%&'()+,-./:;<=>?@[\\]^`{|}~", c);
102+ }
103+ int future = EOF;
104++char *promptstr;
105+ int doprompt = 1;
106+ int inquote;
107+ int incomm;
108+@@ -36,6 +37,7 @@ nextc(void)
109+ 		future = getnext();
110+ 	return future;
111+ }
112++int lastc;
113+ /*
114+  * Consume the lookahead character.
115+  */
116+@@ -131,6 +133,7 @@ nextis(int c)
117+ 	}
118+ 	return 0;
119+ }
120++char tok[NTOK];
121+ 
122+ char*
123+ addtok(char *p, int val)
124+diff --git a/rc.h b/rc.h
125+index 8a6a5bb..cbec275 100644
126+--- a/rc.h
127++++ b/rc.h
128+@@ -53,7 +53,7 @@ tree *mung1(tree*, tree*), *mung2(tree*, tree*, tree*);
129+ tree *mung3(tree*, tree*, tree*, tree*), *epimung(tree*, tree*);
130+ tree *simplemung(tree*), *heredoc(tree*);
131+ void freetree(tree*);
132+-tree *cmdtree;
133++extern tree *cmdtree;
134+ /*
135+  * The first word of any code vector is a reference count.
136+  * Always create a new reference to a code vector by calling codecopy(.).
137+@@ -64,10 +64,10 @@ union code{
138+ 	int i;
139+ 	char *s;
140+ };
141+-char *promptstr;
142+-int doprompt;
143++extern char *promptstr;
144++extern int doprompt;
145+ #define	NTOK	8192
146+-char tok[NTOK];
147++extern char tok[NTOK];
148+ #define	APPEND	1
149+ #define	WRITE	2
150+ #define	READ	3
151+@@ -87,7 +87,7 @@ struct var{
152+ };
153+ var *vlook(char*), *gvlook(char*), *newvar(char*, var*);
154+ #define	NVAR	521
155+-var *gvar[NVAR];				/* hash for globals */
156++extern var *gvar[NVAR];				/* hash for globals */
157+ #define	new(type)	((type *)emalloc(sizeof(type)))
158+ void *emalloc(long);
159+ void *Malloc(ulong);
160+@@ -98,7 +98,7 @@ struct here{
161+ 	char *name;
162+ 	struct here *next;
163+ };
164+-int mypid;
165++extern int mypid;
166+ /*
167+  * Glob character escape in strings:
168+  *	In a string, GLOB must be followed by *?[ or GLOB.
169+@@ -117,10 +117,10 @@ int mypid;
170+ #define	threebyte(c)	((c&0xf0)==0xe0)
171+ #define	fourbyte(c)	((c&0xf8)==0xf0)
172+ 
173+-char **argp;
174+-char **args;
175+-int nerror;		/* number of errors encountered during compilation */
176+-int doprompt;		/* is it time for a prompt? */
177++extern char **argp;
178++extern char **args;
179++extern int nerror;	/* number of errors encountered during compilation */
180++extern int doprompt;	/* is it time for a prompt? */
181+ /*
182+  * Which fds are the reading/writing end of a pipe?
183+  * Unfortunately, this can vary from system to system.
184+@@ -129,14 +129,14 @@ int doprompt;		/* is it time for a prompt? */
185+  */
186+ #define	PRD	0
187+ #define	PWR	1
188+-char *Rcmain, *Fdprefix;
189++extern char *Rcmain, *Fdprefix;
190+ #define	register
191+ /*
192+  * How many dot commands have we executed?
193+  * Used to ensure that -v flag doesn't print rcmain.
194+  */
195+-int ndot;
196++extern int ndot;
197+ char *getstatus(void);
198+-int lastc;
199+-int lastword;
200+-int kidpid;
201++extern int lastc;
202++extern int lastword;
203++extern int kidpid;
204+diff --git a/simple.c b/simple.c
205+index d587227..7f1ee12 100644
206+--- a/simple.c
207++++ b/simple.c
208+@@ -6,6 +6,8 @@
209+ #include "exec.h"
210+ #include "io.h"
211+ #include "fns.h"
212++int ndot;
213++
214+ /*
215+  * Search through the following code to see if we're just going to exit.
216+  */
217+diff --git a/subr.c b/subr.c
218+index a2d8a18..f031be5 100644
219+--- a/subr.c
220++++ b/subr.c
221+@@ -23,6 +23,7 @@ efree(void *p)
222+ 	else pfmt(err, "free 0\n");
223+ }
224+ extern int lastword, lastdol;
225++int nerror;
226+ 
227+ void
228+ yyerror(char *m)
229+diff --git a/var.c b/var.c
230+index 2564ba2..b4a3ef5 100644
231+--- a/var.c
232++++ b/var.c
233+@@ -1,6 +1,7 @@
234+ #include "rc.h"
235+ #include "exec.h"
236+ #include "fns.h"
237++var *gvar[NVAR];
238+ 
239+ int
240+ hash(char *s, int n)
241+-- 
242+2.24.0
243+
+28, -0
 1@@ -0,0 +1,28 @@
 2+From 56359f53946306347ef9bb1f8f3c402adb8f8a5b Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 4 Nov 2019 20:59:30 -0800
 5+Subject: [PATCH] Use /proc/self/fd/0 instead of /dev/fd/0
 6+
 7+---
 8+ rcmain.unix | 4 ++--
 9+ 1 file changed, 2 insertions(+), 2 deletions(-)
10+
11+diff --git a/rcmain.unix b/rcmain.unix
12+index 42b3be4..1b5d6d2 100644
13+--- a/rcmain.unix
14++++ b/rcmain.unix
15+@@ -25,9 +25,9 @@ if not if(flag i){
16+ 	if(flag l && test -r $profile) . $profile
17+ 	status=''
18+ 	if(! ~ $#* 0) . $*
19+-	. -i /dev/fd/0
20++	. -i /proc/self/fd/0
21+ }
22+-if not if(~ $#* 0) . /dev/fd/0
23++if not if(~ $#* 0) . /proc/self/fd/0
24+ if not{
25+ 	status=''
26+ 	. $*
27+-- 
28+2.24.0
29+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 50b729e65d6f250ab9ab72487bd3c3d7c674e1fc
+1, -0
1@@ -0,0 +1 @@
2+50b729e65d r0
+20, -0
 1@@ -0,0 +1,20 @@
 2+cflags{'-std=c99', '-Wall', '-Wextra', '-Wpedantic', '-Wno-unused-parameter'}
 3+
 4+exe('samu', {
 5+	'build.c',
 6+	'deps.c',
 7+	'env.c',
 8+	'graph.c',
 9+	'htab.c',
10+	'log.c',
11+	'parse.c',
12+	'samu.c',
13+	'scan.c',
14+	'tool.c',
15+	'tree.c',
16+	'util.c',
17+})
18+file('bin/samu', '755', '$outdir/samu')
19+man{'samu.1'}
20+
21+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 217059f21e2d1f016f7ba044b36d12de95788cf3
+1, -0
1@@ -0,0 +1 @@
2+1.2-32-g217059f21e r0
+2, -0
1@@ -0,0 +1,2 @@
2+#!/bin/rc
3+exec grep -E $*
+192, -0
  1@@ -0,0 +1,192 @@
  2+cflags{
  3+	'-std=c99', '-Wall', '-Wpedantic', '-Wno-maybe-uninitialized',
  4+	'-D _DEFAULT_SOURCE',
  5+	'-D _BSD_SOURCE',
  6+	'-D _XOPEN_SOURCE=700',
  7+	'-I $outdir',
  8+}
  9+
 10+lib('libutil.a', [[libutil/(
 11+	concat.c
 12+	cp.c
 13+	crypt.c
 14+	ealloc.c
 15+	enmasse.c
 16+	eprintf.c
 17+	eregcomp.c
 18+	estrtod.c
 19+	fnck.c
 20+	fshut.c
 21+	getlines.c
 22+	human.c
 23+	linecmp.c
 24+	md5.c
 25+	memmem.c
 26+	mkdirp.c
 27+	mode.c
 28+	parseoffset.c
 29+	putword.c
 30+	reallocarray.c
 31+	recurse.c
 32+	rm.c
 33+	sha1.c
 34+	sha224.c
 35+	sha256.c
 36+	sha384.c
 37+	sha512.c
 38+	sha512-224.c
 39+	sha512-256.c
 40+	strcasestr.c
 41+	strlcat.c
 42+	strlcpy.c
 43+	strsep.c
 44+	strtonum.c
 45+	unescape.c
 46+	writeall.c
 47+)]])
 48+lib('libutf.a', [[libutf/(
 49+	fgetrune.c
 50+	fputrune.c
 51+	isalnumrune.c
 52+	isalpharune.c
 53+	isblankrune.c
 54+	iscntrlrune.c
 55+	isdigitrune.c
 56+	isgraphrune.c
 57+	isprintrune.c
 58+	ispunctrune.c
 59+	isspacerune.c
 60+	istitlerune.c
 61+	isxdigitrune.c
 62+	lowerrune.c
 63+	rune.c
 64+	runetype.c
 65+	upperrune.c
 66+	utf.c
 67+	utftorunestr.c
 68+)]])
 69+
 70+rule('getconf', '$srcdir/getconf.sh >$out')
 71+build('getconf', '$outdir/getconf.h', {'|', '$srcdir/getconf.sh'})
 72+
 73+local cmds = {
 74+	'basename',
 75+	'cal',
 76+	'cat',
 77+	'chgrp',
 78+	'chmod',
 79+	'chown',
 80+	'chroot',
 81+	'cksum',
 82+	'cmp',
 83+	'cols',
 84+	'comm',
 85+	'cp',
 86+	'cron',
 87+	'cut',
 88+	'date',
 89+	'dd',
 90+	'dirname',
 91+	'du',
 92+	'echo',
 93+	'ed',
 94+	'env',
 95+	'expand',
 96+	'expr',
 97+	'false',
 98+	'find',
 99+	'flock',
100+	'fold',
101+	'getconf',
102+	'grep',
103+	'head',
104+	'hostname',
105+	'install',
106+	'join',
107+	'kill',
108+	'link',
109+	'ln',
110+	'logger',
111+	'logname',
112+	'ls',
113+	'md5sum',
114+	'mkdir',
115+	'mkfifo',
116+	'mknod',
117+	'mktemp',
118+	'mv',
119+	'nice',
120+	'nl',
121+	'nohup',
122+	'od',
123+	'paste',
124+	'pathchk',
125+	'printenv',
126+	'printf',
127+	'pwd',
128+	'readlink',
129+	'renice',
130+	'rev',
131+	'rm',
132+	'rmdir',
133+	'sed',
134+	'seq',
135+	'setsid',
136+	'sha1sum',
137+	'sha224sum',
138+	'sha256sum',
139+	'sha384sum',
140+	'sha512-224sum',
141+	'sha512-256sum',
142+	'sha512sum',
143+	'sleep',
144+	'sort',
145+	'split',
146+	'sponge',
147+	-- use strings from binutils
148+	'sync',
149+	'tail',
150+	-- use tar from OpenBSD
151+	'tee',
152+	'test',
153+	'tftp',
154+	'time',
155+	'touch',
156+	'tr',
157+	'true',
158+	'tsort',
159+	'tty',
160+	'uname',
161+	'unexpand',
162+	'uniq',
163+	'unlink',
164+	'uudecode',
165+	'uuencode',
166+	'wc',
167+	'which',
168+	'whoami',
169+	'xargs',
170+	'yes',
171+}
172+for _, cmd in ipairs(cmds) do
173+	local src = cmd
174+	if src == 'install' then
175+		src = 'xinstall'
176+	end
177+	local deps
178+	if cmd == 'getconf' then
179+		deps = {'$outdir/getconf.h'}
180+	end
181+	file('bin/'..cmd, '755', exe(cmd, {src..'.c', 'libutil.a', 'libutf.a'}, deps))
182+	local out = '$outdir/'..cmd..'.1.gz'
183+	build('gzip', out, '$srcdir/'..src..'.1')
184+	file('share/man/man1/'..cmd..'.1.gz', '644', out)
185+end
186+
187+sym('bin/[', 'test')
188+
189+-- TODO: binutils'  config/lib-ld.m4 should use AC_REQUIRE([AC_PROG_EGREP]) and
190+-- $EGREP instead of egrep.
191+file('bin/egrep', '755', '$dir/egrep')
192+
193+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 1b46d26362a6fcc525c1ea01ce49907ccb74f8c9
+1, -0
1@@ -0,0 +1 @@
2+1b46d26362 r0
+10, -0
 1@@ -0,0 +1,10 @@
 2+cflags{
 3+	'-std=c99', '-Wall', '-Wextra', '-Wpedantic',
 4+	'-D _BSD_SOURCE',
 5+}
 6+
 7+exe('sdhcp', {'sdhcp.c', 'util/eprintf.c'})
 8+file('bin/sdhcp', '755', '$outdir/sdhcp')
 9+man{'sdhcp.1'}
10+
11+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 5f9956c8706215f8b8887c0beb77ed7d1810ec7a
+1, -0
1@@ -0,0 +1 @@
2+5f9956c870 r0
+443, -0
  1@@ -0,0 +1,443 @@
  2+/*
  3+See LICENSE file for copyright and license details.
  4+
  5+This program is meant to be run by a git hook to fix the permissions of files
  6+based on a .perms file in the repository
  7+
  8+It can also be run with the -d flag on any directory containing .perms in order
  9+to apply the permissions specified by that file.
 10+
 11+Security considerations:
 12+If the repository previously contained a world or group readable directory which
 13+has become secret, the names of the new files in that directory will become
 14+temporarily visible because git checks out the files before this program is run.
 15+*/
 16+#define _POSIX_C_SOURCE 200809L
 17+#include <errno.h>
 18+#include <fcntl.h>
 19+#include <libgen.h>
 20+#include <spawn.h>
 21+#include <stdarg.h>
 22+#include <stdbool.h>
 23+#include <stdio.h>
 24+#include <stdlib.h>
 25+#include <stdnoreturn.h>
 26+#include <string.h>
 27+#include <sys/stat.h>
 28+#include <sys/wait.h>
 29+#include <unistd.h>
 30+
 31+#define PERMS_FILE ".perms"
 32+
 33+struct perm {
 34+	char *name;
 35+	mode_t mode;
 36+	bool attempted;  /* whether we attempted to set permissions for this file */
 37+	bool delete;     /* marked for directories that only appear in old .perms */
 38+};
 39+
 40+struct special {
 41+	struct perm *perms;
 42+	int len;
 43+};
 44+
 45+extern char **environ;
 46+
 47+static char *prog;
 48+static dev_t rootdev;
 49+static int rootfd = AT_FDCWD;
 50+static struct special oldsp, newsp;
 51+static int status;
 52+
 53+static void
 54+verror(char *fmt, va_list ap)
 55+{
 56+	status = 1;
 57+	vfprintf(stderr, fmt, ap);
 58+	if (fmt[0] && fmt[strlen(fmt)-1] == ':')
 59+		fprintf(stderr, " %s", strerror(errno));
 60+	fputc('\n', stderr);
 61+}
 62+
 63+static void
 64+error(char *fmt, ...)
 65+{
 66+	va_list ap;
 67+
 68+	va_start(ap, fmt);
 69+	verror(fmt, ap);
 70+	va_end(ap);
 71+}
 72+
 73+static noreturn void
 74+die(char *fmt, ...)
 75+{
 76+	va_list ap;
 77+
 78+	va_start(ap, fmt);
 79+	verror(fmt, ap);
 80+	va_end(ap);
 81+
 82+	exit(1);
 83+}
 84+
 85+static FILE *
 86+spawn(char **argv, pid_t *pid)
 87+{
 88+	FILE *f;
 89+	int fd[2];
 90+	posix_spawn_file_actions_t actions;
 91+
 92+	if (pipe(fd) < 0)
 93+		die("pipe:");
 94+	f = fdopen(fd[0], "r");
 95+	if (!f)
 96+		die("fdopen:");
 97+	if ((errno = posix_spawn_file_actions_init(&actions)) > 0)
 98+		die("posix_spawn_file_actions_init:");
 99+	if ((errno = posix_spawn_file_actions_addclose(&actions, fd[0])) > 0)
100+		die("posix_spawn_file_actions_adddup2:");
101+	if ((errno = posix_spawn_file_actions_adddup2(&actions, fd[1], 1)) > 0)
102+		die("posix_spawn_file_actions_adddup2:");
103+	if ((errno = posix_spawnp(pid, argv[0], &actions, NULL, argv, environ)) > 0)
104+		die("posix_spawnp %s:", argv[0]);
105+	posix_spawn_file_actions_destroy(&actions);
106+	close(fd[1]);
107+
108+	return f;
109+}
110+
111+static void
112+readspecial(struct special *sp, FILE *f)
113+{
114+	char *line = NULL, *s, *mode;
115+	size_t size = 0;
116+	ssize_t n;
117+
118+	while ((n = getline(&line, &size, f)) >= 0) {
119+		if (line[n-1] == '\n')
120+			line[--n] = '\0';
121+		mode = s = line;
122+		s = strchr(s, ' ');
123+		if (!s || s == mode)
124+			die("malformed permissions file: %s", PERMS_FILE);
125+		*s++ = '\0';
126+		sp->perms = realloc(sp->perms, (sp->len + 1) * sizeof(*sp->perms));
127+		if (!sp->perms)
128+			die("realloc:");
129+		sp->perms[sp->len] = (struct perm){
130+			.name = strdup(s),
131+			.mode = strtoul(mode, &s, 8),
132+		};
133+		if (!sp->perms[sp->len].name)
134+			die("strdup:");
135+		if (*s)
136+			die("invalid mode: %s", mode);
137+		++sp->len;
138+	}
139+}
140+
141+static void
142+gitspecial(struct special *sp, const char *rev)
143+{
144+	char object[41 + sizeof(PERMS_FILE)];
145+	char *argv[] = {"git", "show", object, 0};
146+	FILE *f;
147+	pid_t pid;
148+	int st, n;
149+
150+	n = snprintf(object, sizeof(object), "%s:%s", rev, PERMS_FILE);
151+	if (n < 0 || n >= (int)sizeof(object))
152+		die("revision is too large: %s", rev);
153+	f = spawn(argv, &pid);
154+	readspecial(sp, f);
155+	fclose(f);
156+
157+	if (waitpid(pid, &st, 0) < 0)
158+		die("waitpid:");
159+	if (!(WIFEXITED(st) && WEXITSTATUS(st) == 0))
160+		die("child process failed");
161+}
162+
163+static int
164+chmod_v(const char *path, mode_t mode)
165+{
166+	printf("chmod(\"%s\", %#o)\n", path, mode);
167+	return fchmodat(rootfd, path, mode, 0);
168+}
169+
170+static int
171+mkdir_v(const char *path, mode_t mode)
172+{
173+	printf("mkdir(\"%s\", %#o)\n", path, mode);
174+	return mkdirat(rootfd, path, mode);
175+}
176+
177+static int
178+rmdir_v(const char *path)
179+{
180+	printf("rmdir(\"%s\")\n", path);
181+	return unlinkat(rootfd, path, AT_REMOVEDIR);
182+}
183+
184+static int
185+defperm(const char *name)
186+{
187+	struct stat st;
188+	mode_t mode;
189+
190+	if (fstatat(rootfd, name, &st, AT_SYMLINK_NOFOLLOW) < 0)
191+		return -1;
192+	if (st.st_dev != rootdev) {
193+		errno = EXDEV;
194+		return -1;
195+	}
196+	switch (st.st_mode & S_IFMT) {
197+	case S_IFREG:
198+		mode = st.st_mode & S_IXUSR ? 0755 : 0644;
199+		break;
200+	case S_IFDIR:
201+		mode = 0755;
202+		break;
203+	case S_IFLNK:
204+		return 0;
205+	default:
206+		errno = EINVAL;
207+		return -1;
208+	}
209+	if ((st.st_mode & ~S_IFMT) == mode)
210+		return 0;
211+	return chmod_v(name, mode);
212+}
213+
214+static int
215+specialperm(struct perm *p)
216+{
217+	struct stat st;
218+
219+	if (p->attempted)
220+		return 0;
221+	p->attempted = true;
222+	if (fstatat(rootfd, p->name, &st, AT_SYMLINK_NOFOLLOW) < 0) {
223+		if (errno != ENOENT || !S_ISDIR(p->mode))
224+			return -1;
225+		return mkdir_v(p->name, p->mode & ~S_IFMT);
226+	}
227+	if (st.st_dev != rootdev) {
228+		errno = EXDEV;
229+		return -1;
230+	}
231+	if (st.st_mode == p->mode)
232+		return 0;
233+	if ((st.st_mode & S_IFMT) != (p->mode & S_IFMT)) {
234+		errno = EINVAL;
235+		return -1;
236+	}
237+	return chmod_v(p->name, p->mode & ~S_IFMT);
238+}
239+
240+static void
241+specialperms(void)
242+{
243+	int i = 0, j = 0, n;
244+
245+	while (i < oldsp.len || j < newsp.len) {
246+		if (i == oldsp.len)
247+			n = 1;
248+		else if (j == newsp.len)
249+			n = -1;
250+		else
251+			n = strcmp(oldsp.perms[i].name, newsp.perms[j].name);
252+		if (n >= 0) {
253+			if (specialperm(&newsp.perms[j]) < 0 && errno != EXDEV)
254+				error("specialperm:");
255+			++j;
256+			if (n == 0)
257+				++i;
258+			continue;
259+		}
260+		if ((oldsp.perms[i].mode & S_IFMT) == S_IFDIR) {
261+			oldsp.perms[i].delete = true;
262+		} else if (defperm(oldsp.perms[i].name) < 0) {
263+			switch (errno) {
264+			case ENOENT:
265+			case EXDEV:
266+				break;
267+			default:
268+				error("defperm:");
269+			}
270+		}
271+		++i;
272+	}
273+	/* delete directories in reverse order */
274+	while (i > 0) {
275+		--i;
276+		if (oldsp.perms[i].delete && rmdir_v(oldsp.perms[i].name) < 0) {
277+			switch (errno) {
278+			case ENOENT:
279+			case ENOTEMPTY:
280+				break;
281+			default:
282+				error("rmdir:");
283+			}
284+		}
285+	}
286+}
287+
288+static int
289+setperm(const char *name)
290+{
291+	int i;
292+
293+	for (i = 0; i < newsp.len; ++i) {
294+		if (strcmp(name, newsp.perms[i].name) == 0)
295+			return specialperm(&newsp.perms[i]);
296+	}
297+	return defperm(name);
298+}
299+
300+static void
301+setroot(const char *root)
302+{
303+	struct stat st;
304+
305+	rootfd = open(root, O_RDONLY);
306+	if (rootfd < 0)
307+		die("open %s:", root);
308+	if (fstat(rootfd, &st) < 0)
309+		die("fstat:", root);
310+	rootdev = st.st_dev;
311+}
312+
313+static void
314+gitupdate(char *old, char *new)
315+{
316+	char *argv_diff[] = {"git", "diff", "--name-only", "-z", old, new, 0};
317+	char *argv_new[] = {"git", "ls-tree", "--name-only", "--full-tree", "-z", "-r", new, 0};
318+	FILE *f;
319+	pid_t pid;
320+	struct {
321+		char *buf;
322+		size_t size;
323+	} lines[2] = {0};
324+	ssize_t n;
325+	int cur = 0, st;
326+	char *root, *path, *diff, *s;
327+
328+	root = getenv("GIT_WORK_TREE");
329+	setroot(root ? root : ".");
330+	if (old)
331+		gitspecial(&oldsp, old);
332+	gitspecial(&newsp, new);
333+
334+	f = spawn(old ? argv_diff : argv_new, &pid);
335+	umask(0);
336+	while ((n = getdelim(&lines[cur].buf, &lines[cur].size, '\0', f)) >= 0) {
337+		path = lines[cur].buf;
338+		if (strcmp(path, PERMS_FILE) == 0) {
339+			specialperms();
340+			continue;
341+		}
342+		if (setperm(path) < 0) switch (errno) {
343+		case ENOENT:
344+			continue;
345+		case EXDEV:
346+			break;
347+		default:
348+			error("setperm %s:", path);
349+		}
350+		/* find the first difference from the previous path */
351+		diff = path;
352+		if (lines[!cur].buf)
353+			for (s = lines[!cur].buf; *s && *s == *diff; ++s, ++diff);
354+		/* set permissions on each parent directory after that difference */
355+		for (s = path + n; s >= diff; --s) {
356+			if (*s != '/')
357+				continue;
358+			*s = '\0';
359+			if (setperm(path) < 0)
360+				error("setperm %s:", path);
361+			*s = '/';
362+		}
363+		cur = !cur;
364+	}
365+	fclose(f);
366+
367+	if (waitpid(pid, &st, 0) < 0)
368+		die("waitpid:");
369+	if (!(WIFEXITED(st) && WEXITSTATUS(st) == 0))
370+		die("child process failed");
371+}
372+
373+static void
374+applyspecial(void)
375+{
376+	int fd;
377+	FILE *f;
378+
379+	fd = openat(rootfd, ".perms", O_RDONLY);
380+	if (fd < 0)
381+		die("open .perms:");
382+	f = fdopen(fd, "r");
383+	if (!f)
384+		die("fdopen:");
385+	readspecial(&newsp, f);
386+	fclose(f);
387+	umask(0);
388+	specialperms();
389+}
390+
391+static void
392+usage(void)
393+{
394+	fprintf(stderr, "usage: %s [[old] new] | %s -d dir\n", prog, prog);
395+	exit(2);
396+}
397+
398+int
399+main(int argc, char *argv[])
400+{
401+	int dflag = 0;
402+	char *old, *new;
403+
404+	prog = basename(argv[0]);
405+	for (++argv, --argc; argc && (*argv)[0] == '-' && (*argv)[1]; ++argv, --argc) {
406+		switch ((*argv)[1]) {
407+		case 'd':
408+			if (!*++argv)
409+				usage();
410+			--argc;
411+			setroot(*argv);
412+			dflag = 1;
413+			break;
414+		default:
415+			usage();
416+		}
417+	}
418+
419+	if (dflag) {
420+		if (argc)
421+			usage();
422+		applyspecial();
423+		return status;
424+	}
425+
426+	switch (argc) {
427+	case 0:
428+		old = NULL;
429+		new = "HEAD";
430+		break;
431+	case 1:
432+		old = NULL;
433+		new = argv[0];
434+		break;
435+	case 2:
436+		old = argv[0];
437+		new = argv[1];
438+		break;
439+	default:
440+		usage();
441+	}
442+	gitupdate(old, new);
443+	return status;
444+}
+24, -0
 1@@ -0,0 +1,24 @@
 2+set('srcdir', '$dir')
 3+
 4+dir('bin', '755')
 5+sym('bin/plumb', '../etc/plumb')
 6+dir('boot', '755')
 7+dir('dev', '755')
 8+dir('etc', '755')
 9+dir('home', '755')
10+dir('mnt', '755')
11+dir('proc', '755')
12+dir('root', '700')
13+dir('run', '755')
14+dir('sys', '755')
15+dir('tmp', '755')
16+dir('var', '755')
17+dir('var/db', '755')
18+dir('var/empty', '755')
19+dir('var/log', '755')
20+sym('usr/bin', '../bin')
21+
22+gitfile('.gitignore', '644', '$dir/gitignore')
23+
24+file('libexec/applyperms', '755', exe('applyperms', {'applyperms.c'}))
25+file('libexec/mergeperms', '755', exe('mergeperms', {'mergeperms.c'}))
+11, -0
 1@@ -0,0 +1,11 @@
 2+/etc
 3+/home
 4+/mnt
 5+/proc
 6+/root
 7+/run
 8+/share/man/mandoc.db
 9+/src
10+/sys
11+/tmp
12+/var
+164, -0
  1@@ -0,0 +1,164 @@
  2+#define _POSIX_C_SOURCE 200809L
  3+#include <errno.h>
  4+#include <stdarg.h>
  5+#include <stdint.h>
  6+#include <stdio.h>
  7+#include <stdlib.h>
  8+#include <stdnoreturn.h>
  9+#include <string.h>
 10+#include <sys/stat.h>
 11+
 12+struct perm {
 13+	char *name;
 14+	mode_t mode;
 15+};
 16+
 17+static struct perm *perms;
 18+static size_t permslen, permscap;
 19+
 20+static noreturn void
 21+fatal(const char *fmt, ...)
 22+{
 23+	va_list ap;
 24+
 25+	va_start(ap, fmt);
 26+	vfprintf(stderr, fmt, ap);
 27+	va_end(ap);
 28+	if (fmt[0] && fmt[strlen(fmt) - 1] == ':') {
 29+		fputc(' ', stderr);
 30+		perror(NULL);
 31+	} else {
 32+		fputc('\n', stderr);
 33+	}
 34+	exit(1);
 35+}
 36+
 37+static void
 38+addperm(struct perm *p)
 39+{
 40+	if (permslen == permscap) {
 41+		permscap = permscap ? permscap * 2 : 64;
 42+		if (permscap > SIZE_MAX / sizeof(perms[0])) {
 43+			errno = ENOMEM;
 44+			fatal("realloc:");
 45+		}
 46+		perms = realloc(perms, permscap * sizeof(perms[0]));
 47+		if (!perms)
 48+			fatal("realloc:");
 49+	}
 50+	perms[permslen++] = *p;
 51+}
 52+
 53+static void
 54+readperm(FILE *file, struct perm *perm)
 55+{
 56+	static char *line;
 57+	static size_t size;
 58+	ssize_t n;
 59+	char *s, *mode;
 60+
 61+	n = getline(&line, &size, file);
 62+	if (n < 0) {
 63+		if (ferror(file))
 64+			fatal("getline:");
 65+		perm->name = NULL;
 66+		return;
 67+	}
 68+	if (n && line[n - 1] == '\n')
 69+		line[n - 1] = '\0';
 70+	mode = s = line;
 71+	s = strchr(s, ' ');
 72+	if (!s || s == mode)
 73+		fatal("invalid permissions file");
 74+	*s++ = '\0';
 75+	perm->name = strdup(s);
 76+	if (!perm->name)
 77+		fatal("strdup:");
 78+	perm->mode = strtoul(mode, &s, 8);
 79+	if (*s)
 80+		fatal("invalid mode '%s'", mode);
 81+}
 82+
 83+static int
 84+permcmp(struct perm *a, struct perm *b)
 85+{
 86+	return a->name ? b->name ? strcmp(a->name, b->name) : -1 : !!b->name;
 87+}
 88+
 89+static noreturn void
 90+usage(void)
 91+{
 92+	fprintf(stderr, "usage: mergeperms old cur new\n");
 93+	exit(2);
 94+}
 95+
 96+int
 97+main(int argc, char *argv[])
 98+{
 99+	FILE *oldf, *curf, *newf;
100+	struct perm old, cur, new;
101+	int ij, ik, jk;
102+	int ret;
103+
104+	if (argc != 4)
105+		usage();
106+
107+	ret = 0;
108+	oldf = fopen(argv[1], "r");
109+	if (!oldf)
110+		fatal("open %s:", argv[1]);
111+	curf = fopen(argv[2], "r");
112+	if (!curf)
113+		fatal("open %s:", argv[2]);
114+	newf = fopen(argv[3], "r");
115+	if (!newf)
116+		fatal("open %s:", argv[3]);
117+
118+	readperm(oldf, &old);
119+	readperm(curf, &cur);
120+	readperm(newf, &new);
121+	for (;;) {
122+		ij = permcmp(&old, &cur);
123+		ik = permcmp(&old, &new);
124+		if (ij < 0 && ik < 0 && old.name) {
125+			readperm(oldf, &old);
126+			continue;
127+		}
128+		if (!old.name && !cur.name && !new.name)
129+			break;
130+		jk = permcmp(&cur, &new);
131+		if ((jk < 0 && ij == 0 && old.mode == cur.mode) || (jk > 0 && ik == 0 && old.mode == new.mode)) {
132+			/* deleted in cur or new and unchanged in the other */
133+		} else if (jk < 0) {
134+			if (ij == 0)
135+				ret = 3;
136+			addperm(&cur);
137+		} else if (jk > 0) {
138+			if (ik == 0)
139+				ret = 3;
140+			addperm(&new);
141+		} else if (ij == 0 && old.mode == cur.mode) {
142+			addperm(&new);
143+		} else {
144+			if (cur.mode != new.mode && (ik != 0 || old.mode != new.mode))
145+				ret = 3;
146+			addperm(&cur);
147+		}
148+		if (jk <= 0)
149+			readperm(curf, &cur);
150+		if (jk >= 0)
151+			readperm(newf, &new);
152+	}
153+
154+	fclose(curf);
155+	curf = fopen(argv[2], "w");
156+	if (!curf)
157+		fatal("open %s:", argv[1]);
158+	for (; permslen > 0; --permslen, ++perms)
159+		fprintf(curf, "%#o %s\n", perms->mode, perms->name);
160+	fflush(curf);
161+	if (ferror(curf))
162+		fatal("write error");
163+
164+	return ret;
165+}
+3, -0
1@@ -0,0 +1,3 @@
2+/src
3+/strace-6.4.tar.xz
4+/tools.ninja
+6, -0
1@@ -0,0 +1,6 @@
2+# strace
3+
4+## config.h
5+Generated with
6+
7+	./configure --disable-mpers
+489, -0
  1@@ -0,0 +1,489 @@
  2+/* #undef AARCH64 */
  3+/* #undef AC_APPLE_UNIVERSAL_BUILD */
  4+/* #undef ALPHA */
  5+/* #undef ARC */
  6+/* #undef ARM */
  7+#define ASM_SA_RESTORER 0x04000000
  8+#define ASM_SIGRTMIN 32
  9+/* #undef AVR32 */
 10+/* #undef BFIN */
 11+#define COPYRIGHT_YEAR "2023"
 12+/* #undef CSKY */
 13+#define ENABLE_ARM_OABI 0
 14+/* #undef ENABLE_SECONTEXT */
 15+/* #undef ENABLE_STACKTRACE */
 16+#define HAVE_ACCEPT4 1
 17+/* #undef HAVE_ASM_CACHECTL_H */
 18+/* #undef HAVE_ASM_GUARDED_STORAGE_H */
 19+/* #undef HAVE_ASM_SIGCONTEXT_H */
 20+/* #undef HAVE_ASM_SYSMIPS_H */
 21+/* #undef HAVE_BE64TOH */
 22+/* #undef HAVE_BLUETOOTH_BLUETOOTH_H */
 23+#define HAVE_DECL_IEEE802154_ADDR_LONG 0
 24+#define HAVE_DECL_IEEE802154_ADDR_NONE 0
 25+#define HAVE_DECL_IEEE802154_ADDR_SHORT 0
 26+#define HAVE_DECL_LO_FLAGS_AUTOCLEAR 1
 27+#define HAVE_DECL_LO_FLAGS_DIRECT_IO 1
 28+#define HAVE_DECL_LO_FLAGS_PARTSCAN 1
 29+#define HAVE_DECL_LO_FLAGS_READ_ONLY 1
 30+#define HAVE_DECL_LO_FLAGS_USE_AOPS 0
 31+#define HAVE_DECL_NFEA_ACTIVITY_NOTIFY 0
 32+#define HAVE_DECL_NFEA_DONT_REFRESH 0
 33+#define HAVE_DECL_NFEA_UNSPEC 0
 34+#define HAVE_DECL_PTP_PF_EXTTS 0
 35+#define HAVE_DECL_PTP_PF_NONE 0
 36+#define HAVE_DECL_PTP_PF_PEROUT 0
 37+#define HAVE_DECL_PTP_PF_PHYSYNC 0
 38+#define HAVE_DECL_PTRACE_PEEKUSER 1
 39+#define HAVE_DECL_PTRACE_POKEUSER 1
 40+#define HAVE_DECL_P_ALL 1
 41+#define HAVE_DECL_P_PGID 1
 42+#define HAVE_DECL_P_PID 1
 43+#define HAVE_DECL_P_PIDFD 1
 44+#define HAVE_DECL_SYS_ERRLIST 0
 45+#define HAVE_DECL_TCA_ACT_COOKIE 1
 46+#define HAVE_DECL_TCA_ACT_FLAGS 1
 47+#define HAVE_DECL_TCA_ACT_HW_STATS 1
 48+#define HAVE_DECL_TCA_ACT_INDEX 1
 49+#define HAVE_DECL_TCA_ACT_IN_HW_COUNT 1
 50+#define HAVE_DECL_TCA_ACT_KIND 1
 51+#define HAVE_DECL_TCA_ACT_OPTIONS 1
 52+#define HAVE_DECL_TCA_ACT_PAD 1
 53+#define HAVE_DECL_TCA_ACT_STATS 1
 54+#define HAVE_DECL_TCA_ACT_UNSPEC 1
 55+#define HAVE_DECL_TCA_ACT_USED_HW_STATS 1
 56+#define HAVE_DECL_XFRM_MSG_ACQUIRE 1
 57+#define HAVE_DECL_XFRM_MSG_ALLOCSPI 1
 58+#define HAVE_DECL_XFRM_MSG_DELPOLICY 1
 59+#define HAVE_DECL_XFRM_MSG_DELSA 1
 60+#define HAVE_DECL_XFRM_MSG_EXPIRE 1
 61+#define HAVE_DECL_XFRM_MSG_FLUSHPOLICY 1
 62+#define HAVE_DECL_XFRM_MSG_FLUSHSA 1
 63+#define HAVE_DECL_XFRM_MSG_GETAE 1
 64+#define HAVE_DECL_XFRM_MSG_GETDEFAULT 1
 65+#define HAVE_DECL_XFRM_MSG_GETPOLICY 1
 66+#define HAVE_DECL_XFRM_MSG_GETSA 1
 67+#define HAVE_DECL_XFRM_MSG_GETSADINFO 1
 68+#define HAVE_DECL_XFRM_MSG_GETSPDINFO 1
 69+#define HAVE_DECL_XFRM_MSG_MAPPING 1
 70+#define HAVE_DECL_XFRM_MSG_MIGRATE 1
 71+#define HAVE_DECL_XFRM_MSG_NEWAE 1
 72+#define HAVE_DECL_XFRM_MSG_NEWPOLICY 1
 73+#define HAVE_DECL_XFRM_MSG_NEWSA 1
 74+#define HAVE_DECL_XFRM_MSG_NEWSADINFO 1
 75+#define HAVE_DECL_XFRM_MSG_NEWSPDINFO 1
 76+#define HAVE_DECL_XFRM_MSG_POLEXPIRE 1
 77+#define HAVE_DECL_XFRM_MSG_REPORT 1
 78+#define HAVE_DECL_XFRM_MSG_SETDEFAULT 1
 79+#define HAVE_DECL_XFRM_MSG_UPDPOLICY 1
 80+#define HAVE_DECL_XFRM_MSG_UPDSA 1
 81+/* #undef HAVE_DEMANGLE_H */
 82+#define HAVE_DLADDR 1
 83+/* #undef HAVE_ELFUTILS_LIBDWFL_H */
 84+#define HAVE_ELF_H 1
 85+#define HAVE_FALLOCATE 1
 86+#define HAVE_FANOTIFY_MARK 1
 87+/* #undef HAVE_FCNTL64 */
 88+/* #undef HAVE_FOPEN64 */
 89+#define HAVE_FORK 1
 90+#define HAVE_FPUTS_UNLOCKED 1
 91+#define HAVE_FSTATAT 1
 92+#define HAVE_FTRUNCATE 1
 93+#define HAVE_FUTIMENS 1
 94+#define HAVE_GCOV_H 1
 95+/* #undef HAVE_GNU_STUBS */
 96+/* #undef HAVE_GNU_STUBS_32_H */
 97+/* #undef HAVE_GNU_STUBS_X32_H */
 98+#define HAVE_ICONV_H 1
 99+#define HAVE_ICONV_OPEN 1
100+#define HAVE_IF_INDEXTONAME 1
101+#define HAVE_INTTYPES_H 1
102+/* #undef HAVE_LIBIBERTY_DEMANGLE_H */
103+/* #undef HAVE_LIBUNWIND_PTRACE_H */
104+#define HAVE_LINUX_BPF_H 1
105+#define HAVE_LINUX_IF_ALG_H 1
106+#define HAVE_LINUX_IF_XDP_H 1
107+#define HAVE_LINUX_IPC_H 1
108+/* #undef HAVE_LINUX_IPX_H */
109+#define HAVE_LINUX_KVM_H 1
110+#define HAVE_LINUX_NETFILTER_ARP_ARP_TABLES_H 1
111+#define HAVE_LINUX_NETFILTER_BRIDGE_EBTABLES_H 1
112+#define HAVE_LINUX_NETFILTER_IPV4_IP_TABLES_H 1
113+#define HAVE_LINUX_NETFILTER_IPV6_IP6_TABLES_H 1
114+#define HAVE_LINUX_NFC_H 1
115+#define HAVE_LINUX_QRTR_H 1
116+#define HAVE_LINUX_RXRPC_H 1
117+#define HAVE_LINUX_VM_SOCKETS_H 1
118+/* #undef HAVE_M32_MPERS */
119+/* #undef HAVE_M32_SELINUX_RUNTIME */
120+/* #undef HAVE_M32_STRUCT_STAT */
121+/* #undef HAVE_M32_STRUCT_STAT64 */
122+/* #undef HAVE_M32_STRUCT_STAT64_ST_MTIME_NSEC */
123+/* #undef HAVE_M32_STRUCT_STAT_ST_MTIME_NSEC */
124+#define HAVE_MEMORY_H 1
125+#define HAVE_MEMPCPY 1
126+#define HAVE_MQUEUE_H 1
127+/* #undef HAVE_MX32_MPERS */
128+/* #undef HAVE_MX32_SELINUX_RUNTIME */
129+/* #undef HAVE_MX32_STRUCT_STAT */
130+/* #undef HAVE_MX32_STRUCT_STAT64 */
131+/* #undef HAVE_MX32_STRUCT_STAT64_ST_MTIME_NSEC */
132+/* #undef HAVE_MX32_STRUCT_STAT_ST_MTIME_NSEC */
133+/* #undef HAVE_NETINET_SCTP_H */
134+#define HAVE_NETINET_TCP_H 1
135+#define HAVE_NETINET_UDP_H 1
136+/* #undef HAVE_NETIPX_IPX_H */
137+/* #undef HAVE_OPEN64 */
138+#define HAVE_OPEN_MEMSTREAM 1
139+#define HAVE_PATHS_H 1
140+#define HAVE_PREADV 1
141+#define HAVE_PROCESS_VM_READV 1
142+#define HAVE_PROCESS_VM_WRITEV 1
143+#define HAVE_PROGRAM_INVOCATION_NAME 1
144+#define HAVE_PWRITEV 1
145+#define HAVE_READAHEAD 1
146+/* #undef HAVE_S390_COMPAT_REGS */
147+#define HAVE_SCSI_SG_H 1
148+/* #undef HAVE_SELINUX_RUNTIME */
149+/* #undef HAVE_SELINUX_SELINUX_H */
150+#define HAVE_SIGINFO_T_SI_ADDR_LSB 1
151+#define HAVE_SIGINFO_T_SI_LOWER 1
152+#define HAVE_SIGINFO_T_SI_OVERRUN 1
153+/* #undef HAVE_SIGINFO_T_SI_PERF_DATA */
154+/* #undef HAVE_SIGINFO_T_SI_PERF_FLAGS */
155+/* #undef HAVE_SIGINFO_T_SI_PERF_TYPE */
156+#define HAVE_SIGINFO_T_SI_PKEY 1
157+#define HAVE_SIGINFO_T_SI_SYSCALL 1
158+#define HAVE_SIGINFO_T_SI_TIMERID 1
159+/* #undef HAVE_SIGINFO_T_SI_TRAPNO */
160+#define HAVE_SIGINFO_T_SI_UPPER 1
161+#define HAVE_SIGNALFD 1
162+#define HAVE_SIG_ATOMIC_T 1
163+#define HAVE_STATIC_ASSERT 1
164+#define HAVE_STDINT_H 1
165+#define HAVE_STDLIB_H 1
166+#define HAVE_STPCPY 1
167+#define HAVE_STRERROR 1
168+#define HAVE_STRINGS_H 1
169+#define HAVE_STRING_H 1
170+#define HAVE_STRNDUP 1
171+#define HAVE_STRUCT_BPF_INSN 1
172+#define HAVE_STRUCT_BPF_MAP_INFO 1
173+#define HAVE_STRUCT_BPF_MAP_INFO_BTF_ID 1
174+#define HAVE_STRUCT_BPF_MAP_INFO_BTF_KEY_TYPE_ID 1
175+#define HAVE_STRUCT_BPF_MAP_INFO_BTF_VALUE_TYPE_ID 1
176+#define HAVE_STRUCT_BPF_MAP_INFO_BTF_VMLINUX_VALUE_TYPE_ID 1
177+#define HAVE_STRUCT_BPF_MAP_INFO_ID 1
178+#define HAVE_STRUCT_BPF_MAP_INFO_IFINDEX 1
179+#define HAVE_STRUCT_BPF_MAP_INFO_KEY_SIZE 1
180+#define HAVE_STRUCT_BPF_MAP_INFO_MAP_EXTRA 1
181+#define HAVE_STRUCT_BPF_MAP_INFO_MAP_FLAGS 1
182+#define HAVE_STRUCT_BPF_MAP_INFO_MAX_ENTRIES 1
183+#define HAVE_STRUCT_BPF_MAP_INFO_NAME 1
184+/* #undef HAVE_STRUCT_BPF_MAP_INFO_PAD */
185+#define HAVE_STRUCT_BPF_MAP_INFO_TYPE 1
186+#define HAVE_STRUCT_BPF_MAP_INFO_VALUE_SIZE 1
187+#define HAVE_STRUCT_BPF_PROG_INFO 1
188+#define HAVE_STRUCT_BPF_PROG_INFO_BTF_ID 1
189+#define HAVE_STRUCT_BPF_PROG_INFO_CREATED_BY_UID 1
190+#define HAVE_STRUCT_BPF_PROG_INFO_FUNC_INFO 1
191+#define HAVE_STRUCT_BPF_PROG_INFO_FUNC_INFO_REC_SIZE 1
192+#define HAVE_STRUCT_BPF_PROG_INFO_ID 1
193+#define HAVE_STRUCT_BPF_PROG_INFO_IFINDEX 1
194+#define HAVE_STRUCT_BPF_PROG_INFO_JITED_FUNC_LENS 1
195+#define HAVE_STRUCT_BPF_PROG_INFO_JITED_KSYMS 1
196+#define HAVE_STRUCT_BPF_PROG_INFO_JITED_LINE_INFO 1
197+#define HAVE_STRUCT_BPF_PROG_INFO_JITED_LINE_INFO_REC_SIZE 1
198+#define HAVE_STRUCT_BPF_PROG_INFO_JITED_PROG_INSNS 1
199+#define HAVE_STRUCT_BPF_PROG_INFO_JITED_PROG_LEN 1
200+#define HAVE_STRUCT_BPF_PROG_INFO_LINE_INFO 1
201+#define HAVE_STRUCT_BPF_PROG_INFO_LINE_INFO_REC_SIZE 1
202+#define HAVE_STRUCT_BPF_PROG_INFO_LOAD_TIME 1
203+#define HAVE_STRUCT_BPF_PROG_INFO_MAP_IDS 1
204+#define HAVE_STRUCT_BPF_PROG_INFO_NAME 1
205+#define HAVE_STRUCT_BPF_PROG_INFO_NR_FUNC_INFO 1
206+#define HAVE_STRUCT_BPF_PROG_INFO_NR_JITED_FUNC_LENS 1
207+#define HAVE_STRUCT_BPF_PROG_INFO_NR_JITED_KSYMS 1
208+#define HAVE_STRUCT_BPF_PROG_INFO_NR_JITED_LINE_INFO 1
209+#define HAVE_STRUCT_BPF_PROG_INFO_NR_LINE_INFO 1
210+#define HAVE_STRUCT_BPF_PROG_INFO_NR_MAP_IDS 1
211+#define HAVE_STRUCT_BPF_PROG_INFO_NR_PROG_TAGS 1
212+#define HAVE_STRUCT_BPF_PROG_INFO_PROG_TAGS 1
213+#define HAVE_STRUCT_BPF_PROG_INFO_RECURSION_MISSES 1
214+#define HAVE_STRUCT_BPF_PROG_INFO_RUN_CNT 1
215+#define HAVE_STRUCT_BPF_PROG_INFO_RUN_TIME_NS 1
216+#define HAVE_STRUCT_BPF_PROG_INFO_TAG 1
217+#define HAVE_STRUCT_BPF_PROG_INFO_TYPE 1
218+#define HAVE_STRUCT_BPF_PROG_INFO_VERIFIED_INSNS 1
219+#define HAVE_STRUCT_BPF_PROG_INFO_XLATED_PROG_INSNS 1
220+#define HAVE_STRUCT_BPF_PROG_INFO_XLATED_PROG_LEN 1
221+/* #undef HAVE_STRUCT_IA64_FPREG */
222+#define HAVE_STRUCT_IOCB_AIO_FLAGS 1
223+#define HAVE_STRUCT_IOCB_AIO_RW_FLAGS 1
224+#define HAVE_STRUCT_KBDIACRSUC 1
225+#define HAVE_STRUCT_KBDIACRUC 1
226+#define HAVE_STRUCT_KVM_CPUID2 1
227+#define HAVE_STRUCT_KVM_REGS 1
228+#define HAVE_STRUCT_KVM_SREGS 1
229+#define HAVE_STRUCT_KVM_USERSPACE_MEMORY_REGION 1
230+#define HAVE_STRUCT_MMSGHDR 1
231+/* #undef HAVE_STRUCT_PTRACE_PEEKSIGINFO_ARGS */
232+#define HAVE_STRUCT_PTRACE_SYSCALL_INFO 1
233+/* #undef HAVE_STRUCT_PT_ALL_USER_REGS */
234+#define HAVE_STRUCT_SIGCONTEXT 1
235+#define HAVE_STRUCT_SOCKADDR_ALG_NEW 1
236+/* #undef HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL */
237+/* #undef HAVE_STRUCT_SOCKADDR_L2_L2_BDADDR_TYPE */
238+#define HAVE_STRUCT_SOCKADDR_STORAGE 1
239+#define HAVE_STRUCT_SOCKADDR_VM 1
240+#define HAVE_STRUCT_SOCKADDR_VM_SVM_FLAGS 1
241+#define HAVE_STRUCT_SOCKADDR_XDP 1
242+/* #undef HAVE_STRUCT_STAT64 */
243+/* #undef HAVE_STRUCT_STAT64_ST_MTIME_NSEC */
244+#define HAVE_STRUCT_STATFS 1
245+#define HAVE_STRUCT_STATFS64 1
246+#define HAVE_STRUCT_STATFS64_F_FLAGS 1
247+#define HAVE_STRUCT_STATFS64_F_FRSIZE 1
248+#define HAVE_STRUCT_STATFS64_F_FSID_VAL 1
249+/* #undef HAVE_STRUCT_STATFS64_F_FSID___VAL */
250+#define HAVE_STRUCT_STATFS_F_FLAGS 1
251+#define HAVE_STRUCT_STATFS_F_FRSIZE 1
252+#define HAVE_STRUCT_STATFS_F_FSID_VAL 1
253+/* #undef HAVE_STRUCT_STATFS_F_FSID___VAL */
254+#define HAVE_STRUCT_STAT_ST_MTIME_NSEC 1
255+#define HAVE_STRUCT_TCP_DIAG_MD5SIG 1
256+#define HAVE_STRUCT_TERMIOS2 1
257+/* #undef HAVE_STRUCT_TERMIOS_C_ISPEED */
258+/* #undef HAVE_STRUCT_TERMIOS_C_OSPEED */
259+#define HAVE_STRUCT_USER_DESC 1
260+#define HAVE_STRUCT_USER_DESC_LM 1
261+#define HAVE_STRUCT_UTSNAME_DOMAINNAME 1
262+/* #undef HAVE_STRUCT___AIO_SIGSET */
263+#define HAVE_STRUCT___KERNEL_SOCK_TIMEVAL 1
264+#define HAVE_STRUCT___KERNEL_TIMESPEC 1
265+#define HAVE_STRUCT___OLD_KERNEL_STAT 1
266+#define HAVE_STRUCT___PTRACE_SYSCALL_INFO 1
267+#define HAVE_SYNC_FILE_RANGE 1
268+#define HAVE_SYS_EVENTFD_H 1
269+#define HAVE_SYS_FANOTIFY_H 1
270+#define HAVE_SYS_IPC_H 1
271+#define HAVE_SYS_QUOTA_H 1
272+#define HAVE_SYS_SIGNALFD_H 1
273+#define HAVE_SYS_STAT_H 1
274+#define HAVE_SYS_TYPES_H 1
275+#define HAVE_SYS_XATTR_H 1
276+#define HAVE_TYPEOF 1
277+#define HAVE_UNION_BPF_ATTR_ATTACH_BPF_FD 1
278+#define HAVE_UNION_BPF_ATTR_ATTACH_BTF_ID 1
279+#define HAVE_UNION_BPF_ATTR_ATTACH_FLAGS 1
280+#define HAVE_UNION_BPF_ATTR_ATTACH_PROG_FD 1
281+#define HAVE_UNION_BPF_ATTR_ATTACH_TYPE 1
282+#define HAVE_UNION_BPF_ATTR_BATCH_COUNT 1
283+#define HAVE_UNION_BPF_ATTR_BATCH_ELEM_FLAGS 1
284+#define HAVE_UNION_BPF_ATTR_BATCH_FLAGS 1
285+#define HAVE_UNION_BPF_ATTR_BATCH_IN_BATCH 1
286+#define HAVE_UNION_BPF_ATTR_BATCH_KEYS 1
287+#define HAVE_UNION_BPF_ATTR_BATCH_MAP_FD 1
288+#define HAVE_UNION_BPF_ATTR_BATCH_OUT_BATCH 1
289+#define HAVE_UNION_BPF_ATTR_BATCH_VALUES 1
290+#define HAVE_UNION_BPF_ATTR_BPF_FD 1
291+#define HAVE_UNION_BPF_ATTR_BTF 1
292+#define HAVE_UNION_BPF_ATTR_BTF_FD 1
293+#define HAVE_UNION_BPF_ATTR_BTF_ID 1
294+#define HAVE_UNION_BPF_ATTR_BTF_KEY_TYPE_ID 1
295+#define HAVE_UNION_BPF_ATTR_BTF_LOG_BUF 1
296+#define HAVE_UNION_BPF_ATTR_BTF_LOG_LEVEL 1
297+#define HAVE_UNION_BPF_ATTR_BTF_LOG_SIZE 1
298+#define HAVE_UNION_BPF_ATTR_BTF_SIZE 1
299+#define HAVE_UNION_BPF_ATTR_BTF_VALUE_TYPE_ID 1
300+#define HAVE_UNION_BPF_ATTR_BTF_VMLINUX_VALUE_TYPE_ID 1
301+/* #undef HAVE_UNION_BPF_ATTR_DUMMY */
302+#define HAVE_UNION_BPF_ATTR_EXPECTED_ATTACH_TYPE 1
303+#define HAVE_UNION_BPF_ATTR_FD_ARRAY 1
304+#define HAVE_UNION_BPF_ATTR_FILE_FLAGS 1
305+#define HAVE_UNION_BPF_ATTR_FLAGS 1
306+#define HAVE_UNION_BPF_ATTR_FUNC_INFO 1
307+#define HAVE_UNION_BPF_ATTR_FUNC_INFO_CNT 1
308+#define HAVE_UNION_BPF_ATTR_FUNC_INFO_REC_SIZE 1
309+#define HAVE_UNION_BPF_ATTR_INFO_BPF_FD 1
310+#define HAVE_UNION_BPF_ATTR_INFO_INFO 1
311+#define HAVE_UNION_BPF_ATTR_INFO_INFO_LEN 1
312+#define HAVE_UNION_BPF_ATTR_INNER_MAP_FD 1
313+#define HAVE_UNION_BPF_ATTR_INSNS 1
314+#define HAVE_UNION_BPF_ATTR_INSN_CNT 1
315+#define HAVE_UNION_BPF_ATTR_KERN_VERSION 1
316+#define HAVE_UNION_BPF_ATTR_KEY 1
317+#define HAVE_UNION_BPF_ATTR_KEY_SIZE 1
318+#define HAVE_UNION_BPF_ATTR_LICENSE 1
319+#define HAVE_UNION_BPF_ATTR_LINE_INFO 1
320+#define HAVE_UNION_BPF_ATTR_LINE_INFO_CNT 1
321+#define HAVE_UNION_BPF_ATTR_LINE_INFO_REC_SIZE 1
322+/* #undef HAVE_UNION_BPF_ATTR_LINK_CREATE_ADDRS */
323+#define HAVE_UNION_BPF_ATTR_LINK_CREATE_ATTACH_TYPE 1
324+/* #undef HAVE_UNION_BPF_ATTR_LINK_CREATE_BPF_COOKIE */
325+/* #undef HAVE_UNION_BPF_ATTR_LINK_CREATE_CNT */
326+/* #undef HAVE_UNION_BPF_ATTR_LINK_CREATE_COOKIES */
327+#define HAVE_UNION_BPF_ATTR_LINK_CREATE_FLAGS 1
328+#define HAVE_UNION_BPF_ATTR_LINK_CREATE_ITER_INFO 1
329+#define HAVE_UNION_BPF_ATTR_LINK_CREATE_ITER_INFO_LEN 1
330+#define HAVE_UNION_BPF_ATTR_LINK_CREATE_KPROBE_MULTI 1
331+#define HAVE_UNION_BPF_ATTR_LINK_CREATE_PERF_EVENT 1
332+#define HAVE_UNION_BPF_ATTR_LINK_CREATE_PROG_FD 1
333+/* #undef HAVE_UNION_BPF_ATTR_LINK_CREATE_SYMS */
334+#define HAVE_UNION_BPF_ATTR_LINK_CREATE_TARGET_BTF_ID 1
335+#define HAVE_UNION_BPF_ATTR_LINK_CREATE_TARGET_FD 1
336+#define HAVE_UNION_BPF_ATTR_LINK_ID 1
337+#define HAVE_UNION_BPF_ATTR_LINK_UPDATE_FLAGS 1
338+#define HAVE_UNION_BPF_ATTR_LINK_UPDATE_LINK_FD 1
339+#define HAVE_UNION_BPF_ATTR_LINK_UPDATE_NEW_PROG_FD 1
340+#define HAVE_UNION_BPF_ATTR_LINK_UPDATE_OLD_PROG_FD 1
341+#define HAVE_UNION_BPF_ATTR_LOG_BUF 1
342+#define HAVE_UNION_BPF_ATTR_LOG_LEVEL 1
343+#define HAVE_UNION_BPF_ATTR_LOG_SIZE 1
344+#define HAVE_UNION_BPF_ATTR_MAP_EXTRA 1
345+#define HAVE_UNION_BPF_ATTR_MAP_FD 1
346+#define HAVE_UNION_BPF_ATTR_MAP_FLAGS 1
347+#define HAVE_UNION_BPF_ATTR_MAP_ID 1
348+#define HAVE_UNION_BPF_ATTR_MAP_IFINDEX 1
349+#define HAVE_UNION_BPF_ATTR_MAP_NAME 1
350+#define HAVE_UNION_BPF_ATTR_MAP_TYPE 1
351+#define HAVE_UNION_BPF_ATTR_MAX_ENTRIES 1
352+#define HAVE_UNION_BPF_ATTR_NEXT_ID 1
353+#define HAVE_UNION_BPF_ATTR_NEXT_KEY 1
354+#define HAVE_UNION_BPF_ATTR_NUMA_NODE 1
355+#define HAVE_UNION_BPF_ATTR_OPEN_FLAGS 1
356+/* #undef HAVE_UNION_BPF_ATTR_PAD */
357+#define HAVE_UNION_BPF_ATTR_PATHNAME 1
358+#define HAVE_UNION_BPF_ATTR_PROG_BTF_FD 1
359+#define HAVE_UNION_BPF_ATTR_PROG_FLAGS 1
360+#define HAVE_UNION_BPF_ATTR_PROG_ID 1
361+#define HAVE_UNION_BPF_ATTR_PROG_IFINDEX 1
362+#define HAVE_UNION_BPF_ATTR_PROG_NAME 1
363+#define HAVE_UNION_BPF_ATTR_PROG_TYPE 1
364+#define HAVE_UNION_BPF_ATTR_QUERY_ATTACH_FLAGS 1
365+#define HAVE_UNION_BPF_ATTR_QUERY_ATTACH_TYPE 1
366+#define HAVE_UNION_BPF_ATTR_QUERY_PROG_CNT 1
367+#define HAVE_UNION_BPF_ATTR_QUERY_PROG_IDS 1
368+#define HAVE_UNION_BPF_ATTR_QUERY_QUERY_FLAGS 1
369+#define HAVE_UNION_BPF_ATTR_QUERY_TARGET_FD 1
370+#define HAVE_UNION_BPF_ATTR_RAW_TRACEPOINT_NAME 1
371+#define HAVE_UNION_BPF_ATTR_RAW_TRACEPOINT_PROG_FD 1
372+#define HAVE_UNION_BPF_ATTR_REPLACE_BPF_FD 1
373+#define HAVE_UNION_BPF_ATTR_START_ID 1
374+#define HAVE_UNION_BPF_ATTR_TARGET_FD 1
375+#define HAVE_UNION_BPF_ATTR_TASK_FD_QUERY_BUF 1
376+#define HAVE_UNION_BPF_ATTR_TASK_FD_QUERY_BUF_LEN 1
377+#define HAVE_UNION_BPF_ATTR_TASK_FD_QUERY_FD 1
378+#define HAVE_UNION_BPF_ATTR_TASK_FD_QUERY_FD_TYPE 1
379+#define HAVE_UNION_BPF_ATTR_TASK_FD_QUERY_FLAGS 1
380+#define HAVE_UNION_BPF_ATTR_TASK_FD_QUERY_PID 1
381+#define HAVE_UNION_BPF_ATTR_TASK_FD_QUERY_PROBE_ADDR 1
382+#define HAVE_UNION_BPF_ATTR_TASK_FD_QUERY_PROBE_OFFSET 1
383+#define HAVE_UNION_BPF_ATTR_TASK_FD_QUERY_PROG_ID 1
384+#define HAVE_UNION_BPF_ATTR_TEST_BATCH_SIZE 1
385+#define HAVE_UNION_BPF_ATTR_TEST_CPU 1
386+#define HAVE_UNION_BPF_ATTR_TEST_CTX_IN 1
387+#define HAVE_UNION_BPF_ATTR_TEST_CTX_OUT 1
388+#define HAVE_UNION_BPF_ATTR_TEST_CTX_SIZE_IN 1
389+#define HAVE_UNION_BPF_ATTR_TEST_CTX_SIZE_OUT 1
390+#define HAVE_UNION_BPF_ATTR_TEST_DATA_IN 1
391+#define HAVE_UNION_BPF_ATTR_TEST_DATA_OUT 1
392+#define HAVE_UNION_BPF_ATTR_TEST_DATA_SIZE_IN 1
393+#define HAVE_UNION_BPF_ATTR_TEST_DATA_SIZE_OUT 1
394+#define HAVE_UNION_BPF_ATTR_TEST_DURATION 1
395+#define HAVE_UNION_BPF_ATTR_TEST_FLAGS 1
396+#define HAVE_UNION_BPF_ATTR_TEST_PROG_FD 1
397+#define HAVE_UNION_BPF_ATTR_TEST_REPEAT 1
398+#define HAVE_UNION_BPF_ATTR_TEST_RETVAL 1
399+#define HAVE_UNION_BPF_ATTR_VALUE 1
400+#define HAVE_UNION_BPF_ATTR_VALUE_SIZE 1
401+#define HAVE_UNISTD_H 1
402+/* #undef HAVE_USTAT_H */
403+/* #undef HAVE__STATIC_ASSERT */
404+/* probe HAVE___BUILTIN_POPCOUNT */
405+#define HAVE___KERNEL_LONG_T 1
406+#define HAVE___KERNEL_ULONG_T 1
407+/* #undef HPPA */
408+/* #undef I386 */
409+/* #undef IA64 */
410+/* #undef LINUX_MIPSN32 */
411+/* #undef LINUX_MIPSN64 */
412+/* #undef LINUX_MIPSO32 */
413+/* #undef LOONGARCH64 */
414+/* #undef M32_SIZEOF_KERNEL_LONG_T */
415+/* #undef M32_SIZEOF_LONG */
416+/* #undef M32_SIZEOF_STRUCT_MSQID64_DS */
417+/* #undef M68K */
418+/* #undef METAG */
419+/* #undef MICROBLAZE */
420+/* #undef MIPS */
421+/* #undef MX32_SIZEOF_KERNEL_LONG_T */
422+/* #undef MX32_SIZEOF_LONG */
423+/* #undef MX32_SIZEOF_STRUCT_MSQID64_DS */
424+/* #undef NIOS2 */
425+/* #undef OR1K */
426+#define PACKAGE "strace"
427+#define PACKAGE_BUGREPORT "strace-devel@lists.strace.io"
428+#define PACKAGE_NAME "strace"
429+#define PACKAGE_STRING "strace 6.4"
430+#define PACKAGE_TARNAME "strace"
431+#define PACKAGE_URL "https://strace.io"
432+#define PACKAGE_VERSION "6.4"
433+/* #undef POWERPC */
434+/* #undef POWERPC64 */
435+/* #undef POWERPC64LE */
436+/* #undef RISCV64 */
437+/* #undef S390 */
438+/* #undef S390X */
439+/* #undef SH */
440+/* #undef SH64 */
441+#define SIZEOF_KERNEL_LONG_T 8
442+#define SIZEOF_LONG 8
443+#define SIZEOF_LONG_LONG 8
444+#define SIZEOF_OFF_T 8
445+#define SIZEOF_STRUCT_I64_I32 16
446+#define SIZEOF_STRUCT_MSQID64_DS 120
447+#define SLM_MANPAGE_DATE "2022-01-01"
448+/* #undef SPARC */
449+/* #undef SPARC64 */
450+#define STDC_HEADERS 1
451+#define STRACE_MANPAGE_DATE "2023-06-11"
452+/* #undef TILE */
453+/* #undef USE_DEMANGLE */
454+/* #undef USE_LIBDW */
455+/* #undef USE_LIBUNWIND */
456+#ifndef _ALL_SOURCE
457+# define _ALL_SOURCE 1
458+#endif
459+#ifndef _GNU_SOURCE
460+# define _GNU_SOURCE 1
461+#endif
462+#ifndef _POSIX_PTHREAD_SEMANTICS
463+# define _POSIX_PTHREAD_SEMANTICS 1
464+#endif
465+#ifndef _TANDEM_SOURCE
466+# define _TANDEM_SOURCE 1
467+#endif
468+#ifndef __EXTENSIONS__
469+# define __EXTENSIONS__ 1
470+#endif
471+/* #undef USE_UNWINDER */
472+#define VERSION "6.4"
473+#if defined AC_APPLE_UNIVERSAL_BUILD
474+# if defined __BIG_ENDIAN__
475+#  define WORDS_BIGENDIAN 1
476+# endif
477+#else
478+# ifndef WORDS_BIGENDIAN
479+/* #  undef WORDS_BIGENDIAN */
480+# endif
481+#endif
482+/* #undef X32 */
483+#define X86_64 1
484+/* #undef XTENSA */
485+/* #undef _MINIX */
486+/* #undef _POSIX_1_SOURCE */
487+/* #undef _POSIX_SOURCE */
488+/* #undef gid_t */
489+/* #undef typeof */
490+/* #undef uid_t */
+394, -0
  1@@ -0,0 +1,394 @@
  2+cflags{
  3+	'-D HAVE_CONFIG_H',
  4+	'-D IN_STRACE',
  5+	-- it is important that the arch-specific directory is searched first
  6+	'-I $srcdir/src/linux/x86_64',
  7+	'-I $srcdir/src/linux/generic',
  8+	'-I $srcdir/src',
  9+	'-I $outdir',
 10+	'-isystem $builddir/pkg/linux-headers/include',
 11+}
 12+
 13+build('cat', '$outdir/config.h', {
 14+	'$builddir/probe/HAVE___BUILTIN_POPCOUNT',
 15+	'$dir/config.h',
 16+})
 17+
 18+build('cpp', '$outdir/ioctl_iocdef.i', '$srcdir/src/ioctl_iocdef.c')
 19+build('sed', '$outdir/ioctl_iocdef.h', '$outdir/ioctl_iocdef.i', {
 20+	expr=[[-n 's/^DEFINE HOST/#define /p']],
 21+})
 22+
 23+sub('tools.ninja', function()
 24+	toolchain(config.host)
 25+	cflags{
 26+		'-D X86_64=1',
 27+		'-I $srcdir/src/linux/x86_64',
 28+		'-I $srcdir/src/linux',
 29+		'-I $outdir',
 30+	}
 31+
 32+	for i = 0, 2 do
 33+		build('cat', '$outdir/ioctls_all'..i..'.h', {
 34+			'$srcdir/src/linux/x86_64/ioctls_inc'..i..'.h',
 35+			'$srcdir/src/linux/x86_64/ioctls_arch'..i..'.h',
 36+		})
 37+		build('cc', '$outdir/ioctlsort'..i..'.c.o', {
 38+			'$srcdir/src/ioctlsort.c',
 39+			'|', '$outdir/ioctl_iocdef.h', '$srcdir/ioctls_zfs.h', '$outdir/ioctls_all'..i..'.h',
 40+		}, {cflags=string.format([[$cflags -D 'IOCTLSORT_INC="ioctls_all%d.h"']], i)})
 41+		exe('ioctlsort'..i, {'ioctlsort'..i..'.c.o'})
 42+		rule('ioctlsort'..i, '$outdir/ioctlsort'..i..' >$out')
 43+		build('ioctlsort'..i, '$outdir/ioctlent'..i..'.h', {'|', '$outdir/ioctlsort'..i})
 44+	end
 45+end)
 46+
 47+local mpers = lines('mpers.txt')
 48+for _, f in ipairs(mpers) do
 49+	build('cpp', '$outdir/'..f..'.mpers.i', {'$srcdir/src/'..f, '|', '$outdir/config.h'}, {
 50+		cflags='$cflags -DIN_MPERS_BOOTSTRAP',
 51+	})
 52+end
 53+
 54+local function makempers(name, script)
 55+	build('awk', '$outdir/'..name, {expand{'$outdir/', mpers, '.mpers.i'}, '|', '$dir/'..script}, {
 56+		expr='-f $dir/'..script,
 57+	})
 58+end
 59+
 60+makempers('printers.h', 'printers.awk')
 61+makempers('native_printer_decls.h', 'printerdecls.awk')
 62+makempers('native_printer_defs.h', 'printerdefs.awk')
 63+
 64+build('cpp', '$outdir/syscallent.i', '$srcdir/src/linux/x86_64/syscallent.h')
 65+build('awk', '$outdir/scno-syscallent.h', {'$outdir/syscallent.i', '|', '$dir/scno.awk'}, {
 66+	expr='-f $dir/scno.awk',
 67+})
 68+build('cat', '$outdir/scno.h', {'$srcdir/src/scno.head', '$outdir/scno-syscallent.h'})
 69+
 70+-- this seems to be enough syscall headers to build
 71+local syscalls = expand{'$srcdir/src/linux/', {
 72+	'32/syscallent.h',
 73+	'64/syscallent.h',
 74+	'arm/syscallent.h',
 75+	'i386/syscallent.h',
 76+	'sparc/syscallent.h',
 77+	'sparc64/syscallent.h',
 78+	'generic/subcallent.h',
 79+	'generic/syscallent-common.h',
 80+	'x86_64/syscallent.h',
 81+}}
 82+build('awk', '$outdir/sen.h', {syscalls, '|', '$dir/sen.awk'}, {
 83+	expr='-f $dir/sen.awk',
 84+})
 85+
 86+local srcs = paths[[src/(
 87+	access.c
 88+	affinity.c
 89+	aio.c
 90+	alpha.c
 91+	basic_filters.c
 92+	bind.c
 93+	bjm.c
 94+	block.c
 95+	bpf.c
 96+	bpf_filter.c
 97+	bpf_seccomp_filter.c
 98+	bpf_sock_filter.c
 99+	btrfs.c
100+	cacheflush.c
101+	capability.c
102+	chdir.c
103+	chmod.c
104+	clone.c
105+	close_range.c
106+	copy_file_range.c
107+	count.c
108+	counter_ioctl.c
109+	delay.c
110+	desc.c
111+	dirent.c
112+	dirent64.c
113+	dirent_types.c
114+	dm.c
115+	dup.c
116+	dyxlat.c
117+	epoll.c
118+	error_prints.c
119+	evdev.c
120+	evdev_mpers.c
121+	eventfd.c
122+	execve.c
123+	fadvise.c
124+	fallocate.c
125+	fanotify.c
126+	fchownat.c
127+	fcntl.c
128+	fetch_bpf_fprog.c
129+	fetch_indirect_syscall_args.c
130+	fetch_struct_flock.c
131+	fetch_struct_iovec.c
132+	fetch_struct_keyctl_kdf_params.c
133+	fetch_struct_mmsghdr.c
134+	fetch_struct_msghdr.c
135+	fetch_struct_stat.c
136+	fetch_struct_stat64.c
137+	fetch_struct_statfs.c
138+	fetch_struct_xfs_quotastat.c
139+	file_handle.c
140+	filter_qualify.c
141+	filter_seccomp.c
142+	flock.c
143+	fs_0x94_ioctl.c
144+	fs_f_ioctl.c
145+	fs_x_ioctl.c
146+	fsconfig.c
147+	fsmount.c
148+	fsopen.c
149+	fspick.c
150+	fstatfs.c
151+	fstatfs64.c
152+	futex.c
153+	futex_waitv.c
154+	gen/gen_hdio.c
155+	get_personality.c
156+	get_robust_list.c
157+	getcpu.c
158+	getcwd.c
159+	getpagesize.c
160+	getpid.c
161+	getrandom.c
162+	gpio_ioctl.c
163+	hdio.c
164+	hostname.c
165+	inotify.c
166+	inotify_ioctl.c
167+	io.c
168+	io_uring.c
169+	ioctl.c
170+	ioperm.c
171+	ioprio.c
172+	ipc.c
173+	ipc_msg.c
174+	ipc_msgctl.c
175+	ipc_sem.c
176+	ipc_semctl.c
177+	ipc_shm.c
178+	ipc_shmctl.c
179+	kcmp.c
180+	kd_ioctl.c
181+	kd_mpers_ioctl.c
182+	kexec.c
183+	keyctl.c
184+	kvm.c
185+	landlock.c
186+	ldt.c
187+	link.c
188+	lirc_ioctl.c
189+	listen.c
190+	lookup_dcookie.c
191+	loop.c
192+	lseek.c
193+	mem.c
194+	membarrier.c
195+	memfd_create.c
196+	memfd_secret.c
197+	mknod.c
198+	mmap_cache.c
199+	mmap_notify.c
200+	mmsghdr.c
201+	mount.c
202+	mount_setattr.c
203+	move_mount.c
204+	mq.c
205+	msghdr.c
206+	mtd.c
207+	nbd_ioctl.c
208+	net.c
209+	netlink.c
210+	netlink_crypto.c
211+	netlink_inet_diag.c
212+	netlink_kobject_uevent.c
213+	netlink_netfilter.c
214+	netlink_netlink_diag.c
215+	netlink_packet_diag.c
216+	netlink_route.c
217+	netlink_selinux.c
218+	netlink_smc_diag.c
219+	netlink_sock_diag.c
220+	netlink_unix_diag.c
221+	nlattr.c
222+	nsfs.c
223+	numa.c
224+	number_set.c
225+	oldstat.c
226+	open.c
227+	open_tree.c
228+	or1k_atomic.c
229+	pathtrace.c
230+	perf.c
231+	perf_ioctl.c
232+	personality.c
233+	pidfd_getfd.c
234+	pidfd_open.c
235+	pidns.c
236+	pkeys.c
237+	poke.c
238+	poll.c
239+	prctl.c
240+	print_dev_t.c
241+	print_group_req.c
242+	print_ifindex.c
243+	print_instruction_pointer.c
244+	print_kernel_sigset.c
245+	print_kernel_version.c
246+	print_mac.c
247+	print_mq_attr.c
248+	print_msgbuf.c
249+	print_sg_req_info.c
250+	print_sigevent.c
251+	print_statfs.c
252+	print_struct_stat.c
253+	print_syscall_number.c
254+	print_time.c
255+	print_timespec32.c
256+	print_timespec64.c
257+	print_timeval.c
258+	print_timeval64.c
259+	print_timex.c
260+	printmode.c
261+	printrusage.c
262+	printsiginfo.c
263+	process_vm.c
264+	ptp.c
265+	ptrace.c
266+	ptrace_syscall_info.c
267+	quota.c
268+	random_ioctl.c
269+	readahead.c
270+	readlink.c
271+	reboot.c
272+	regset.c
273+	renameat.c
274+	resource.c
275+	retval.c
276+	riscv.c
277+	rt_sigframe.c
278+	rt_sigreturn.c
279+	rtc.c
280+	rtnl_addr.c
281+	rtnl_addrlabel.c
282+	rtnl_cachereport.c
283+	rtnl_dcb.c
284+	rtnl_link.c
285+	rtnl_mdb.c
286+	rtnl_neigh.c
287+	rtnl_neightbl.c
288+	rtnl_netconf.c
289+	rtnl_nh.c
290+	rtnl_nsid.c
291+	rtnl_route.c
292+	rtnl_rule.c
293+	rtnl_stats.c
294+	rtnl_tc.c
295+	rtnl_tc_action.c
296+	s390.c
297+	sched.c
298+	scsi.c
299+	seccomp.c
300+	seccomp_ioctl.c
301+	sendfile.c
302+	sg_io_v3.c
303+	sg_io_v4.c
304+	shutdown.c
305+	sigaltstack.c
306+	signal.c
307+	signalfd.c
308+	sigreturn.c
309+	sock.c
310+	sockaddr.c
311+	socketcall.c
312+	socketutils.c
313+	sparc.c
314+	sram_alloc.c
315+	stage_output.c
316+	stat.c
317+	stat64.c
318+	statfs.c
319+	statfs64.c
320+	statx.c
321+	strauss.c
322+	string_to_uint.c
323+	swapon.c
324+	sync_file_range.c
325+	sync_file_range2.c
326+	syscall.c
327+	syscall_name.c
328+	sysctl.c
329+	sysinfo.c
330+	syslog.c
331+	sysmips.c
332+	tee.c
333+	term.c
334+	time.c
335+	times.c
336+	trie.c
337+	truncate.c
338+	ubi.c
339+	ucopy.c
340+	uid.c
341+	uid16.c
342+	umask.c
343+	umount.c
344+	uname.c
345+	upeek.c
346+	upoke.c
347+	userfaultfd.c
348+	ustat.c
349+	util.c
350+	utime.c
351+	utimes.c
352+	v4l2.c
353+	wait.c
354+	watchdog_ioctl.c
355+	xattr.c
356+	xgetdents.c
357+	xlat.c
358+	xmalloc.c
359+)]]
360+
361+build('sed', '$outdir/sys_func.h', expand{'$srcdir/', srcs}, {
362+	expr=[[-n 's/^SYS_FUNC(.*/extern &;/p']],
363+})
364+
365+pkg.deps = {
366+	'$outdir/config.h',
367+	'$outdir/ioctlent0.h',
368+	'$outdir/ioctlent1.h',
369+	'$outdir/ioctlent2.h',
370+	'$outdir/native_printer_decls.h',
371+	'$outdir/native_printer_defs.h',
372+	'$outdir/printers.h',
373+	'$outdir/scno.h',
374+	'$outdir/sen.h',
375+	'$outdir/sys_func.h',
376+	'pkg/linux-headers/headers',
377+}
378+
379+lib('libstrace.a', srcs)
380+exe('strace', {'src/strace.c', 'libstrace.a'})
381+file('bin/strace', '755', '$outdir/strace')
382+
383+build('sed', '$outdir/strace.1', '$srcdir/doc/strace.1.in', {
384+	expr={
385+		[[-e 's,@STRACE_MANPAGE_DATE@,2023-06-11,']],
386+		[[-e 's,@VERSION@,6.4,']],
387+		[[-e 's,@ENABLE_STACKTRACE_TRUE@,#,']],
388+		[[-e 's,@ENABLE_STACKTRACE_FALSE@,,']],
389+		[[-e 's,@ENABLE_SECONTEXT_TRUE@,#,']],
390+		[[-e 's,@ENABLE_SECONTEXT_FALSE@,,']],
391+	},
392+})
393+man{'$outdir/strace.1'}
394+
395+fetch 'curl'
+45, -0
 1@@ -0,0 +1,45 @@
 2+# 2,<awk '/^mpers_source_files =/ {for (i=3; i<=NF; ++i) print $i}' src/src/mpers.am
 3+block.c
 4+btrfs.c
 5+dirent.c
 6+evdev_mpers.c
 7+fetch_bpf_fprog.c
 8+fetch_struct_flock.c
 9+fetch_struct_iovec.c
10+fetch_struct_keyctl_kdf_params.c
11+fetch_struct_mmsghdr.c
12+fetch_struct_msghdr.c
13+fetch_struct_stat.c
14+fetch_struct_stat64.c
15+fetch_struct_statfs.c
16+fetch_struct_xfs_quotastat.c
17+hdio.c
18+ipc_msgctl.c
19+ipc_semctl.c
20+ipc_shmctl.c
21+kd_mpers_ioctl.c
22+loop.c
23+mtd.c
24+perf_ioctl.c
25+print_group_req.c
26+print_kernel_sigset.c
27+print_mq_attr.c
28+print_msgbuf.c
29+print_sg_req_info.c
30+print_sigevent.c
31+print_time.c
32+print_timeval.c
33+printrusage.c
34+printsiginfo.c
35+regset.c
36+rt_sigreturn.c
37+rtc.c
38+sg_io_v3.c
39+sigaltstack.c
40+sock.c
41+sysctl.c
42+sysinfo.c
43+times.c
44+ustat.c
45+utime.c
46+v4l2.c
+25, -0
 1@@ -0,0 +1,25 @@
 2+From 14b52959359f69bc5806bbd8d8c44f72d912aa1a Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 5 Jul 2019 20:52:24 -0700
 5+Subject: [PATCH] Don't return expression in void function
 6+
 7+---
 8+ src/defs.h | 2 +-
 9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/src/defs.h b/src/defs.h
12+index 846a7ae5a..d6b54a633 100644
13+--- a/src/defs.h
14++++ b/src/defs.h
15+@@ -807,7 +807,7 @@ extern bool pathtrace_match_set(struct tcb *, struct path_set *,
16+ static inline void
17+ pathtrace_select(const char *path)
18+ {
19+-	return pathtrace_select_set(path, &global_path_set);
20++	pathtrace_select_set(path, &global_path_set);
21+ }
22+ 
23+ static inline bool
24+-- 
25+2.37.3
26+
+355, -0
  1@@ -0,0 +1,355 @@
  2+From cdecbf8aee12f837e878a568814bb81550412b6b Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sat, 6 Jul 2019 01:33:01 -0700
  5+Subject: [PATCH] Use __typeof__ spelling of typeof
  6+
  7+---
  8+ src/bpf.c            | 10 +++++-----
  9+ src/btrfs.c          | 12 ++++++------
 10+ src/defs.h           |  6 +++---
 11+ src/fs_0x94_ioctl.c  |  2 +-
 12+ src/fs_f_ioctl.c     |  2 +-
 13+ src/landlock.c       |  4 ++--
 14+ src/list.h           | 10 +++++-----
 15+ src/macros.h         |  2 +-
 16+ src/print_fields.h   |  2 +-
 17+ src/s390.c           |  6 +++---
 18+ src/tee.c            |  2 +-
 19+ src/ubi.c            |  2 +-
 20+ tests/btrfs.c        |  2 +-
 21+ tests/fcntl-common.c |  2 +-
 22+ 14 files changed, 32 insertions(+), 32 deletions(-)
 23+
 24+diff --git a/src/bpf.c b/src/bpf.c
 25+index 7bdeb4f65..1e72f3e30 100644
 26+--- a/src/bpf.c
 27++++ b/src/bpf.c
 28+@@ -1432,7 +1432,7 @@ BEGIN_BPF_CMD_DECODER(BPF_LINK_CREATE)
 29+ 			tprint_struct_next();
 30+ 			PRINT_FIELD_U(attr, target_btf_id);
 31+ 		}
 32+-		attr_size = offsetofend(typeof(attr), target_btf_id);
 33++		attr_size = offsetofend(__typeof__(attr), target_btf_id);
 34+ 		break;
 35+ 
 36+ 	/* TODO: prog type == BPF_PROG_TYPE_TRACING */
 37+@@ -1448,7 +1448,7 @@ BEGIN_BPF_CMD_DECODER(BPF_LINK_CREATE)
 38+ 			    print_iter_info_array_member, 0);
 39+ 		tprint_struct_next();
 40+ 		PRINT_FIELD_U(attr, iter_info_len);
 41+-		attr_size = offsetofend(typeof(attr), iter_info_len);
 42++		attr_size = offsetofend(__typeof__(attr), iter_info_len);
 43+ 		break;
 44+ 	}
 45+ 
 46+@@ -1460,7 +1460,7 @@ BEGIN_BPF_CMD_DECODER(BPF_LINK_CREATE)
 47+ 		tprint_struct_begin();
 48+ 		PRINT_FIELD_X(attr.perf_event, bpf_cookie);
 49+ 		tprint_struct_end();
 50+-		attr_size = offsetofend(typeof(attr), perf_event.bpf_cookie);
 51++		attr_size = offsetofend(__typeof__(attr), perf_event.bpf_cookie);
 52+ 		break;
 53+ 
 54+ 	/* TODO: prog type == BPF_PROG_TYPE_KPROBE */
 55+@@ -1500,7 +1500,7 @@ BEGIN_BPF_CMD_DECODER(BPF_LINK_CREATE)
 56+ 			    &buf.cookie, sizeof(buf.cookie),
 57+ 			    tfetch_mem, print_xint_array_member, 0);
 58+ 		tprint_struct_end();
 59+-		attr_size = offsetofend(typeof(attr), kprobe_multi.cookies);
 60++		attr_size = offsetofend(__typeof__(attr), kprobe_multi.cookies);
 61+ 		break;
 62+ 	}
 63+ 
 64+@@ -1510,7 +1510,7 @@ BEGIN_BPF_CMD_DECODER(BPF_LINK_CREATE)
 65+ 		 *     can pick up non-zero values in the union at the end
 66+ 		 *     of the link_create struct.
 67+ 		 */
 68+-		attr_size = offsetofend(typeof(attr), flags);
 69++		attr_size = offsetofend(__typeof__(attr), flags);
 70+ 	}
 71+ 
 72+ print_bpf_link_create_end:
 73+diff --git a/src/btrfs.c b/src/btrfs.c
 74+index 31ee871b3..76d7a2bec 100644
 75+--- a/src/btrfs.c
 76++++ b/src/btrfs.c
 77+@@ -216,7 +216,7 @@ btrfs_print_logical_ino_container(struct tcb *tcp,
 78+ 		tprint_more_data_follows();
 79+ 	} else {
 80+ 		const uint64_t val_addr =
 81+-			inodes_addr + offsetof(typeof(container), val);
 82++			inodes_addr + offsetof(__typeof__(container), val);
 83+ 		uint64_t record[3];
 84+ 		tprint_struct_next();
 85+ 		tprints_field_name("val");
 86+@@ -257,7 +257,7 @@ btrfs_print_ino_path_container(struct tcb *tcp,
 87+ 		tprint_more_data_follows();
 88+ 	} else {
 89+ 		uint64_t val_addr =
 90+-			fspath_addr + offsetof(typeof(container), val);
 91++			fspath_addr + offsetof(__typeof__(container), val);
 92+ 		uint64_t offset;
 93+ 		tprint_struct_next();
 94+ 		tprints_field_name("val");
 95+@@ -298,7 +298,7 @@ btrfs_print_qgroup_inherit(struct tcb *const tcp, const kernel_ulong_t qgi_addr)
 96+ 		uint64_t record;
 97+ 		tprint_struct_next();
 98+ 		tprints_field_name("qgroups");
 99+-		print_array(tcp, qgi_addr + offsetof(typeof(inherit), qgroups),
100++		print_array(tcp, qgi_addr + offsetof(__typeof__(inherit), qgroups),
101+ 			    inherit.num_qgroups, &record, sizeof(record),
102+ 			    tfetch_mem, print_uint_array_member, 0);
103+ 	}
104+@@ -1170,7 +1170,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
105+ 		PRINT_FIELD_OBJ_PTR(args, key,
106+ 				    print_btrfs_ioctl_search_key,
107+ 				    entering(tcp), !abbrev(tcp));
108+-		decode_search_arg_buf(tcp, arg + offsetof(typeof(args), buf),
109++		decode_search_arg_buf(tcp, arg + offsetof(__typeof__(args), buf),
110+ 				      sizeof(args.buf), args.key.nr_items);
111+ 		tprint_struct_end();
112+ 		if (entering(tcp))
113+@@ -1206,7 +1206,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
114+ 				    entering(tcp), !abbrev(tcp));
115+ 		tprint_struct_next();
116+ 		PRINT_FIELD_U(args, buf_size);
117+-		decode_search_arg_buf(tcp, arg + offsetof(typeof(args), buf),
118++		decode_search_arg_buf(tcp, arg + offsetof(__typeof__(args), buf),
119+ 				      args.buf_size, args.key.nr_items);
120+ 		tprint_struct_end();
121+ 		if (entering(tcp))
122+@@ -1284,7 +1284,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
123+ 			struct btrfs_ioctl_space_info info;
124+ 			tprint_struct_next();
125+ 			tprints_field_name("spaces");
126+-			print_array(tcp, arg + offsetof(typeof(args), spaces),
127++			print_array(tcp, arg + offsetof(__typeof__(args), spaces),
128+ 				    args.total_spaces,
129+ 				    &info, sizeof(info), tfetch_mem,
130+ 				    print_btrfs_ioctl_space_info, 0);
131+diff --git a/src/defs.h b/src/defs.h
132+index d6b54a633..d24b11884 100644
133+--- a/src/defs.h
134++++ b/src/defs.h
135+@@ -1145,7 +1145,7 @@ print_local_array_ex(struct tcb *tcp,
136+ # define print_local_array_upto(tcp_, start_addr_, upto_, print_func_)	     \
137+ 	print_local_array_ex((tcp_), (start_addr_),			     \
138+ 			     CLAMP((upto_), 0,				     \
139+-				   (typeof(upto_)) ARRAY_SIZE(start_addr_)), \
140++				   (__typeof__(upto_)) ARRAY_SIZE(start_addr_)), \
141+ 			     sizeof((start_addr_)[0]), (print_func_),        \
142+ 			     NULL, 0, NULL, NULL)
143+ 
144+@@ -2027,8 +2027,8 @@ scno_pers_is_valid(kernel_ulong_t scno, unsigned int pers)
145+ 
146+ # define ILOG2_ITER_(val_, ret_, bit_)					\
147+ 	do {								\
148+-		typeof(ret_) shift_ =					\
149+-			((val_) > ((((typeof(val_)) 1)			\
150++		__typeof__(ret_) shift_ =				\
151++			((val_) > ((((__typeof__(val_)) 1)		\
152+ 				   << (1 << (bit_))) - 1)) << (bit_);	\
153+ 		(val_) >>= shift_;					\
154+ 		(ret_) |= shift_;					\
155+diff --git a/src/fs_0x94_ioctl.c b/src/fs_0x94_ioctl.c
156+index 7aa170af0..b908ea1fb 100644
157+--- a/src/fs_0x94_ioctl.c
158++++ b/src/fs_0x94_ioctl.c
159+@@ -94,7 +94,7 @@ decode_file_dedupe_range(struct tcb *const tcp, const kernel_ulong_t arg)
160+ 	if (abbrev(tcp) && range.dest_count > count)
161+ 		limit = &count;
162+ 
163+-	rc = print_array(tcp, arg + offsetof(typeof(range), info),
164++	rc = print_array(tcp, arg + offsetof(__typeof__(range), info),
165+ 			 range.dest_count, &info, sizeof(info),
166+ 			 tfetch_mem,
167+ 			 print_file_dedupe_range_info, limit);
168+diff --git a/src/fs_f_ioctl.c b/src/fs_f_ioctl.c
169+index 7b51bc9f9..ee9a42754 100644
170+--- a/src/fs_f_ioctl.c
171++++ b/src/fs_f_ioctl.c
172+@@ -72,7 +72,7 @@ decode_fiemap(struct tcb *const tcp, const kernel_ulong_t arg)
173+ 		struct fiemap_extent fe;
174+ 		tprint_struct_next();
175+ 		tprints_field_name("fm_extents");
176+-		print_array(tcp, arg + offsetof(typeof(args), fm_extents),
177++		print_array(tcp, arg + offsetof(__typeof__(args), fm_extents),
178+ 			    args.fm_mapped_extents, &fe, sizeof(fe),
179+ 			    tfetch_mem, print_fiemap_extent, 0);
180+ 	}
181+diff --git a/src/landlock.c b/src/landlock.c
182+index d3ddb4edb..151bea7af 100644
183+--- a/src/landlock.c
184++++ b/src/landlock.c
185+@@ -19,7 +19,7 @@ print_landlock_ruleset_attr(struct tcb *tcp, const kernel_ulong_t addr,
186+ {
187+ 	struct landlock_ruleset_attr attr;
188+ 
189+-	if (size < offsetofend(typeof(attr), handled_access_fs)) {
190++	if (size < offsetofend(__typeof__(attr), handled_access_fs)) {
191+ 		printaddr(addr);
192+ 		return;
193+ 	}
194+@@ -31,7 +31,7 @@ print_landlock_ruleset_attr(struct tcb *tcp, const kernel_ulong_t addr,
195+ 	PRINT_FIELD_FLAGS(attr, handled_access_fs, landlock_ruleset_access_fs,
196+ 			  "LANDLOCK_ACCESS_FS_???");
197+ 
198+-	if (size > offsetofend(typeof(attr), handled_access_fs)) {
199++	if (size > offsetofend(__typeof__(attr), handled_access_fs)) {
200+ 		tprint_arg_next();
201+ 		tprint_more_data_follows();
202+ 	}
203+diff --git a/src/list.h b/src/list.h
204+index 4de4cb3be..f4ec11f0e 100644
205+--- a/src/list.h
206++++ b/src/list.h
207+@@ -158,7 +158,7 @@ list_is_empty(const struct list_item *l)
208+  * @param field Name of the field that holds the respective struct list_item.
209+  */
210+ # define list_next(var, field) \
211+-	list_elem((var)->field.next, typeof(*(var)), field)
212++	list_elem((var)->field.next, __typeof__(*(var)), field)
213+ /**
214+  * Get the previous element in a list.
215+  *
216+@@ -166,7 +166,7 @@ list_is_empty(const struct list_item *l)
217+  * @param field Name of the field that holds the respective struct list_item.
218+  */
219+ # define list_prev(var, field) \
220+-	list_elem((var)->field.prev, typeof(*(var)), field)
221++	list_elem((var)->field.prev, __typeof__(*(var)), field)
222+ 
223+ /**
224+  * Insert an item into a list. The item is placed as the next list item
225+@@ -280,7 +280,7 @@ list_replace(struct list_item *old, struct list_item *new)
226+  *               inside list items.
227+  */
228+ # define list_foreach(var_, head_, field_) \
229+-	for (var_ = list_elem((head_)->next, typeof(*var_), field_); \
230++	for (var_ = list_elem((head_)->next, __typeof__(*var_), field_); \
231+ 	    &(var_->field_) != (head_); var_ = list_next(var_, field_))
232+ 
233+ /**
234+@@ -293,8 +293,8 @@ list_replace(struct list_item *old, struct list_item *new)
235+  * @param _tmp   Temporary variable for storing pointer to the next item.
236+  */
237+ # define list_foreach_safe(var_, head_, field_, _tmp) \
238+-	for (var_ = list_elem((head_)->next, typeof(*var_), field_), \
239+-	    _tmp = list_elem((var_)->field_.next, typeof(*var_), field_); \
240++	for (var_ = list_elem((head_)->next, __typeof__(*var_), field_), \
241++	    _tmp = list_elem((var_)->field_.next, __typeof__(*var_), field_); \
242+ 	    &var_->field_ != head_; var_ = _tmp, _tmp = list_next(_tmp, field_))
243+ 
244+ #endif /* !STRACE_LIST_H */
245+diff --git a/src/macros.h b/src/macros.h
246+index f22be23c5..184f016b0 100644
247+--- a/src/macros.h
248++++ b/src/macros.h
249+@@ -62,7 +62,7 @@
250+ 
251+ # define sizeof_field(type_, member_) (sizeof(((type_ *)0)->member_))
252+ 
253+-# define typeof_field(type_, member_) typeof(((type_ *)0)->member_)
254++# define typeof_field(type_, member_) __typeof__(((type_ *)0)->member_)
255+ 
256+ # ifndef offsetofend
257+ #  define offsetofend(type_, member_)	\
258+diff --git a/src/print_fields.h b/src/print_fields.h
259+index eca389e7e..b97e86377 100644
260+--- a/src/print_fields.h
261++++ b/src/print_fields.h
262+@@ -774,7 +774,7 @@ tprint_sysret_end(void)
263+ # define MAYBE_PRINT_FIELD_LEN(print_prefix_, where_, field_,		\
264+ 			len_, print_func_, ...)				\
265+ 	do {								\
266+-		unsigned int start = offsetof(typeof(where_), field_);	\
267++		unsigned int start = offsetof(__typeof__(where_), field_); \
268+ 		unsigned int end = start + sizeof((where_).field_);	\
269+ 		if (len_ > start) {					\
270+ 			print_prefix_;					\
271+diff --git a/src/s390.c b/src/s390.c
272+index ca71730c4..455144fe7 100644
273+--- a/src/s390.c
274++++ b/src/s390.c
275+@@ -505,7 +505,7 @@ static void
276+ print_sthyi_machine(struct tcb *tcp, struct sthyi_machine *hdr, uint16_t size,
277+ 		    bool *dummy)
278+ {
279+-	size_t last_decoded = offsetofend(typeof(*hdr), infmpman);
280++	size_t last_decoded = offsetofend(__typeof__(*hdr), infmpman);
281+ 	int cnt_val, name_val, id_val;
282+ 
283+ 	CHECK_SIZE_EX(hdr, last_decoded, size, "machine structure");
284+@@ -611,7 +611,7 @@ static void
285+ print_sthyi_partition(struct tcb *tcp, struct sthyi_partition *hdr,
286+ 		      uint16_t size, bool *mt)
287+ {
288+-	size_t last_decoded = offsetofend(typeof(*hdr), infpabif);
289++	size_t last_decoded = offsetofend(__typeof__(*hdr), infpabif);
290+ 	int cnt_val, wcap_val, acap_val, id_val, lpar_val;
291+ 
292+ 	*mt = false;
293+@@ -802,7 +802,7 @@ static void
294+ print_sthyi_hypervisor(struct tcb *tcp, struct sthyi_hypervisor *hdr,
295+ 		       uint16_t size, int num, bool mt)
296+ {
297+-	size_t last_decoded = offsetofend(typeof(*hdr), infydifl);
298++	size_t last_decoded = offsetofend(__typeof__(*hdr), infydifl);
299+ 
300+ 	CHECK_SIZE_EX(hdr, last_decoded, size, "hypervisor %d structure", num);
301+ 
302+diff --git a/src/tee.c b/src/tee.c
303+index 25f6e76c5..c62566800 100644
304+--- a/src/tee.c
305++++ b/src/tee.c
306+@@ -33,7 +33,7 @@ struct tee_ioctl_shm_register_fd_data {
307+ 
308+ #define TEE_FETCH_BUF_DATA(buf_, arg_, params_) \
309+ 	tee_fetch_buf_data(tcp, arg, &buf_, sizeof(arg_), \
310+-			   &arg_, offsetof(typeof(arg_), num_params), \
311++			   &arg_, offsetof(__typeof__(arg_), num_params), \
312+ 			   params_)
313+ 
314+ /* session id is printed as 0x%x in libteec */
315+diff --git a/src/ubi.c b/src/ubi.c
316+index bd2d2811e..ff9f88cd0 100644
317+--- a/src/ubi.c
318++++ b/src/ubi.c
319+@@ -76,7 +76,7 @@ static bool
320+ print_ubi_rnvol_req_ent_array_member(struct tcb *tcp, void *elem_buf,
321+ 				     size_t elem_size, void *data)
322+ {
323+-	typeof(&((struct ubi_rnvol_req *) NULL)->ents[0]) p = elem_buf;
324++	__typeof__(&((struct ubi_rnvol_req *) NULL)->ents[0]) p = elem_buf;
325+ 
326+ 	tprint_struct_begin();
327+ 	PRINT_FIELD_D(*p, vol_id);
328+diff --git a/tests/btrfs.c b/tests/btrfs.c
329+index d8ef87a96..321d3a25c 100644
330+--- a/tests/btrfs.c
331++++ b/tests/btrfs.c
332+@@ -876,7 +876,7 @@ btrfs_print_tree_search_buf(struct btrfs_ioctl_search_key *key,
333+ 		printf("buf=[");
334+ 		for (uint64_t i = 0; i < key->nr_items; ++i) {
335+ 			struct btrfs_ioctl_search_header *sh;
336+-			sh = (typeof(sh))(buf + off);
337++			sh = (__typeof__(sh))(buf + off);
338+ 			if (i)
339+ 				printf(", ");
340+ 			printf("{transid=%" PRI__u64 ", objectid=",
341+diff --git a/tests/fcntl-common.c b/tests/fcntl-common.c
342+index 20f92dd1d..aa6ecc8f5 100644
343+--- a/tests/fcntl-common.c
344++++ b/tests/fcntl-common.c
345+@@ -28,7 +28,7 @@
346+ #endif
347+ 
348+ #ifdef HAVE_TYPEOF
349+-# define TYPEOF_FLOCK_OFF_T typeof(((struct flock *) NULL)->l_len)
350++# define TYPEOF_FLOCK_OFF_T __typeof__(((struct flock *) NULL)->l_len)
351+ #else
352+ # define TYPEOF_FLOCK_OFF_T off_t
353+ #endif
354+-- 
355+2.37.3
356+
+33, -0
 1@@ -0,0 +1,33 @@
 2+From 0355d08676cdc94354bd35f8d885984938645fb3 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sat, 6 Jul 2019 01:40:36 -0700
 5+Subject: [PATCH] Make tcp_sysent a static inline function
 6+
 7+This way we can include the second operand to the conditional
 8+operator without evaluating the macro argument multiple times.
 9+---
10+ src/defs.h | 8 ++++++--
11+ 1 file changed, 6 insertions(+), 2 deletions(-)
12+
13+diff --git a/src/defs.h b/src/defs.h
14+index d24b11884..60b9e3322 100644
15+--- a/src/defs.h
16++++ b/src/defs.h
17+@@ -398,8 +398,12 @@ struct tcb {
18+ # define syscall_tampered_nofail(tcp) ((tcp)->flags & TCB_TAMPERED_NO_FAIL)
19+ # define has_seccomp_filter(tcp)	((tcp)->flags & TCB_SECCOMP_FILTER)
20+ 
21+-extern const struct_sysent stub_sysent;
22+-# define tcp_sysent(tcp) (tcp->s_ent ?: &stub_sysent)
23++static inline const struct_sysent *
24++tcp_sysent(struct tcb *tcp)
25++{
26++	extern const struct_sysent stub_sysent;
27++	return tcp->s_ent ? tcp->s_ent : &stub_sysent;
28++}
29+ # define n_args(tcp) (tcp_sysent(tcp)->nargs)
30+ 
31+ # include "xlat.h"
32+-- 
33+2.37.3
34+
+229, -0
  1@@ -0,0 +1,229 @@
  2+From 463e94867f84bcb4dc85e18cb4304edea90d8659 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sat, 6 Jul 2019 01:54:05 -0700
  5+Subject: [PATCH] Avoid empty initializer lists
  6+
  7+---
  8+ src/bpf.c               | 4 ++--
  9+ src/futex_waitv.c       | 2 +-
 10+ src/sched.c             | 2 +-
 11+ src/signal.c            | 2 +-
 12+ src/strace.c            | 2 +-
 13+ tests/btrfs.c           | 8 ++++----
 14+ tests/clock_nanosleep.c | 2 +-
 15+ tests/nanosleep.c       | 2 +-
 16+ tests/restart_syscall.c | 2 +-
 17+ tests/setrlimit.c       | 2 +-
 18+ tests/timer_create.c    | 2 +-
 19+ tests/wait4.c           | 2 +-
 20+ tests/waitid.c          | 2 +-
 21+ 13 files changed, 17 insertions(+), 17 deletions(-)
 22+
 23+diff --git a/src/bpf.c b/src/bpf.c
 24+index 1e72f3e30..7a6406687 100644
 25+--- a/src/bpf.c
 26++++ b/src/bpf.c
 27+@@ -48,7 +48,7 @@ bpf_cmd_decoder(struct tcb *const tcp,					\
 28+ #define BEGIN_BPF_CMD_DECODER(bpf_cmd)					\
 29+ 	static DECL_BPF_CMD_DECODER(decode_ ## bpf_cmd)			\
 30+ 	{								\
 31+-		struct bpf_cmd ## _struct attr = {};			\
 32++		struct bpf_cmd ## _struct attr = {0};			\
 33+ 		size_t attr_size = bpf_cmd ## _struct_size;	\
 34+ 		const unsigned int len = MIN(size, attr_size);		\
 35+ 		memcpy(&attr, data, len);				\
 36+@@ -159,7 +159,7 @@ print_ebpf_prog(struct tcb *const tcp, const uint64_t addr, const uint32_t len)
 37+ 	if (abbrev(tcp)) {
 38+ 		printaddr(addr);
 39+ 	} else {
 40+-		struct ebpf_insns_data eid = {};
 41++		struct ebpf_insns_data eid = {0};
 42+ 		struct ebpf_insn insn;
 43+ 
 44+ 		print_array(tcp, addr, len, &insn, sizeof(insn),
 45+diff --git a/src/futex_waitv.c b/src/futex_waitv.c
 46+index 512ee715d..340201aa3 100644
 47+--- a/src/futex_waitv.c
 48++++ b/src/futex_waitv.c
 49+@@ -49,7 +49,7 @@ print_waiter_array(struct tcb * const tcp, const kernel_ulong_t waiters,
 50+ 		   const unsigned int nr_futexes)
 51+ {
 52+ 	struct futex_waitv buf;
 53+-	struct print_waiter_data data = {};
 54++	struct print_waiter_data data = {0};
 55+ 
 56+ 	print_array(tcp, waiters, nr_futexes, &buf, sizeof(buf),
 57+ 		    tfetch_mem, print_waiter, &data);
 58+diff --git a/src/sched.c b/src/sched.c
 59+index 010366871..2dda5b872 100644
 60+--- a/src/sched.c
 61++++ b/src/sched.c
 62+@@ -111,7 +111,7 @@ static void
 63+ print_sched_attr(struct tcb *const tcp, const kernel_ulong_t addr,
 64+ 		 unsigned int usize)
 65+ {
 66+-	struct sched_attr attr = {};
 67++	struct sched_attr attr = {0};
 68+ 	unsigned int size;
 69+ 	bool is_set = false;
 70+ 
 71+diff --git a/src/signal.c b/src/signal.c
 72+index 98f84d500..8680b10fb 100644
 73+--- a/src/signal.c
 74++++ b/src/signal.c
 75+@@ -257,7 +257,7 @@ print_sigset_addr_len_limit(struct tcb *const tcp, const kernel_ulong_t addr,
 76+ 		printaddr(addr);
 77+ 		return;
 78+ 	}
 79+-	int mask[NSIG_BYTES / sizeof(int)] = {};
 80++	int mask[NSIG_BYTES / sizeof(int)] = {0};
 81+ 	if (umoven_or_printaddr(tcp, addr, len, mask))
 82+ 		return;
 83+ 	tprints_string(sprintsigmask_n("", mask, len));
 84+diff --git a/src/strace.c b/src/strace.c
 85+index 5752177b7..9cd4ff461 100644
 86+--- a/src/strace.c
 87++++ b/src/strace.c
 88+@@ -3693,7 +3693,7 @@ trace_syscall(struct tcb *tcp, unsigned int *sig)
 89+ 		syscall_entering_finish(tcp, res);
 90+ 		return res;
 91+ 	} else {
 92+-		struct timespec ts = {};
 93++		struct timespec ts = {0};
 94+ 		int res = syscall_exiting_decode(tcp, &ts);
 95+ 		if (res != 0) {
 96+ 			res = syscall_exiting_trace(tcp, &ts, res);
 97+diff --git a/tests/btrfs.c b/tests/btrfs.c
 98+index 321d3a25c..442377130 100644
 99+--- a/tests/btrfs.c
100++++ b/tests/btrfs.c
101+@@ -313,7 +313,7 @@ btrfs_test_subvol_ioctls(void)
102+ 	char *long_subvol_name;
103+ 	void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeedULL;
104+ 	uint64_t u64val = 0xdeadbeefbadc0dedULL;
105+-	struct btrfs_ioctl_vol_args vol_args = {};
106++	struct btrfs_ioctl_vol_args vol_args = {0};
107+ 	struct btrfs_ioctl_vol_args_v2 vol_args_v2 = {
108+ 		.fd = 2,
109+ 		.flags = max_flags_plus_one(2),
110+@@ -554,7 +554,7 @@ btrfs_test_balance_ioctls(void)
111+ 			.devid = 1,
112+ 		},
113+ 	};
114+-	struct btrfs_ioctl_vol_args vol_args = {};
115++	struct btrfs_ioctl_vol_args vol_args = {0};
116+ 
117+ 	ioctl(-1, BTRFS_IOC_BALANCE_CTL, 1);
118+ 	printf("ioctl(-1, %s, %sBTRFS_BALANCE_CTL_PAUSE%s) = -1 EBADF (%m)\n",
119+@@ -764,7 +764,7 @@ btrfs_print_defrag_range_args(struct btrfs_ioctl_defrag_range_args *args,
120+ static void
121+ btrfs_test_defrag_ioctls(void)
122+ {
123+-	struct btrfs_ioctl_vol_args vol_args = {};
124++	struct btrfs_ioctl_vol_args vol_args = {0};
125+ 	struct btrfs_ioctl_defrag_range_args args = {
126+ 		.start = 0,
127+ 		.len = -1ULL,
128+@@ -1092,7 +1092,7 @@ btrfs_test_ino_lookup_ioctl(void)
129+ static void
130+ btrfs_test_space_info_ioctl(void)
131+ {
132+-	struct btrfs_ioctl_space_args args = {};
133++	struct btrfs_ioctl_space_args args = {0};
134+ 
135+ 	ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL);
136+ 	printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n",
137+diff --git a/tests/clock_nanosleep.c b/tests/clock_nanosleep.c
138+index 51bd0d7f7..a1053fd1e 100644
139+--- a/tests/clock_nanosleep.c
140++++ b/tests/clock_nanosleep.c
141+@@ -39,7 +39,7 @@ main(void)
142+ 		.ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 },
143+ 		.pad = { 0xdeadbeef, 0xbadc0ded }
144+ 	};
145+-	const sigset_t set = {};
146++	const sigset_t set = {0};
147+ 	const struct sigaction act = { .sa_handler = handler };
148+ 	const struct itimerval itv = {
149+ 		.it_interval.tv_usec = 222222,
150+diff --git a/tests/nanosleep.c b/tests/nanosleep.c
151+index 8ff6a86b8..6377f38ee 100644
152+--- a/tests/nanosleep.c
153++++ b/tests/nanosleep.c
154+@@ -53,7 +53,7 @@ main(void)
155+ 		.ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 },
156+ 		.pad = { 0xdeadbeef, 0xbadc0ded }
157+ 	};
158+-	const sigset_t set = {};
159++	const sigset_t set = {0};
160+ 	const struct sigaction act = { .sa_handler = handler };
161+ 	const struct itimerval itv = { .it_value.tv_usec = 111111 };
162+ 
163+diff --git a/tests/restart_syscall.c b/tests/restart_syscall.c
164+index e4e83dc09..da83d1dc7 100644
165+--- a/tests/restart_syscall.c
166++++ b/tests/restart_syscall.c
167+@@ -26,7 +26,7 @@ main(void)
168+ 	 */
169+ 	error_msg_and_skip("x32 is broken");
170+ #else
171+-	const sigset_t set = {};
172++	const sigset_t set = {0};
173+ 	const struct sigaction act = { .sa_handler = SIG_IGN };
174+ 	const struct itimerval itv = { .it_value.tv_usec = 111111 };
175+ 	const struct timespec req = { .tv_nsec = 222222222 };
176+diff --git a/tests/setrlimit.c b/tests/setrlimit.c
177+index d4953f6f8..60d54fbd8 100644
178+--- a/tests/setrlimit.c
179++++ b/tests/setrlimit.c
180+@@ -39,7 +39,7 @@ main(void)
181+ 		printf("setrlimit(%s, NULL) = %s\n", xlat->str, sprintrc(rc));
182+ # endif
183+ 
184+-		struct rlimit libc_rlim = {};
185++		struct rlimit libc_rlim = {0};
186+ 		if (getrlimit((int) res, &libc_rlim))
187+ 			continue;
188+ 		rlimit[0] = libc_rlim.rlim_cur;
189+diff --git a/tests/timer_create.c b/tests/timer_create.c
190+index af91da0d3..a0a79f1ad 100644
191+--- a/tests/timer_create.c
192++++ b/tests/timer_create.c
193+@@ -24,7 +24,7 @@ main(void)
194+ 	printf("timer_create(CLOCK_REALTIME, NULL, NULL) = -1 %s (%m)\n",
195+ 	       errno2name());
196+ 
197+-	int tid[4] = {};
198++	int tid[4] = {0};
199+ 	struct_sigevent sev = {
200+ 		.sigev_notify = 0xdefaced,
201+ 		.sigev_signo = 0xfacefeed,
202+diff --git a/tests/wait4.c b/tests/wait4.c
203+index faf9423f8..eacee2366 100644
204+--- a/tests/wait4.c
205++++ b/tests/wait4.c
206+@@ -89,7 +89,7 @@ k_wait4(const unsigned int pid, void const *wstatus,
207+ static pid_t
208+ do_wait4(pid_t pid, int *wstatus, int options, kernel_rusage_t *ru)
209+ {
210+-	sigset_t mask = {};
211++	sigset_t mask = {0};
212+ 	sigaddset(&mask, SIGCHLD);
213+ 
214+ 	assert(sigprocmask(SIG_BLOCK, &mask, NULL) == 0);
215+diff --git a/tests/waitid.c b/tests/waitid.c
216+index 1ed763840..fef941874 100644
217+--- a/tests/waitid.c
218++++ b/tests/waitid.c
219+@@ -146,7 +146,7 @@ do_waitid(const unsigned int idtype,
220+ 	  const unsigned int options,
221+ 	  const kernel_rusage_t *const rusage)
222+ {
223+-	sigset_t mask = {};
224++	sigset_t mask = {0};
225+ 	sigaddset(&mask, SIGCHLD);
226+ 
227+ 	assert(sigprocmask(SIG_BLOCK, &mask, NULL) == 0);
228+-- 
229+2.37.3
230+
+152, -0
  1@@ -0,0 +1,152 @@
  2+From 989bfd76544b4f62ade9e35d2476332934d27d86 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sun, 7 Jul 2019 21:25:13 -0700
  5+Subject: [PATCH] Avoid pointer arithmetic on `void *`
  6+
  7+---
  8+ src/netlink_smc_diag.c |  4 ++--
  9+ src/print_timespec.h   |  6 ++++--
 10+ src/sockaddr.c         |  4 ++--
 11+ src/tee.c              |  2 +-
 12+ src/ucopy.c            | 12 ++++++------
 13+ 5 files changed, 15 insertions(+), 13 deletions(-)
 14+
 15+diff --git a/src/netlink_smc_diag.c b/src/netlink_smc_diag.c
 16+index f7ff06b6b..dbf5be980 100644
 17+--- a/src/netlink_smc_diag.c
 18++++ b/src/netlink_smc_diag.c
 19+@@ -42,7 +42,7 @@ DECL_NETLINK_DIAG_DECODER(decode_smc_diag_req)
 20+ 	if (len >= sizeof(req)) {
 21+ 		if (!umoven_or_printaddr(tcp, addr + offset,
 22+ 					 sizeof(req) - offset,
 23+-					 (void *) &req + offset)) {
 24++					 (char *) &req + offset)) {
 25+ 			PRINT_FIELD_FLAGS(req, diag_ext,
 26+ 					  smc_diag_extended_flags,
 27+ 					  "1<<SMC_DIAG_\?\?\?-1");
 28+@@ -250,7 +250,7 @@ DECL_NETLINK_DIAG_DECODER(decode_smc_diag_msg)
 29+ 	if (len >= sizeof(msg)) {
 30+ 		if (!umoven_or_printaddr(tcp, addr + offset,
 31+ 					 sizeof(msg) - offset,
 32+-					 (void *) &msg + offset)) {
 33++					 (char *) &msg + offset)) {
 34+ 			PRINT_FIELD_XVAL(msg, diag_state,
 35+ 					 smc_states, "SMC_???");
 36+ 			tprint_struct_next();
 37+diff --git a/src/print_timespec.h b/src/print_timespec.h
 38+index 9603a6bb6..f5f747c42 100644
 39+--- a/src/print_timespec.h
 40++++ b/src/print_timespec.h
 41+@@ -66,6 +66,8 @@ bool
 42+ PRINT_TIMESPEC_ARRAY_DATA_SIZE(const void *arg, const unsigned int nmemb,
 43+ 			       const size_t size)
 44+ {
 45++	const char *ts = arg;
 46++
 47+ 	if (nmemb > size / sizeof(TIMESPEC_T)) {
 48+ 		tprint_unavailable();
 49+ 		return false;
 50+@@ -73,10 +75,10 @@ PRINT_TIMESPEC_ARRAY_DATA_SIZE(const void *arg, const unsigned int nmemb,
 51+ 
 52+ 	tprint_array_begin();
 53+ 
 54+-	for (unsigned int i = 0; i < nmemb; i++, arg += sizeof(TIMESPEC_T)) {
 55++	for (unsigned int i = 0; i < nmemb; i++, ts += sizeof(TIMESPEC_T)) {
 56+ 		if (i)
 57+ 			tprint_array_next();
 58+-		print_unaligned_timespec_t(arg);
 59++		print_unaligned_timespec_t(ts);
 60+ 	}
 61+ 
 62+ 	tprint_array_end();
 63+diff --git a/src/sockaddr.c b/src/sockaddr.c
 64+index 9139da1cd..7126ad2fc 100644
 65+--- a/src/sockaddr.c
 66++++ b/src/sockaddr.c
 67+@@ -583,7 +583,7 @@ print_sockaddr_data_ll(struct tcb *tcp, const void *const buf,
 68+ static void
 69+ print_sockaddr_data_raw(const void *const buf, const int addrlen)
 70+ {
 71+-	const char *const data = buf + SIZEOF_SA_FAMILY;
 72++	const char *const data = (const char *)buf + SIZEOF_SA_FAMILY;
 73+ 	const int datalen = addrlen - SIZEOF_SA_FAMILY;
 74+ 
 75+ 	tprints_field_name("sa_data");
 76+@@ -780,7 +780,7 @@ print_sockaddr_data_rxrpc(struct tcb *tcp, const void *const buf,
 77+ 	tprints_field_name("transport");
 78+ 	tprint_struct_begin();
 79+ 
 80+-	const void *const transport_buf = (void *) &sa->transport
 81++	const void *const transport_buf = (char *) &sa->transport
 82+ 					  + sizeof(sa->transport.family);
 83+ 	const int transport_len = MIN(sa->transport_len,
 84+ 				      len - offsetof(struct sockaddr_rxrpc,
 85+diff --git a/src/tee.c b/src/tee.c
 86+index fc735e0da..f705a7a94 100644
 87+--- a/src/tee.c
 88++++ b/src/tee.c
 89+@@ -69,7 +69,7 @@ tee_fetch_buf_data(struct tcb *const tcp,
 90+ 		tee_print_buf(buf);
 91+ 		return RVAL_IOCTL_DECODED;
 92+ 	}
 93+-	uint32_t *num_params = (uint32_t *) (arg_struct + num_params_offs);
 94++	uint32_t *num_params = (uint32_t *) ((char *)arg_struct + num_params_offs);
 95+ 	if (entering(tcp) &&
 96+ 	    (arg_size + TEE_IOCTL_PARAM_SIZE(*num_params) != buf->buf_len)) {
 97+ 		/*
 98+diff --git a/src/ucopy.c b/src/ucopy.c
 99+index c769a1916..ed401ae74 100644
100+--- a/src/ucopy.c
101++++ b/src/ucopy.c
102+@@ -186,7 +186,7 @@ vm_read_mem(const pid_t pid, void *laddr,
103+ 			break;
104+ 
105+ 		len = next_len;
106+-		laddr += copy_len;
107++		laddr = (char *)laddr + copy_len;
108+ 		page_start += page_size;
109+ 		taddr = page_start;
110+ 	}
111+@@ -282,7 +282,7 @@ umoven_peekdata(const int pid, kernel_ulong_t addr, unsigned int len,
112+ 		memcpy(laddr, &u.data[residue], m);
113+ 		residue = 0;
114+ 		addr += sizeof(long);
115+-		laddr += m;
116++		laddr = (char *)laddr + m;
117+ 		nread += m;
118+ 		len -= m;
119+ 	}
120+@@ -378,10 +378,10 @@ umovestr_peekdata(const int pid, kernel_ulong_t addr, unsigned int len,
121+ 		memcpy(laddr, &u.data[residue], m);
122+ 		while (residue < sizeof(long))
123+ 			if (u.data[residue++] == '\0')
124+-				return (laddr - orig_addr) + residue;
125++				return nread + residue;
126+ 		residue = 0;
127+ 		addr += sizeof(long);
128+-		laddr += m;
129++		laddr = (char *)laddr + m;
130+ 		nread += m;
131+ 		len -= m;
132+ 	}
133+@@ -502,7 +502,7 @@ upoken_pokedata(const int pid, kernel_ulong_t addr, unsigned int len,
134+ 
135+ 		addr += sizeof(long);
136+ 		nwritten += npoke;
137+-		our_addr += npoke;
138++		our_addr = (char *)our_addr + npoke;
139+ 		len -= npoke;
140+ 	}
141+ 
142+@@ -515,7 +515,7 @@ upoken_pokedata(const int pid, kernel_ulong_t addr, unsigned int len,
143+ 
144+ 		addr += sizeof(long);
145+ 		nwritten += sizeof(long);
146+-		our_addr += sizeof(long);
147++		our_addr = (char *)our_addr + sizeof(long);
148+ 		len -= sizeof(long);
149+ 	}
150+ 
151+-- 
152+2.37.3
153+
+38, -0
 1@@ -0,0 +1,38 @@
 2+From f94d470d85911142bff6cb3821079f3ff321edfc Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 7 Jul 2019 21:50:31 -0700
 5+Subject: [PATCH] Avoid empty struct definition
 6+
 7+---
 8+ src/fetch_struct_stat64.c | 8 +-------
 9+ 1 file changed, 1 insertion(+), 7 deletions(-)
10+
11+diff --git a/src/fetch_struct_stat64.c b/src/fetch_struct_stat64.c
12+index b5125d420..b45a48da5 100644
13+--- a/src/fetch_struct_stat64.c
14++++ b/src/fetch_struct_stat64.c
15+@@ -32,12 +32,6 @@
16+ # endif /* HAVE_MX32_STRUCT_STAT64 */
17+ #endif /* MPERS_IS_m32 || MPERS_IS_mx32 */
18+ 
19+-#ifndef HAVE_STRUCT_STAT64
20+-struct stat64 {};
21+-#endif
22+-
23+-typedef struct stat64 struct_stat64;
24+-
25+ #include MPERS_DEFS
26+ 
27+ #include "stat.h"
28+@@ -55,7 +49,7 @@ MPERS_PRINTER_DECL(bool, fetch_struct_stat64,
29+ 		   struct strace_stat *const dst)
30+ {
31+ #ifdef HAVE_STRUCT_STAT64
32+-	struct_stat64 buf;
33++	struct stat64 buf;
34+ 	if (umove_or_printaddr(tcp, addr, &buf))
35+ 		return false;
36+ 
37+-- 
38+2.34.1
39+
+100, -0
  1@@ -0,0 +1,100 @@
  2+From 3b3898e2a370be0489226da973e18176530e267a Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sun, 7 Jul 2019 21:53:16 -0700
  5+Subject: [PATCH] Don't omit second operand to '?' operator
  6+
  7+---
  8+ src/kd_ioctl.c | 2 +-
  9+ src/open.c     | 5 +++--
 10+ src/prctl.c    | 8 ++++----
 11+ src/strace.c   | 6 +++---
 12+ 4 files changed, 11 insertions(+), 10 deletions(-)
 13+
 14+diff --git a/src/kd_ioctl.c b/src/kd_ioctl.c
 15+index ada23d536..fddbd38fb 100644
 16+--- a/src/kd_ioctl.c
 17++++ b/src/kd_ioctl.c
 18+@@ -457,7 +457,7 @@ kd_kbd_str_entry(struct tcb *const tcp, const kernel_ulong_t arg,
 19+ 
 20+ 	if (print_quoted_string((char *) val.kb_string,
 21+ 				MIN(max_strlen,
 22+-				   (unsigned int) ret ?: sizeof(val.kb_string)),
 23++				   ret ? (unsigned int) ret : sizeof(val.kb_string)),
 24+ 				QUOTE_OMIT_TRAILING_0))
 25+ 		tprint_more_data_follows();
 26+ 
 27+diff --git a/src/open.c b/src/open.c
 28+index 6356c5831..df59ea999 100644
 29+--- a/src/open.c
 30++++ b/src/open.c
 31+@@ -88,8 +88,9 @@ sprint_open_modes64(uint64_t flags)
 32+ 	}
 33+ 	*p = '\0';
 34+ 
 35+-	return sprintflags_ex(outstr, open_mode_flags, flags, sep,
 36+-			      XLAT_STYLE_ABBREV) ?: outstr;
 37++	str = sprintflags_ex(outstr, open_mode_flags, flags, sep,
 38++			     XLAT_STYLE_ABBREV);
 39++	return str ? str : outstr;
 40+ }
 41+ 
 42+ const char *
 43+diff --git a/src/prctl.c b/src/prctl.c
 44+index f6b4dd741..951133a83 100644
 45+--- a/src/prctl.c
 46++++ b/src/prctl.c
 47+@@ -92,10 +92,10 @@ sprint_sve_val(kernel_ulong_t arg, bool aux)
 48+ 	if (!aux && flags && xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE)
 49+ 	{
 50+ 		xsprintf(out, "%#" PRI_klx " /* %s%s%#" PRI_klx " */",
 51+-			 arg, flags_str ?: "", flags_str ? "|" : "", vl);
 52++			 arg, flags_str ? flags_str : "", flags_str ? "|" : "", vl);
 53+ 	} else {
 54+ 		xsprintf(out, "%s%s%#" PRI_klx,
 55+-			 flags_str ?: "", flags_str ? "|" : "", vl);
 56++			 flags_str ? flags_str : "", flags_str ? "|" : "", vl);
 57+ 	}
 58+ 
 59+ 	return out;
 60+@@ -128,10 +128,10 @@ sprint_sme_val(kernel_ulong_t arg, bool aux)
 61+ 	if (!aux && flags && xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE)
 62+ 	{
 63+ 		xsprintf(out, "%#" PRI_klx " /* %s%s%#" PRI_klx " */",
 64+-			 arg, flags_str ?: "", flags_str ? "|" : "", vl);
 65++			 arg, flags_str ? flags_str : "", flags_str ? "|" : "", vl);
 66+ 	} else {
 67+ 		xsprintf(out, "%s%s%#" PRI_klx,
 68+-			 flags_str ?: "", flags_str ? "|" : "", vl);
 69++			 flags_str ? flags_str : "", flags_str ? "|" : "", vl);
 70+ 	}
 71+ 
 72+ 	return out;
 73+diff --git a/src/strace.c b/src/strace.c
 74+index 9cd4ff461..4403bd27e 100644
 75+--- a/src/strace.c
 76++++ b/src/strace.c
 77+@@ -2494,7 +2494,7 @@ init(int argc, char *argv[])
 78+ 			break;
 79+ 		case GETOPT_TS:
 80+ 			tflag_long_set = true;
 81+-			if (parse_ts_arg(optarg ?: tflag_str))
 82++			if (parse_ts_arg(optarg ? optarg : tflag_str))
 83+ 				error_opt_arg(c, lopt, optarg);
 84+ 			break;
 85+ 		case 'T':
 86+@@ -2614,10 +2614,10 @@ init(int argc, char *argv[])
 87+ 			qualify_kvm(optarg);
 88+ 			break;
 89+ 		case GETOPT_QUAL_QUIET:
 90+-			qualify_quiet(optarg ?: qflag_qual);
 91++			qualify_quiet(optarg ? optarg : qflag_qual);
 92+ 			break;
 93+ 		case GETOPT_QUAL_DECODE_FD:
 94+-			qualify_decode_fd(optarg ?: yflag_qual);
 95++			qualify_decode_fd(optarg ? optarg : yflag_qual);
 96+ 			break;
 97+ 		case GETOPT_QUAL_DECODE_PID:
 98+ 			qualify_decode_pid(optarg);
 99+-- 
100+2.37.3
101+
+100, -0
  1@@ -0,0 +1,100 @@
  2+From a98e58cc36d6df5935dbedd9e1c2947262b8b67c Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sun, 7 Jul 2019 21:58:46 -0700
  5+Subject: [PATCH] Avoid unnecessary VLAs
  6+
  7+---
  8+ src/count.c       | 2 +-
  9+ src/nlattr.c      | 2 +-
 10+ src/socketutils.c | 4 ++--
 11+ src/syscall.c     | 2 +-
 12+ src/util.c        | 5 ++---
 13+ 5 files changed, 7 insertions(+), 8 deletions(-)
 14+
 15+diff --git a/src/count.c b/src/count.c
 16+index e4f362787..ad203748b 100644
 17+--- a/src/count.c
 18++++ b/src/count.c
 19+@@ -414,7 +414,7 @@ call_summary_pers(FILE *outf)
 20+ 		fprintf(outf, column_fmts[i], (val_), cwidths[c]); \
 21+ 		break
 22+ 
 23+-	const char *column_fmts[last_column + 1];
 24++	const char *column_fmts[ARRAY_SIZE(columns)];
 25+ 	for (size_t i = 0; i <= last_column; ++i) {
 26+ 		const size_t c = columns[i];
 27+ 
 28+diff --git a/src/nlattr.c b/src/nlattr.c
 29+index 1fb394d7c..6f2d54979 100644
 30+--- a/src/nlattr.c
 31++++ b/src/nlattr.c
 32+@@ -357,7 +357,7 @@ decode_nla_hwaddr(struct tcb *const tcp,
 33+ 	if (len > MAX_ADDR_LEN)
 34+ 		return false;
 35+ 
 36+-	uint8_t buf[len];
 37++	uint8_t buf[MAX_ADDR_LEN];
 38+ 	const uintptr_t arphrd = (uintptr_t) opaque_data;
 39+ 
 40+ 	if (!umoven_or_printaddr(tcp, addr, len, buf)) {
 41+diff --git a/src/socketutils.c b/src/socketutils.c
 42+index d3a3b9283..e0079456f 100644
 43+--- a/src/socketutils.c
 44++++ b/src/socketutils.c
 45+@@ -133,7 +133,7 @@ inet_parse_response(const void *const data, const int data_len,
 46+ 			return -1;
 47+ 	}
 48+ 
 49+-	char src_buf[text_size];
 50++	char src_buf[INET6_ADDRSTRLEN];
 51+ 	char *details;
 52+ 
 53+ 	/* open/closing brackets for IPv6 addresses */
 54+@@ -146,7 +146,7 @@ inet_parse_response(const void *const data, const int data_len,
 55+ 
 56+ 	if (diag_msg->id.idiag_dport ||
 57+ 	    memcmp(zero_addr, diag_msg->id.idiag_dst, addr_size)) {
 58+-		char dst_buf[text_size];
 59++		char dst_buf[INET6_ADDRSTRLEN];
 60+ 
 61+ 		if (!inet_ntop(diag_msg->idiag_family, diag_msg->id.idiag_dst,
 62+ 			       dst_buf, text_size))
 63+diff --git a/src/syscall.c b/src/syscall.c
 64+index c636ba37c..687d08bc0 100644
 65+--- a/src/syscall.c
 66++++ b/src/syscall.c
 67+@@ -287,7 +287,7 @@ decode_socket_subcall(struct tcb *tcp)
 68+ 
 69+ 	const kernel_ulong_t scno = SYS_socket_subcall + call;
 70+ 	const unsigned int nargs = sysent[scno].nargs;
 71+-	uint64_t buf[nargs];
 72++	uint64_t buf[MAX_ARGS];
 73+ 
 74+ 	if (umoven(tcp, tcp->u_arg[1], nargs * current_wordsize, buf) < 0)
 75+ 		return;
 76+diff --git a/src/util.c b/src/util.c
 77+index a63d80678..a3bea5b76 100644
 78+--- a/src/util.c
 79++++ b/src/util.c
 80+@@ -556,8 +556,7 @@ enum sock_proto
 81+ getfdproto(struct tcb *tcp, int fd)
 82+ {
 83+ #ifdef HAVE_SYS_XATTR_H
 84+-	size_t bufsize = 256;
 85+-	char buf[bufsize];
 86++	char buf[256];
 87+ 	ssize_t r;
 88+ 	char path[sizeof("/proc/%u/fd/%u") + 2 * sizeof(int)*3];
 89+ 
 90+@@ -565,7 +564,7 @@ getfdproto(struct tcb *tcp, int fd)
 91+ 		return SOCK_PROTO_UNKNOWN;
 92+ 
 93+ 	xsprintf(path, "/proc/%u/fd/%u", get_proc_pid(tcp->pid), fd);
 94+-	r = getxattr(path, "system.sockprotoname", buf, bufsize - 1);
 95++	r = getxattr(path, "system.sockprotoname", buf, sizeof(buf) - 1);
 96+ 	if (r <= 0)
 97+ 		return SOCK_PROTO_UNKNOWN;
 98+ 	else {
 99+-- 
100+2.37.3
101+
+1048, -0
   1@@ -0,0 +1,1048 @@
   2+From 261761aff67c7169b758c4747b3fe7826161ee6d Mon Sep 17 00:00:00 2001
   3+From: Michael Forney <mforney@mforney.org>
   4+Date: Sun, 7 Jul 2019 22:29:34 -0700
   5+Subject: [PATCH] Avoid index ranges and empty initializer lists in syscallent
   6+ arrays
   7+
   8+---
   9+ src/linux/alpha/syscallent.h       | 34 ++++++-------
  10+ src/linux/arm/syscallent.h         |  2 +-
  11+ src/linux/avr32/syscallent.h       |  4 +-
  12+ src/linux/bfin/syscallent.h        |  2 +-
  13+ src/linux/i386/syscallent.h        |  6 +--
  14+ src/linux/m68k/syscallent.h        |  2 +-
  15+ src/linux/microblaze/syscallent.h  |  6 +--
  16+ src/linux/mips/syscallent-compat.h | 46 +++++++++---------
  17+ src/linux/s390/syscallent.h        | 42 ++++++++--------
  18+ src/linux/s390x/syscallent.h       | 78 +++++++++++++++---------------
  19+ src/linux/sh/syscallent.h          | 12 ++---
  20+ src/linux/sh64/syscallent.h        | 18 +++----
  21+ src/linux/xtensa/syscallent.h      | 32 ++++++------
  22+ 13 files changed, 142 insertions(+), 142 deletions(-)
  23+
  24+diff --git a/src/linux/alpha/syscallent.h b/src/linux/alpha/syscallent.h
  25+index 87cbe59bd..88bc0a5a4 100644
  26+--- a/src/linux/alpha/syscallent.h
  27++++ b/src/linux/alpha/syscallent.h
  28+@@ -60,7 +60,7 @@
  29+ [ 50] = { 5,	0,		SEN(printargs),			"osf_setlogin"		}, /* not implemented */
  30+ [ 51] = { 1,	TF,		SEN(acct),			"acct"			},
  31+ [ 52] = { 1,	TS,		SEN(sigpending),		"sigpending"		},
  32+-[ 53] = { },
  33++/* [ 53] - unused */
  34+ [ 54] = { 3,	TD,		SEN(ioctl),			"ioctl"			},
  35+ [ 55] = { 5,	0,		SEN(printargs),			"osf_reboot"		}, /* not implemented */
  36+ [ 56] = { 5,	0,		SEN(printargs),			"osf_revoke"		}, /* not implemented */
  37+@@ -126,7 +126,7 @@
  38+ [116] = { 2,	TCL,		SEN(osf_gettimeofday),		"osf_gettimeofday"	},
  39+ [117] = { 2,	0,		SEN(osf_getrusage),		"osf_getrusage"		},
  40+ [118] = { 5,	TN,		SEN(getsockopt),		"getsockopt"		},
  41+-[119] = { },
  42++/* [119] - unused */
  43+ [120] = { 3,	TD,		SEN(readv),			"readv"			},
  44+ [121] = { 3,	TD,		SEN(writev),			"writev"		},
  45+ [122] = { 2,	TCL,		SEN(osf_settimeofday),		"osf_settimeofday"	},
  46+@@ -158,31 +158,31 @@
  47+ [148] = { 4,	TF,		SEN(quotactl),			"quotactl"		},
  48+ [149] = { 5,	0,		SEN(printargs),			"osf_oldquota"		}, /* not implemented */
  49+ [150] = { 3,	TN,		SEN(getsockname),		"getsockname"		},
  50+-[151 ... 152] = { },
  51++/* [151 ... 152] - unused */
  52+ [153] = { 5,	0,		SEN(printargs),			"osf_pid_block"		}, /* not implemented */
  53+ [154] = { 5,	0,		SEN(printargs),			"osf_pid_unblock"	}, /* not implemented */
  54+-[155] = { },
  55++/* [155] - unused */
  56+ [156] = { 3,	TS,		SEN(sigaction),			"sigaction"		},
  57+ [157] = { 5,	0,		SEN(printargs),			"osf_sigwaitprim"	}, /* not implemented */
  58+ [158] = { 5,	0,		SEN(printargs),			"osf_nfssvc"		}, /* not implemented */
  59+ [159] = { 4,	0,		SEN(printargs),			"osf_getdirentries"	},
  60+ [160] = { 3,	TF|TSF|TSFA,	SEN(osf_statfs),		"osf_statfs"		},
  61+ [161] = { 3,	TD|TFSF|TSFA,	SEN(osf_fstatfs),		"osf_fstatfs"		},
  62+-[162] = { },
  63++/* [162] - unused */
  64+ [163] = { 5,	0,		SEN(printargs),			"osf_asynch_daemon"	}, /* not implemented */
  65+ [164] = { 5,	0,		SEN(printargs),			"osf_getfh"		}, /* not implemented */
  66+ [165] = { 2,	0,		SEN(printargs),			"osf_getdomainname"	},
  67+ [166] = { 2,	0,		SEN(setdomainname),		"setdomainname"		},
  68+-[167 ... 168] = { },
  69++/* [167 ... 168] - unused */
  70+ [169] = { 5,	0,		SEN(printargs),			"osf_exportfs"		}, /* not implemented */
  71+-[170 ... 180] = { },
  72++/* [170 ... 180] - unused */
  73+ [181] = { 5,	0,		SEN(printargs),			"osf_alt_plock"		}, /* not implemented */
  74+-[182 ... 183] = { },
  75++/* [182 ... 183] - unused */
  76+ [184] = { 5,	0,		SEN(printargs),			"osf_getmnt"		}, /* not implemented */
  77+-[185 ... 186] = { },
  78++/* [185 ... 186] - unused */
  79+ [187] = { 5,	0,		SEN(printargs),			"osf_alt_sigpending"	}, /* not implemented */
  80+ [188] = { 5,	0,		SEN(printargs),			"osf_alt_setsid"	}, /* not implemented */
  81+-[189 ... 198] = { },
  82++/* [189 ... 198] - unused */
  83+ [199] = { 4,	0,		SEN(printargs),			"osf_swapon"		},
  84+ [200] = { 3,	TI,		SEN(msgctl),			"msgctl"		},
  85+ [201] = { 2,	TI,		SEN(msgget),			"msgget"		},
  86+@@ -205,7 +205,7 @@
  87+ [218] = { 5,	0,		SEN(printargs),			"osf_signal"		}, /* not implemented */
  88+ [219] = { 5,	0,		SEN(printargs),			"osf_utc_gettime"	}, /* not implemented */
  89+ [220] = { 5,	TCL,		SEN(printargs),			"osf_utc_adjtime"	}, /* not implemented */
  90+-[221] = { },
  91++/* [221] - unused */
  92+ [222] = { 5,	0,		SEN(printargs),			"osf_security"		}, /* not implemented */
  93+ [223] = { 5,	0,		SEN(printargs),			"osf_kloadcall"		}, /* not implemented */
  94+ [224] = { 2,	TF|TST|TSTA,	SEN(printargs),			"osf_stat"		},
  95+@@ -213,7 +213,7 @@
  96+ [226] = { 2,	TD|TFST|TSTA,	SEN(printargs),			"osf_fstat"		},
  97+ [227] = { 3,	TF|TSF|TSFA,	SEN(osf_statfs),		"osf_statfs64"		},
  98+ [228] = { 3,	TD|TFSF|TSFA,	SEN(osf_fstatfs),		"osf_fstatfs64"		},
  99+-[229 ... 232] = { },
 100++/* [229 ... 232] - unused */
 101+ [233] = { 1,	0,		SEN(getpgid),			"getpgid"		},
 102+ [234] = { 1,	0,		SEN(getsid),			"getsid"		},
 103+ [235] = { 2,	TS,		SEN(sigaltstack),		"sigaltstack"		},
 104+@@ -230,7 +230,7 @@
 105+ [246] = { 5,	0,		SEN(printargs),			"osf_ntp_gettime"	}, /* not implemented */
 106+ [247] = { 5,	0,		SEN(printargs),			"osf_pathconf"		}, /* not implemented */
 107+ [248] = { 5,	0,		SEN(printargs),			"osf_fpathconf"		}, /* not implemented */
 108+-[249] = { },
 109++/* [249] - unused */
 110+ [250] = { 5,	0,		SEN(printargs),			"osf_uswitch"		}, /* not implemented */
 111+ [251] = { 2,	0,		SEN(printargs),			"osf_usleep_thread"	},
 112+ [252] = { 5,	0,		SEN(printargs),			"osf_audcntl"		}, /* not implemented */
 113+@@ -243,7 +243,7 @@
 114+ [259] = { 5,	0,		SEN(printargs),			"osf_swapctl"		}, /* not implemented */
 115+ [260] = { 5,	0,		SEN(printargs),			"osf_memcntl"		}, /* not implemented */
 116+ [261] = { 5,	0,		SEN(printargs),			"osf_fdatasync"		}, /* not implemented */
 117+-[262 ... 299] = { },
 118++/* [262 ... 299] - unused */
 119+ [300] = { 2,	0,		SEN(bdflush),			"bdflush"		},
 120+ [301] = { 1,	0,		SEN(printargs),			"sethae"		},
 121+ [302] = { 5,	TF,		SEN(mount),			"mount"			},
 122+@@ -264,7 +264,7 @@
 123+ [317] = { 0,	TM,		SEN(munlockall),		"munlockall"		},
 124+ [318] = { 1,	0,		SEN(sysinfo),			"sysinfo"		},
 125+ [319] = { 1,	0,		SEN(sysctl),			"_sysctl"		},
 126+-[320] = { },
 127++/* [320] - unused */
 128+ [321] = { 1,	TF,		SEN(umount),			"oldumount"		},
 129+ [322] = { 2,	TF,		SEN(swapon),			"swapon"		},
 130+ [323] = { 1,	0,		SEN(times),			"times"			},
 131+@@ -324,7 +324,7 @@
 132+ [377] = { 3,	TD,		SEN(getdents64),		"getdents64"		},
 133+ [378] = { 0,	PU|NF,		SEN(gettid),			"gettid"		},
 134+ [379] = { 3,	TD,		SEN(readahead),			"readahead"		},
 135+-[380] = { },
 136++/* [380] - unused */
 137+ [381] = { 2,	TS|TP,		SEN(tkill),			"tkill"			},
 138+ [382] = { 5,	TF,		SEN(setxattr),			"setxattr"		},
 139+ [383] = { 5,	TF,		SEN(setxattr),			"lsetxattr"		},
 140+@@ -347,7 +347,7 @@
 141+ [400] = { 5,	0,		SEN(io_getevents_time64),	"io_getevents"		},
 142+ [401] = { 3,	0,		SEN(io_submit),			"io_submit"		},
 143+ [402] = { 3,	0,		SEN(io_cancel),			"io_cancel"		},
 144+-[403 ... 404] = { },
 145++/* [403 ... 404] - unused */
 146+ [405] = { 1,	TP|SE,		SEN(exit),			"exit_group"		},
 147+ [406] = { 3,	0,		SEN(lookup_dcookie),		"lookup_dcookie"	},
 148+ [407] = { 1,	TD,		SEN(epoll_create),		"epoll_create"		},
 149+diff --git a/src/linux/arm/syscallent.h b/src/linux/arm/syscallent.h
 150+index 2086308a2..f4d808f2d 100644
 151+--- a/src/linux/arm/syscallent.h
 152++++ b/src/linux/arm/syscallent.h
 153+@@ -433,7 +433,7 @@
 154+  * ARM specific syscalls. Encoded with scno 0x000f00xx.
 155+  * Remapped by shuffle_scno() to be directly after __ARM_NR_cmpxchg.
 156+  */
 157+-[ARM_FIRST_SHUFFLED_SYSCALL+1+0] = { },
 158++/* [ARM_FIRST_SHUFFLED_SYSCALL+1+0] - unused */
 159+ [ARM_FIRST_SHUFFLED_SYSCALL+1+1] = { 0,	0,	SEN(printargs),	"breakpoint"		},
 160+ [ARM_FIRST_SHUFFLED_SYSCALL+1+2] = { 3,	TM,	SEN(printargs),	"cacheflush"		},
 161+ [ARM_FIRST_SHUFFLED_SYSCALL+1+3] = { 0,	0,	SEN(printargs),	"usr26"			},
 162+diff --git a/src/linux/avr32/syscallent.h b/src/linux/avr32/syscallent.h
 163+index 104044e5f..1b3f3c64e 100644
 164+--- a/src/linux/avr32/syscallent.h
 165++++ b/src/linux/avr32/syscallent.h
 166+@@ -228,7 +228,7 @@
 167+ [219] = { 3,	TF|TSF|TSFA,	SEN(statfs64),			"statfs64"		},
 168+ [220] = { 3,	TD|TFSF|TSFA,	SEN(fstatfs64),			"fstatfs64"		},
 169+ [221] = { 3,	TS|TP,		SEN(tgkill),			"tgkill"		},
 170+-[222] = { },
 171++/* [222] - unused */
 172+ [223] = { 2,	TF,		SEN(utimes),			"utimes"		},
 173+ [224] = { 6,	TD,		SEN(fadvise64_64),		"fadvise64_64"		},
 174+ [225] = { 3,	0,		SEN(printargs),			"cacheflush"		},
 175+@@ -288,7 +288,7 @@
 176+ [279] = { 3,	TD|TS,		SEN(signalfd),			"signalfd"		},
 177+ [280] = { 4,	TD,		SEN(timerfd),			"timerfd"		},
 178+ [281] = { 1,	TD,		SEN(eventfd),			"eventfd"		},
 179+-[282] = { },
 180++/* [282] - unused */
 181+ [283] = { 2,	TD,		SEN(setns),			"setns"			},
 182+ [284] = { 5,	TD,		SEN(pread),			"pread64"		},
 183+ [285] = { 5,	TD,		SEN(pwrite),			"pwrite64"		},
 184+diff --git a/src/linux/bfin/syscallent.h b/src/linux/bfin/syscallent.h
 185+index 05720b4f9..abef9f5c6 100644
 186+--- a/src/linux/bfin/syscallent.h
 187++++ b/src/linux/bfin/syscallent.h
 188+@@ -229,7 +229,7 @@
 189+ [219] = { 3,	TM,		SEN(madvise),			"madvise"		},
 190+ [220] = { 3,	TD,		SEN(getdents64),		"getdents64"		},
 191+ [221] = { 3,	TD,		SEN(fcntl64),			"fcntl64"		},
 192+-[222 ... 223] = { },
 193++/* [222 ... 223] - unused */
 194+ [224] = { 0,	PU|NF,		SEN(gettid),			"gettid"		},
 195+ [225] = { 4,	TD,		SEN(readahead),			"readahead"		},
 196+ [226] = { 5,	TF,		SEN(setxattr),			"setxattr"		},
 197+diff --git a/src/linux/i386/syscallent.h b/src/linux/i386/syscallent.h
 198+index 3553a0575..4ae813d43 100644
 199+--- a/src/linux/i386/syscallent.h
 200++++ b/src/linux/i386/syscallent.h
 201+@@ -229,7 +229,7 @@
 202+ [219] = { 3,	TM,		SEN(madvise),			"madvise"		},
 203+ [220] = { 3,	TD,		SEN(getdents64),		"getdents64"		},
 204+ [221] = { 3,	TD,		SEN(fcntl64),			"fcntl64"		},
 205+-[222 ... 223] = { },
 206++/* [222 ... 223] - unused */
 207+ [224] = { 0,	PU|NF,		SEN(gettid),			"gettid"		},
 208+ [225] = { 4,	TD,		SEN(readahead),			"readahead"		},
 209+ [226] = { 5,	TF,		SEN(setxattr),			"setxattr"		},
 210+@@ -257,7 +257,7 @@
 211+ [248] = { 3,	0,		SEN(io_submit),			"io_submit"		},
 212+ [249] = { 3,	0,		SEN(io_cancel),			"io_cancel"		},
 213+ [250] = { 5,	TD,		SEN(fadvise64),			"fadvise64"		},
 214+-[251] = { }, /* sys_set_zone_reclaim */
 215++/* [251] - sys_set_zone_reclaim */
 216+ [252] = { 1,	TP|SE,		SEN(exit),			"exit_group"		},
 217+ [253] = { 4,	0,		SEN(lookup_dcookie),		"lookup_dcookie"	},
 218+ [254] = { 1,	TD,		SEN(epoll_create),		"epoll_create"		},
 219+@@ -291,7 +291,7 @@
 220+ [282] = { 3,	TD,		SEN(mq_getsetattr),		"mq_getsetattr"		},
 221+ [283] = { 4,	0,		SEN(kexec_load),		"kexec_load"		},
 222+ [284] = { 5,	TP,		SEN(waitid),			"waitid"		},
 223+-[285] = { }, /* sys_setaltroot */
 224++/* [285] - sys_setaltroot */
 225+ [286] = { 5,	0,		SEN(add_key),			"add_key"		},
 226+ [287] = { 4,	0,		SEN(request_key),		"request_key"		},
 227+ [288] = { 5,	0,		SEN(keyctl),			"keyctl"		},
 228+diff --git a/src/linux/m68k/syscallent.h b/src/linux/m68k/syscallent.h
 229+index 3abd77b0c..d861832e2 100644
 230+--- a/src/linux/m68k/syscallent.h
 231++++ b/src/linux/m68k/syscallent.h
 232+@@ -225,7 +225,7 @@
 233+ [215] = { 1,	TC|NF,		SEN(setfsuid),			"setfsuid32"		},
 234+ [216] = { 1,	TC|NF,		SEN(setfsgid),			"setfsgid32"		},
 235+ [217] = { 2,	TF,		SEN(pivotroot),			"pivot_root"		},
 236+-[218 ... 219] = { },
 237++/* [218 ... 219] - unused */
 238+ [220] = { 3,	TD,		SEN(getdents64),		"getdents64"		},
 239+ [221] = { 0,	PU|NF,		SEN(gettid),			"gettid"		},
 240+ [222] = { 2,	TS|TP,		SEN(tkill),			"tkill"			},
 241+diff --git a/src/linux/microblaze/syscallent.h b/src/linux/microblaze/syscallent.h
 242+index 15ca048ca..7c86c2d07 100644
 243+--- a/src/linux/microblaze/syscallent.h
 244++++ b/src/linux/microblaze/syscallent.h
 245+@@ -229,7 +229,7 @@
 246+ [219] = { 3,	TM,		SEN(madvise),			"madvise"		},
 247+ [220] = { 3,	TD,		SEN(getdents64),		"getdents64"		},
 248+ [221] = { 3,	TD,		SEN(fcntl64),			"fcntl64"		},
 249+-[222 ... 223] = { },
 250++/* [222 ... 223] - unused */
 251+ [224] = { 0,	PU|NF,		SEN(gettid),			"gettid"		},
 252+ [225] = { 4,	TD,		SEN(readahead),			"readahead"		},
 253+ [226] = { 5,	TF,		SEN(setxattr),			"setxattr"		},
 254+@@ -257,7 +257,7 @@
 255+ [248] = { 3,	0,		SEN(io_submit),			"io_submit"		},
 256+ [249] = { 3,	0,		SEN(io_cancel),			"io_cancel"		},
 257+ [250] = { 5,	TD,		SEN(fadvise64),			"fadvise64"		},
 258+-[251] = { },
 259++/* [251] - unused */
 260+ [252] = { 1,	TP|SE,		SEN(exit),			"exit_group"		},
 261+ [253] = { 4,	0,		SEN(lookup_dcookie),		"lookup_dcookie"	},
 262+ [254] = { 1,	TD,		SEN(epoll_create),		"epoll_create"		},
 263+@@ -291,7 +291,7 @@
 264+ [282] = { 3,	TD,		SEN(mq_getsetattr),		"mq_getsetattr"		},
 265+ [283] = { 4,	0,		SEN(kexec_load),		"kexec_load"		},
 266+ [284] = { 5,	TP,		SEN(waitid),			"waitid"		},
 267+-[285] = { },
 268++/* [285] - unused */
 269+ [286] = { 5,	0,		SEN(add_key),			"add_key"		},
 270+ [287] = { 4,	0,		SEN(request_key),		"request_key"		},
 271+ [288] = { 5,	0,		SEN(keyctl),			"keyctl"		},
 272+diff --git a/src/linux/mips/syscallent-compat.h b/src/linux/mips/syscallent-compat.h
 273+index 29cc42632..b1274f890 100644
 274+--- a/src/linux/mips/syscallent-compat.h
 275++++ b/src/linux/mips/syscallent-compat.h
 276+@@ -69,13 +69,13 @@
 277+ [  61] = { 0,	0,	SEN(printargs),		"svr4_chroot"	},
 278+ [  62] = { 0,	0,	SEN(printargs),		"svr4_fcntl"	},
 279+ [  63] = { 0,	0,	SEN(printargs),		"svr4_ulimit"	},
 280+-[64 ... 69] = { },
 281++/* [64 ... 69] - unused */
 282+ [  70] = { 0,	0,	SEN(printargs),		"svr4_advfs"	},
 283+ [  71] = { 0,	0,	SEN(printargs),		"svr4_unadvfs"	},
 284+-[  72] = { },
 285+-[  73] = { },
 286++/* [  72] - unused */
 287++/* [  73] - unused */
 288+ [  74] = { 0,	0,	SEN(printargs),		"svr4_rfstart"	},
 289+-[  75] = { },
 290++/* [  75] - unused */
 291+ [  76] = { 0,	0,	SEN(printargs),		"svr4_rdebug"	},
 292+ [  77] = { 0,	0,	SEN(printargs),		"svr4_rfstop"	},
 293+ [  78] = { 0,	0,	SEN(printargs),		"svr4_rfsys"	},
 294+@@ -105,7 +105,7 @@
 295+ [ 102] = { 0,	0,	SEN(printargs),		"svr4_evtrapret"	},
 296+ [ 103] = { 0,	TF|TSF|TSFA,SEN(printargs),		"svr4_statvfs"	},
 297+ [ 104] = { 0,	TD|TFSF|TSFA,SEN(printargs),		"svr4_fstatvfs"	},
 298+-[ 105] = { },
 299++/* [ 105] - unused */
 300+ [ 106] = { 0,	0,	SEN(printargs),		"svr4_nfssys"	},
 301+ [ 107] = { 0,	0,	SEN(printargs),		"svr4_waitid"	},
 302+ [ 108] = { 0,	0,	SEN(printargs),		"svr4_sigsendset"	},
 303+@@ -140,13 +140,13 @@
 304+ [ 137] = { 0,	0,	SEN(printargs),		"svr4_sysconf"	},
 305+ [ 138] = { 0,	TCL,	SEN(printargs),		"svr4_adjtime"	},
 306+ [ 139] = { 0,	0,	SEN(printargs),		"svr4_sysinfo"	},
 307+-[ 140] = { },
 308++/* [ 140] - unused */
 309+ [ 141] = { 0,	TC,	SEN(printargs),		"svr4_seteuid"	},
 310+ [ 142] = { 0,	0,	SEN(printargs),		"svr4_PYRAMID_statis"	},
 311+ [ 143] = { 0,	0,	SEN(printargs),		"svr4_PYRAMID_tuning"	},
 312+ [ 144] = { 0,	0,	SEN(printargs),		"svr4_PYRAMID_forcerr"	},
 313+ [ 145] = { 0,	0,	SEN(printargs),		"svr4_PYRAMID_mpcntl"	},
 314+-[146 ... 200] = { },
 315++/* [146 ... 200] - unused */
 316+ [ 201] = { 0,	0,	SEN(printargs),		"svr4_aread"	},
 317+ [ 202] = { 0,	0,	SEN(printargs),		"svr4_awrite"	},
 318+ [ 203] = { 0,	0,	SEN(printargs),		"svr4_listio"	},
 319+@@ -214,13 +214,13 @@
 320+ [1055] = { 0,	0,	SEN(printargs),		"sysv_uadmin"	},
 321+ [1056] = { 0,	0,	SEN(printargs),		"sysv_sysmp"	},
 322+ [1057] = { 0,	0,	SEN(printargs),		"sysv_utssys"	},
 323+-[1058] = { },
 324++/* [1058] - unused */
 325+ [1059] = { 0,	0,	SEN(printargs),		"sysv_execve"	},
 326+ [1060] = { 0,	0,	SEN(printargs),		"sysv_umask"	},
 327+ [1061] = { 0,	0,	SEN(printargs),		"sysv_chroot"	},
 328+ [1062] = { 0,	0,	SEN(printargs),		"sysv_fcntl"	},
 329+ [1063] = { 0,	0,	SEN(printargs),		"sysv_ulimit"	},
 330+-[1064 ... 1069] = { },
 331++/* [1064 ... 1069] - unused */
 332+ [1070] = { 0,	0,	SEN(printargs),		"sysv_advfs"	},
 333+ [1071] = { 0,	0,	SEN(printargs),		"sysv_unadvfs"	},
 334+ [1072] = { 0,	0,	SEN(printargs),		"sysv_rmount"	},
 335+@@ -390,8 +390,8 @@
 336+ [2046] = { 0,	TC,	SEN(printargs),		"bsd43_setgid"	},
 337+ [2047] = { 0,	TC,	SEN(printargs),		"bsd43_getgid"	},
 338+ [2048] = { 0,	0,	SEN(printargs),		"bsd43_ssig"	},
 339+-[2049] = { },
 340+-[2050] = { },
 341++/* [2049] - unused */
 342++/* [2050] - unused */
 343+ [2051] = { 0,	0,	SEN(printargs),		"bsd43_sysacct"	},
 344+ [2052] = { 0,	0,	SEN(printargs),		"bsd43_phys"	},
 345+ [2053] = { 0,	0,	SEN(printargs),		"bsd43_lock"	},
 346+@@ -404,7 +404,7 @@
 347+ [2060] = { 0,	0,	SEN(printargs),		"bsd43_umask"	},
 348+ [2061] = { 0,	0,	SEN(printargs),		"bsd43_chroot"	},
 349+ [2062] = { 0,	TD|TFST|TSTA,SEN(printargs),		"bsd43_fstat"	},
 350+-[2063] = { },
 351++/* [2063] - unused */
 352+ [2064] = { 0,	0,	SEN(printargs),		"bsd43_getpagesize"	},
 353+ [2065] = { 0,	TM|SI,	SEN(printargs),		"bsd43_mremap"	},
 354+ [2066] = { 0,	0,	SEN(printargs),		"bsd43_vfork"	},
 355+@@ -460,7 +460,7 @@
 356+ [2116] = { 0,	TCL,	SEN(printargs),		"bsd43_gettimeofday"	},
 357+ [2117] = { 0,	0,	SEN(printargs),		"bsd43_getrusage"	},
 358+ [2118] = { 0,	0,	SEN(printargs),		"bsd43_getsockopt"	},
 359+-[2119] = { },
 360++/* [2119] - unused */
 361+ [2120] = { 0,	0,	SEN(printargs),		"bsd43_readv"	},
 362+ [2121] = { 0,	0,	SEN(printargs),		"bsd43_writev"	},
 363+ [2122] = { 0,	TCL,	SEN(printargs),		"bsd43_settimeofday"	},
 364+@@ -496,8 +496,8 @@
 365+ [2152] = { 0,	0,	SEN(printargs),		"bsd43_cacheflush"	},
 366+ [2153] = { 0,	0,	SEN(printargs),		"bsd43_cachectl"	},
 367+ [2154] = { 0,	0,	SEN(printargs),		"bsd43_debug"	},
 368+-[2155] = { },
 369+-[2156] = { },
 370++/* [2155] - unused */
 371++/* [2156] - unused */
 372+ [2157] = { 0,	0,	SEN(printargs),		"bsd43_nfs_mount"	},
 373+ [2158] = { 0,	0,	SEN(printargs),		"bsd43_nfs_svc"	},
 374+ [2159] = { 0,	0,	SEN(printargs),		"bsd43_getdirentries"	},
 375+@@ -518,8 +518,8 @@
 376+ [2174] = { 0,	0,	SEN(printargs),		"bsd43_libattach"	},
 377+ [2175] = { 0,	0,	SEN(printargs),		"bsd43_libdetach"	},
 378+ [2176] = { 0,	0,	SEN(printargs),		"bsd43_accept"	},
 379+-[2177] = { },
 380+-[2178] = { },
 381++/* [2177] - unused */
 382++/* [2178] - unused */
 383+ [2179] = { 0,	0,	SEN(printargs),		"bsd43_recvmsg"	},
 384+ [2180] = { 0,	0,	SEN(printargs),		"bsd43_recvfrom"	},
 385+ [2181] = { 0,	0,	SEN(printargs),		"bsd43_sendmsg"	},
 386+@@ -592,19 +592,19 @@
 387+ [3055] = { 0,	0,	SEN(printargs),		"posix_uadmin"	},
 388+ [3056] = { 0,	0,	SEN(printargs),		"posix_exch"	},
 389+ [3057] = { 0,	0,	SEN(printargs),		"posix_utssys"	},
 390+-[3058] = { },
 391++/* [3058] - unused */
 392+ [3059] = { 0,	0,	SEN(printargs),		"posix_exece"	},
 393+ [3060] = { 0,	0,	SEN(printargs),		"posix_umask"	},
 394+ [3061] = { 0,	0,	SEN(printargs),		"posix_chroot"	},
 395+ [3062] = { 0,	0,	SEN(printargs),		"posix_fcntl"	},
 396+ [3063] = { 0,	0,	SEN(printargs),		"posix_ulimit"	},
 397+-[3064 ... 3069] = { },
 398++/* [3064 ... 3069] - unused */
 399+ [3070] = { 0,	0,	SEN(printargs),		"posix_advfs"	},
 400+ [3071] = { 0,	0,	SEN(printargs),		"posix_unadvfs"	},
 401+ [3072] = { 0,	0,	SEN(printargs),		"posix_rmount"	},
 402+ [3073] = { 0,	0,	SEN(printargs),		"posix_rumount"	},
 403+ [3074] = { 0,	0,	SEN(printargs),		"posix_rfstart"	},
 404+-[3075] = { },
 405++/* [3075] - unused */
 406+ [3076] = { 0,	0,	SEN(printargs),		"posix_rdebug"	},
 407+ [3077] = { 0,	0,	SEN(printargs),		"posix_rfstop"	},
 408+ [3078] = { 0,	0,	SEN(printargs),		"posix_rfsys"	},
 409+@@ -661,7 +661,7 @@
 410+ [3129] = { 0,	0,	SEN(printargs),		"posix_SGI_sproc"	},
 411+ [3130] = { 0,	0,	SEN(printargs),		"posix_SGI_prctl"	},
 412+ [3131] = { 0,	0,	SEN(printargs),		"posix_SGI_blkproc"	},
 413+-[3132] = { },
 414++/* [3132] - unused */
 415+ [3133] = { 0,	0,	SEN(printargs),		"posix_SGI_sgigsc"	},
 416+ [3134] = { 0,	TD|TM|SI,	SEN(printargs),		"posix_SGI_mmap"	},
 417+ [3135] = { 0,	TM|SI,	SEN(printargs),		"posix_SGI_munmap"	},
 418+@@ -674,7 +674,7 @@
 419+ [3142] = { 0,	0,	SEN(printargs),		"posix_SGI_libdetach"	},
 420+ [3143] = { 0,	0,	SEN(printargs),		"posix_SGI_getpgrp"	},
 421+ [3144] = { 0,	0,	SEN(printargs),		"posix_SGI_setpgrp"	},
 422+-[3145 ... 3149] = { },
 423++/* [3145 ... 3149] - unused */
 424+ [3150] = { 0,	0,	SEN(printargs),		"posix_cacheflush"	},
 425+ [3151] = { 0,	0,	SEN(printargs),		"posix_cachectl"	},
 426+ [3152] = { 0,	0,	SEN(printargs),		"posix_fchown"	},
 427+@@ -695,7 +695,7 @@
 428+ [3167] = { 0,	0,	SEN(printargs),		"posix_setrlimit"	},
 429+ [3168] = { 0,	0,	SEN(printargs),		"posix_waitpid"	},
 430+ [3169] = { 0,	0,	SEN(printargs),		"posix_dup2"	},
 431+-[3170 ... 3259] = { },
 432++/* [3170 ... 3259] - unused */
 433+ [3260] = { 0,	0,	SEN(printargs),		"posix_netboot"	},
 434+ [3261] = { 0,	0,	SEN(printargs),		"posix_netunboot"	},
 435+ [3262] = { 0,	0,	SEN(printargs),		"posix_rdump"	},
 436+diff --git a/src/linux/s390/syscallent.h b/src/linux/s390/syscallent.h
 437+index a808c7b5b..8f7a0aca0 100644
 438+--- a/src/linux/s390/syscallent.h
 439++++ b/src/linux/s390/syscallent.h
 440+@@ -26,8 +26,8 @@
 441+ [ 14] = { 3,	TF,		SEN(mknod),			"mknod"			},
 442+ [ 15] = { 2,	TF,		SEN(chmod),			"chmod"			},
 443+ [ 16] = { 3,	TF,		SEN(chown16),			"lchown"		},
 444+-[ 17] = { },
 445+-[ 18] = { },
 446++/* [ 17] - unused */
 447++/* [ 18] - unused */
 448+ [ 19] = { 3,	TD,		SEN(lseek),			"lseek"			},
 449+ [ 20] = { 0,	PU|NF,		SEN(getpid),			"getpid"		},
 450+ [ 21] = { 5,	TF,		SEN(mount),			"mount"			},
 451+@@ -37,14 +37,14 @@
 452+ [ 25] = { 1,	0,		SEN(stime),			"stime"			},
 453+ [ 26] = { 4,	0,		SEN(ptrace),			"ptrace"		},
 454+ [ 27] = { 1,	0,		SEN(alarm),			"alarm"			},
 455+-[ 28] = { },
 456++/* [ 28] - unused */
 457+ [ 29] = { 0,	TS,		SEN(pause),			"pause"			},
 458+ [ 30] = { 2,	TF,		SEN(utime),			"utime"			},
 459+-[ 31] = { },
 460+-[ 32] = { },
 461++/* [ 31] - unused */
 462++/* [ 32] - unused */
 463+ [ 33] = { 2,	TF,		SEN(access),			"access"		},
 464+ [ 34] = { 1,	0,		SEN(nice),			"nice"			},
 465+-[ 35] = { },
 466++/* [ 35] - unused */
 467+ [ 36] = { 0,	0,		SEN(sync),			"sync"			},
 468+ [ 37] = { 2,	TS|TP,		SEN(kill),			"kill"			},
 469+ [ 38] = { 2,	TF,		SEN(rename),			"rename"		},
 470+@@ -53,7 +53,7 @@
 471+ [ 41] = { 1,	TD,		SEN(dup),			"dup"			},
 472+ [ 42] = { 1,	TD,		SEN(pipe),			"pipe"			},
 473+ [ 43] = { 1,	0,		SEN(times),			"times"			},
 474+-[ 44] = { },
 475++/* [ 44] - unused */
 476+ [ 45] = { 1,	TM|SI,		SEN(brk),			"brk"			},
 477+ [ 46] = { 1,	TC,		SEN(setgid16),			"setgid"		},
 478+ [ 47] = { 0,	TC|PU|NF,	SEN(getgid16),			"getgid"		},
 479+@@ -62,13 +62,13 @@
 480+ [ 50] = { 0,	TC|PU|NF,	SEN(getegid16),			"getegid"		},
 481+ [ 51] = { 1,	TF,		SEN(acct),			"acct"			},
 482+ [ 52] = { 2,	TF,		SEN(umount2),			"umount2"		},
 483+-[ 53] = { },
 484++/* [ 53] - unused */
 485+ [ 54] = { 3,	TD,		SEN(ioctl),			"ioctl"			},
 486+ [ 55] = { 3,	TD,		SEN(fcntl),			"fcntl"			},
 487+-[ 56] = { },
 488++/* [ 56] - unused */
 489+ [ 57] = { 2,	0,		SEN(setpgid),			"setpgid"		},
 490+-[ 58] = { },
 491+-[ 59] = { },
 492++/* [ 58] - unused */
 493++/* [ 59] - unused */
 494+ [ 60] = { 1,	NF,		SEN(umask),			"umask"			},
 495+ [ 61] = { 1,	TF,		SEN(chroot),			"chroot"		},
 496+ [ 62] = { 2,	TSFA,		SEN(ustat),			"ustat"			},
 497+@@ -77,8 +77,8 @@
 498+ [ 65] = { 0,	PU|NF,		SEN(getpgrp),			"getpgrp"		},
 499+ [ 66] = { 0,	0,		SEN(setsid),			"setsid"		},
 500+ [ 67] = { 3,	TS,		SEN(sigaction),			"sigaction"		},
 501+-[ 68] = { },
 502+-[ 69] = { },
 503++/* [ 68] - unused */
 504++/* [ 69] - unused */
 505+ [ 70] = { 2,	TC,		SEN(setreuid16),		"setreuid"		},
 506+ [ 71] = { 2,	TC,		SEN(setregid16),		"setregid"		},
 507+ [ 72] = { 3,	TS,		SEN(sigsuspend),		"sigsuspend"		},
 508+@@ -91,9 +91,9 @@
 509+ [ 79] = { 2,	TCL,		SEN(settimeofday),		"settimeofday"		},
 510+ [ 80] = { 2,	TC,		SEN(getgroups16),		"getgroups"		},
 511+ [ 81] = { 2,	TC,		SEN(setgroups16),		"setgroups"		},
 512+-[ 82] = { },
 513++/* [ 82] - unused */
 514+ [ 83] = { 2,	TF,		SEN(symlink),			"symlink"		},
 515+-[ 84] = { },
 516++/* [ 84] - unused */
 517+ [ 85] = { 3,	TF,		SEN(readlink),			"readlink"		},
 518+ [ 86] = { 1,	TF,		SEN(uselib),			"uselib"		},
 519+ [ 87] = { 2,	TF,		SEN(swapon),			"swapon"		},
 520+@@ -107,7 +107,7 @@
 521+ [ 95] = { 3,	TD,		SEN(fchown16),			"fchown"		},
 522+ [ 96] = { 2,	0,		SEN(getpriority),		"getpriority"		},
 523+ [ 97] = { 3,	0,		SEN(setpriority),		"setpriority"		},
 524+-[ 98] = { },
 525++/* [ 98] - unused */
 526+ [ 99] = { 2,	TF|TSF|TSFA,	SEN(statfs),			"statfs"		},
 527+ [100] = { 2,	TD|TFSF|TSFA,	SEN(fstatfs),			"fstatfs"		},
 528+ [101] = { 3,	0,		SEN(ioperm),			"ioperm"		},
 529+@@ -118,11 +118,11 @@
 530+ [106] = { 2,	TF|TST|TSTA,	SEN(stat),			"stat"			},
 531+ [107] = { 2,	TF|TLST|TSTA,	SEN(lstat),			"lstat"			},
 532+ [108] = { 2,	TD|TFST|TSTA,	SEN(fstat),			"fstat"			},
 533+-[109] = { },
 534++/* [109] - unused */
 535+ [110] = { 4,	0,		SEN(lookup_dcookie),		"lookup_dcookie"	},
 536+ [111] = { 0,	0,		SEN(vhangup),			"vhangup"		},
 537+ [112] = { 0,	0,		SEN(idle),			"idle"			},
 538+-[113] = { },
 539++/* [113] - unused */
 540+ [114] = { 4,	TP,		SEN(wait4),			"wait4"			},
 541+ [115] = { 1,	TF,		SEN(swapoff),			"swapoff"		},
 542+ [116] = { 1,	0,		SEN(sysinfo),			"sysinfo"		},
 543+@@ -132,7 +132,7 @@
 544+ [120] = { 5,	TP,		SEN(clone),			"clone"			},
 545+ [121] = { 2,	0,		SEN(setdomainname),		"setdomainname"		},
 546+ [122] = { 1,	0,		SEN(uname),			"uname"			},
 547+-[123] = { },
 548++/* [123] - unused */
 549+ [124] = { 1,	TCL,		SEN(adjtimex32),		"adjtimex"		},
 550+ [125] = { 3,	TM|SI,		SEN(mprotect),			"mprotect"		},
 551+ [126] = { 3,	TS,		SEN(sigprocmask),		"sigprocmask"		},
 552+@@ -175,7 +175,7 @@
 553+ [163] = { 5,	TM|SI,		SEN(mremap),			"mremap"		},
 554+ [164] = { 3,	TC,		SEN(setresuid16),		"setresuid"		},
 555+ [165] = { 3,	TC,		SEN(getresuid16),		"getresuid"		},
 556+-[166] = { },
 557++/* [166] - unused */
 558+ [167] = { 5,	0,		SEN(query_module),		"query_module"		},
 559+ [168] = { 3,	TD,		SEN(poll_time32),		"poll"			},
 560+ [169] = { 3,	0,		SEN(nfsservctl),		"nfsservctl"		},
 561+@@ -251,7 +251,7 @@
 562+ [239] = { 3,	0,		SEN(sched_setaffinity),		"sched_setaffinity"	},
 563+ [240] = { 3,	0,		SEN(sched_getaffinity),		"sched_getaffinity"	},
 564+ [241] = { 3,	TS|TP,		SEN(tgkill),			"tgkill"		},
 565+-[242] = { },
 566++/* [242] - unused */
 567+ [243] = { 2,	TM,		SEN(io_setup),			"io_setup"		},
 568+ [244] = { 1,	TM,		SEN(io_destroy),		"io_destroy"		},
 569+ [245] = { 5,	0,		SEN(io_getevents_time32),	"io_getevents"		},
 570+diff --git a/src/linux/s390x/syscallent.h b/src/linux/s390x/syscallent.h
 571+index 90bf993b7..8c03af9d9 100644
 572+--- a/src/linux/s390x/syscallent.h
 573++++ b/src/linux/s390x/syscallent.h
 574+@@ -21,29 +21,29 @@
 575+ [ 10] = { 1,	TF,		SEN(unlink),			"unlink"		},
 576+ [ 11] = { 3,	CC|TF|TP|TSD|SE|SI,	SEN(execve),			"execve"		},
 577+ [ 12] = { 1,	TF,		SEN(chdir),			"chdir"			},
 578+-[ 13] = { },
 579++/* [ 13] - unused */
 580+ [ 14] = { 3,	TF,		SEN(mknod),			"mknod"			},
 581+ [ 15] = { 2,	TF,		SEN(chmod),			"chmod"			},
 582+-[ 16] = { },
 583+-[ 17] = { },
 584+-[ 18] = { },
 585++/* [ 16] - unused */
 586++/* [ 17] - unused */
 587++/* [ 18] - unused */
 588+ [ 19] = { 3,	TD,		SEN(lseek),			"lseek"			},
 589+ [ 20] = { 0,	PU|NF,		SEN(getpid),			"getpid"		},
 590+ [ 21] = { 5,	TF,		SEN(mount),			"mount"			},
 591+ [ 22] = { 1,	TF,		SEN(umount),			"umount"		},
 592+-[ 23] = { },
 593+-[ 24] = { },
 594+-[ 25] = { },
 595++/* [ 23] - unused */
 596++/* [ 24] - unused */
 597++/* [ 25] - unused */
 598+ [ 26] = { 4,	0,		SEN(ptrace),			"ptrace"		},
 599+ [ 27] = { 1,	0,		SEN(alarm),			"alarm"			},
 600+-[ 28] = { },
 601++/* [ 28] - unused */
 602+ [ 29] = { 0,	TS,		SEN(pause),			"pause"			},
 603+ [ 30] = { 2,	TF,		SEN(utime),			"utime"			},
 604+-[ 31] = { },
 605+-[ 32] = { },
 606++/* [ 31] - unused */
 607++/* [ 32] - unused */
 608+ [ 33] = { 2,	TF,		SEN(access),			"access"		},
 609+ [ 34] = { 1,	0,		SEN(nice),			"nice"			},
 610+-[ 35] = { },
 611++/* [ 35] - unused */
 612+ [ 36] = { 0,	0,		SEN(sync),			"sync"			},
 613+ [ 37] = { 2,	TS|TP,		SEN(kill),			"kill"			},
 614+ [ 38] = { 2,	TF,		SEN(rename),			"rename"		},
 615+@@ -52,22 +52,22 @@
 616+ [ 41] = { 1,	TD,		SEN(dup),			"dup"			},
 617+ [ 42] = { 1,	TD,		SEN(pipe),			"pipe"			},
 618+ [ 43] = { 1,	0,		SEN(times),			"times"			},
 619+-[ 44] = { },
 620++/* [ 44] - unused */
 621+ [ 45] = { 1,	TM|SI,		SEN(brk),			"brk"			},
 622+-[ 46] = { },
 623+-[ 47] = { },
 624++/* [ 46] - unused */
 625++/* [ 47] - unused */
 626+ [ 48] = { 2,	TS,		SEN(signal),			"signal"		},
 627+-[ 49] = { },
 628+-[ 50] = { },
 629++/* [ 49] - unused */
 630++/* [ 50] - unused */
 631+ [ 51] = { 1,	TF,		SEN(acct),			"acct"			},
 632+ [ 52] = { 2,	TF,		SEN(umount2),			"umount2"		},
 633+-[ 53] = { },
 634++/* [ 53] - unused */
 635+ [ 54] = { 3,	TD,		SEN(ioctl),			"ioctl"			},
 636+ [ 55] = { 3,	TD,		SEN(fcntl),			"fcntl"			},
 637+-[ 56] = { },
 638++/* [ 56] - unused */
 639+ [ 57] = { 2,	0,		SEN(setpgid),			"setpgid"		},
 640+-[ 58] = { },
 641+-[ 59] = { },
 642++/* [ 58] - unused */
 643++/* [ 59] - unused */
 644+ [ 60] = { 1,	NF,		SEN(umask),			"umask"			},
 645+ [ 61] = { 1,	TF,		SEN(chroot),			"chroot"		},
 646+ [ 62] = { 2,	TSFA,		SEN(ustat),			"ustat"			},
 647+@@ -76,18 +76,18 @@
 648+ [ 65] = { 0,	PU|NF,		SEN(getpgrp),			"getpgrp"		},
 649+ [ 66] = { 0,	0,		SEN(setsid),			"setsid"		},
 650+ [ 67] = { 3,	TS,		SEN(sigaction),			"sigaction"		},
 651+-[ 68 ... 71] = { },
 652++/* [ 68 ... 71] - unused */
 653+ [ 72] = { 3,	TS,		SEN(sigsuspend),		"sigsuspend"		},
 654+ [ 73] = { 1,	TS,		SEN(sigpending),		"sigpending"		},
 655+ [ 74] = { 2,	0,		SEN(sethostname),		"sethostname"		},
 656+ [ 75] = { 2,	0,		SEN(setrlimit),			"setrlimit"		},
 657+-[ 76] = { },
 658++/* [ 76] - unused */
 659+ [ 77] = { 2,	0,		SEN(getrusage),			"getrusage"		},
 660+ [ 78] = { 2,	TCL,		SEN(gettimeofday),		"gettimeofday"		},
 661+ [ 79] = { 2,	TCL,		SEN(settimeofday),		"settimeofday"		},
 662+-[ 80 ... 82] = { },
 663++/* [ 80 ... 82] - unused */
 664+ [ 83] = { 2,	TF,		SEN(symlink),			"symlink"		},
 665+-[ 84] = { },
 666++/* [ 84] - unused */
 667+ [ 85] = { 3,	TF,		SEN(readlink),			"readlink"		},
 668+ [ 86] = { 1,	TF,		SEN(uselib),			"uselib"		},
 669+ [ 87] = { 2,	TF,		SEN(swapon),			"swapon"		},
 670+@@ -98,13 +98,13 @@
 671+ [ 92] = { 2,	TF,		SEN(truncate),			"truncate"		},
 672+ [ 93] = { 2,	TD,		SEN(ftruncate),			"ftruncate"		},
 673+ [ 94] = { 2,	TD,		SEN(fchmod),			"fchmod"		},
 674+-[ 95] = { },
 675++/* [ 95] - unused */
 676+ [ 96] = { 2,	0,		SEN(getpriority),		"getpriority"		},
 677+ [ 97] = { 3,	0,		SEN(setpriority),		"setpriority"		},
 678+-[ 98] = { },
 679++/* [ 98] - unused */
 680+ [ 99] = { 2,	TF|TSF|TSFA,	SEN(statfs),			"statfs"		},
 681+ [100] = { 2,	TD|TFSF|TSFA,	SEN(fstatfs),			"fstatfs"		},
 682+-[101] = { },
 683++/* [101] - unused */
 684+ [102] = { 2,	TD|TSD,		SEN(socketcall),		"socketcall"		},
 685+ [103] = { 3,	0,		SEN(syslog),			"syslog"		},
 686+ [104] = { 3,	0,		SEN(setitimer),			"setitimer"		},
 687+@@ -112,11 +112,11 @@
 688+ [106] = { 2,	TF|TST|TSTA,	SEN(stat),			"stat"			},
 689+ [107] = { 2,	TF|TLST|TSTA,	SEN(lstat),			"lstat"			},
 690+ [108] = { 2,	TD|TFST|TSTA,	SEN(fstat),			"fstat"			},
 691+-[109] = { },
 692++/* [109] - unused */
 693+ [110] = { 3,	0,		SEN(lookup_dcookie),		"lookup_dcookie"	},
 694+ [111] = { 0,	0,		SEN(vhangup),			"vhangup"		},
 695+ [112] = { 0,	0,		SEN(idle),			"idle"			},
 696+-[113] = { },
 697++/* [113] - unused */
 698+ [114] = { 4,	TP,		SEN(wait4),			"wait4"			},
 699+ [115] = { 1,	TF,		SEN(swapoff),			"swapoff"		},
 700+ [116] = { 1,	0,		SEN(sysinfo),			"sysinfo"		},
 701+@@ -126,7 +126,7 @@
 702+ [120] = { 5,	TP,		SEN(clone),			"clone"			},
 703+ [121] = { 2,	0,		SEN(setdomainname),		"setdomainname"		},
 704+ [122] = { 1,	0,		SEN(uname),			"uname"			},
 705+-[123] = { },
 706++/* [123] - unused */
 707+ [124] = { 1,	TCL,		SEN(adjtimex64),		"adjtimex"		},
 708+ [125] = { 3,	TM|SI,		SEN(mprotect),			"mprotect"		},
 709+ [126] = { 3,	TS,		SEN(sigprocmask),		"sigprocmask"		},
 710+@@ -141,7 +141,7 @@
 711+ [135] = { 3,	0,		SEN(sysfs),			"sysfs"			},
 712+ [136] = { 1,	NF,		SEN(personality),		"personality"		},
 713+ [137] = { 5,	0,		SEN(afs_syscall),		"afs_syscall"		},
 714+-[138 ... 140] = { },
 715++/* [138 ... 140] - unused */
 716+ [141] = { 3,	TD,		SEN(getdents),			"getdents"		},
 717+ [142] = { 5,	TD,		SEN(select),			"select"		},
 718+ [143] = { 2,	TD,		SEN(flock),			"flock"			},
 719+@@ -165,11 +165,11 @@
 720+ [161] = { 2,	0,		SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
 721+ [162] = { 2,	0,		SEN(nanosleep_time64),		"nanosleep"		},
 722+ [163] = { 5,	TM|SI,		SEN(mremap),			"mremap"		},
 723+-[164 ... 166] = { },
 724++/* [164 ... 166] - unused */
 725+ [167] = { 5,	0,		SEN(query_module),		"query_module"		},
 726+ [168] = { 3,	TD,		SEN(poll_time64),		"poll"			},
 727+ [169] = { 3,	0,		SEN(nfsservctl),		"nfsservctl"		},
 728+-[170 ... 171] = { },
 729++/* [170 ... 171] - unused */
 730+ [172] = { 5,	CC|TC,		SEN(prctl),			"prctl"			},
 731+ [173] = { 0,	TS,		SEN(rt_sigreturn),		"rt_sigreturn"		},
 732+ [174] = { 4,	TS,		SEN(rt_sigaction),		"rt_sigaction"		},
 733+@@ -180,7 +180,7 @@
 734+ [179] = { 2,	TS,		SEN(rt_sigsuspend),		"rt_sigsuspend"		},
 735+ [180] = { 4,	TD,		SEN(pread),			"pread64"		},
 736+ [181] = { 4,	TD,		SEN(pwrite),			"pwrite64"		},
 737+-[182] = { },
 738++/* [182] - unused */
 739+ [183] = { 2,	TF,		SEN(getcwd),			"getcwd"		},
 740+ [184] = { 2,	TC,		SEN(capget),			"capget"		},
 741+ [185] = { 2,	TC,		SEN(capset),			"capset"		},
 742+@@ -190,7 +190,7 @@
 743+ [189] = { 5,	TN,		SEN(putpmsg),			"putpmsg"		},
 744+ [190] = { 0,	TP,		SEN(vfork),			"vfork"			},
 745+ [191] = { 2,	0,		SEN(getrlimit),			"getrlimit"		},
 746+-[196 ... 197] = { },
 747++/* [196 ... 197] - unused */
 748+ [198] = { 3,	TF,		SEN(chown),			"lchown"		},
 749+ [199] = { 0,	TC|PU|NF,	SEN(getuid),			"getuid"		},
 750+ [200] = { 0,	TC|PU|NF,	SEN(getgid),			"getgid"		},
 751+@@ -214,9 +214,9 @@
 752+ [218] = { 3,	TM,		SEN(mincore),			"mincore"		},
 753+ [219] = { 3,	TM,		SEN(madvise),			"madvise"		},
 754+ [220] = { 3,	TD,		SEN(getdents64),		"getdents64"		},
 755+-[221] = { },
 756++/* [221] - unused */
 757+ [222] = { 3,	TD,		SEN(readahead),			"readahead"		},
 758+-[223] = { },
 759++/* [223] - unused */
 760+ [224] = { 5,	TF,		SEN(setxattr),			"setxattr"		},
 761+ [225] = { 5,	TF,		SEN(setxattr),			"lsetxattr"		},
 762+ [226] = { 5,	TD,		SEN(fsetxattr),			"fsetxattr"		},
 763+@@ -235,7 +235,7 @@
 764+ [239] = { 3,	0,		SEN(sched_setaffinity),		"sched_setaffinity"	},
 765+ [240] = { 3,	0,		SEN(sched_getaffinity),		"sched_getaffinity"	},
 766+ [241] = { 3,	TS|TP,		SEN(tgkill),			"tgkill"		},
 767+-[242] = { },
 768++/* [242] - unused */
 769+ [243] = { 2,	TM,		SEN(io_setup),			"io_setup"		},
 770+ [244] = { 1,	TM,		SEN(io_destroy),		"io_destroy"		},
 771+ [245] = { 5,	0,		SEN(io_getevents_time64),	"io_getevents"		},
 772+@@ -257,7 +257,7 @@
 773+ [261] = { 2,	TCL,		SEN(clock_getres_time64),	"clock_getres"		},
 774+ [262] = { 4,	0,		SEN(clock_nanosleep_time64),	"clock_nanosleep"	},
 775+ [263] = { 5,	0,		SEN(vserver),			"vserver"		},
 776+-[264] = { },
 777++/* [264] - unused */
 778+ [265] = { 3,	TF|TSF|TSFA,	SEN(statfs64),			"statfs64"		},
 779+ [266] = { 3,	TD|TFSF|TSFA,	SEN(fstatfs64),			"fstatfs64"		},
 780+ [267] = { 5,	TM|SI,		SEN(remap_file_pages),		"remap_file_pages"	},
 781+diff --git a/src/linux/sh/syscallent.h b/src/linux/sh/syscallent.h
 782+index c238f0400..a95f0db99 100644
 783+--- a/src/linux/sh/syscallent.h
 784++++ b/src/linux/sh/syscallent.h
 785+@@ -197,7 +197,7 @@
 786+ [185] = { 2,	TC,		SEN(capset),			"capset"		},
 787+ [186] = { 2,	TS,		SEN(sigaltstack),		"sigaltstack"		},
 788+ [187] = { 4,	TD|TN,		SEN(sendfile),			"sendfile"		},
 789+-[188 ... 189] = { },
 790++/* [188 ... 189] - unused */
 791+ [190] = { 0,	TP,		SEN(vfork),			"vfork"			},
 792+ [191] = { 2,	0,		SEN(getrlimit),			"ugetrlimit"		},
 793+ [192] = { 6,	TD|TM|SI,	SEN(mmap_4koff),		"mmap2"			},
 794+@@ -230,7 +230,7 @@
 795+ [219] = { 3,	TM,		SEN(madvise),			"madvise"		},
 796+ [220] = { 3,	TD,		SEN(getdents64),		"getdents64"		},
 797+ [221] = { 3,	TD,		SEN(fcntl64),			"fcntl64"		},
 798+-[222 ... 223] = { },
 799++/* [222 ... 223] - unused */
 800+ [224] = { 0,	PU|NF,		SEN(gettid),			"gettid"		},
 801+ [225] = { 4,	TD,		SEN(readahead),			"readahead"		},
 802+ [226] = { 5,	TF,		SEN(setxattr),			"setxattr"		},
 803+@@ -250,14 +250,14 @@
 804+ [240] = { 6,	0,		SEN(futex_time32),		"futex"			},
 805+ [241] = { 3,	0,		SEN(sched_setaffinity),		"sched_setaffinity"	},
 806+ [242] = { 3,	0,		SEN(sched_getaffinity),		"sched_getaffinity"	},
 807+-[243 ... 244] = { },
 808++/* [243 ... 244] - unused */
 809+ [245] = { 2,	TM,		SEN(io_setup),			"io_setup"		},
 810+ [246] = { 1,	TM,		SEN(io_destroy),		"io_destroy"		},
 811+ [247] = { 5,	0,		SEN(io_getevents_time32),	"io_getevents"		},
 812+ [248] = { 3,	0,		SEN(io_submit),			"io_submit"		},
 813+ [249] = { 3,	0,		SEN(io_cancel),			"io_cancel"		},
 814+ [250] = { 5,	TD,		SEN(fadvise64),			"fadvise64"		},
 815+-[251] = { },
 816++/* [251] - unused */
 817+ [252] = { 1,	TP|SE,		SEN(exit),			"exit_group"		},
 818+ [253] = { 4,	0,		SEN(lookup_dcookie),		"lookup_dcookie"	},
 819+ [254] = { 1,	TD,		SEN(epoll_create),		"epoll_create"		},
 820+@@ -279,7 +279,7 @@
 821+ [270] = { 3,	TS|TP,		SEN(tgkill),			"tgkill"		},
 822+ [271] = { 2,	TF,		SEN(utimes),			"utimes"		},
 823+ [272] = { 6,	TD,		SEN(fadvise64_64),		"fadvise64_64"		},
 824+-[273] = { },
 825++/* [273] - unused */
 826+ [274] = { 6,	TM,		SEN(mbind),			"mbind"			},
 827+ [275] = { 5,	TM,		SEN(get_mempolicy),		"get_mempolicy"		},
 828+ [276] = { 3,	TM,		SEN(set_mempolicy),		"set_mempolicy"		},
 829+@@ -299,7 +299,7 @@
 830+ [290] = { 0,	TD,		SEN(inotify_init),		"inotify_init"		},
 831+ [291] = { 3,	TD|TF,		SEN(inotify_add_watch),		"inotify_add_watch"	},
 832+ [292] = { 2,	TD,		SEN(inotify_rm_watch),		"inotify_rm_watch"	},
 833+-[293] = { },
 834++/* [293] - unused */
 835+ [294] = { 4,	TM,		SEN(migrate_pages),		"migrate_pages"		},
 836+ [295] = { 4,	TD|TF,		SEN(openat),			"openat"		},
 837+ [296] = { 3,	TD|TF,		SEN(mkdirat),			"mkdirat"		},
 838+diff --git a/src/linux/sh64/syscallent.h b/src/linux/sh64/syscallent.h
 839+index f33504235..646eb6f4a 100644
 840+--- a/src/linux/sh64/syscallent.h
 841++++ b/src/linux/sh64/syscallent.h
 842+@@ -89,7 +89,7 @@
 843+ [ 79] = { 2,	TCL,		SEN(settimeofday),		"settimeofday"		},
 844+ [ 80] = { 2,	TC,		SEN(getgroups16),		"getgroups"		},
 845+ [ 81] = { 2,	TC,		SEN(setgroups16),		"setgroups"		},
 846+-[ 82] = { },
 847++/* [ 82] - unused */
 848+ [ 83] = { 2,	TF,		SEN(symlink),			"symlink"		},
 849+ [ 84] = { 2,	TF|TLST|TSTA,	SEN(oldlstat),			"oldlstat"		},
 850+ [ 85] = { 3,	TF,		SEN(readlink),			"readlink"		},
 851+@@ -120,7 +120,7 @@
 852+ [110] = { 1,	0,		SEN(iopl),			"iopl"			},
 853+ [111] = { 0,	0,		SEN(vhangup),			"vhangup"		},
 854+ [112] = { 0,	0,		SEN(idle),			"idle"			},
 855+-[113] = { },
 856++/* [113] - unused */
 857+ [114] = { 4,	TP,		SEN(wait4),			"wait4"			},
 858+ [115] = { 1,	TF,		SEN(swapoff),			"swapoff"		},
 859+ [116] = { 1,	0,		SEN(sysinfo),			"sysinfo"		},
 860+@@ -173,7 +173,7 @@
 861+ [163] = { 5,	TM|SI,		SEN(mremap),			"mremap"		},
 862+ [164] = { 3,	TC,		SEN(setresuid16),		"setresuid"		},
 863+ [165] = { 3,	TC,		SEN(getresuid16),		"getresuid"		},
 864+-[166] = { },
 865++/* [166] - unused */
 866+ [167] = { 5,	0,		SEN(query_module),		"query_module"		},
 867+ [168] = { 3,	TD,		SEN(poll_time64),		"poll"			},
 868+ [169] = { 3,	0,		SEN(nfsservctl),		"nfsservctl"		},
 869+@@ -195,7 +195,7 @@
 870+ [185] = { 2,	TC,		SEN(capset),			"capset"		},
 871+ [186] = { 2,	TS,		SEN(sigaltstack),		"sigaltstack"		},
 872+ [187] = { 4,	TD|TN,		SEN(sendfile),			"sendfile"		},
 873+-[188 ... 189] = { },
 874++/* [188 ... 189] - unused */
 875+ [190] = { 0,	TP,		SEN(vfork),			"vfork"			},
 876+ [191] = { 2,	0,		SEN(getrlimit),			"ugetrlimit"		},
 877+ [192] = { 6,	TD|TM|SI,	SEN(mmap_4koff),		"mmap2"			},
 878+@@ -256,7 +256,7 @@
 879+ [247] = { 3,	TI,		SEN(shmctl),			"shmctl"		},
 880+ [248] = { 3,	TD,		SEN(getdents64),		"getdents64"		},
 881+ [249] = { 3,	TD,		SEN(fcntl64),			"fcntl64"		},
 882+-[250 ... 251] = { },
 883++/* [250 ... 251] - unused */
 884+ [252] = { 0,	PU|NF,		SEN(gettid),			"gettid"		},
 885+ [253] = { 3,	TD,		SEN(readahead),			"readahead"		},
 886+ [254] = { 5,	TF,		SEN(setxattr),			"setxattr"		},
 887+@@ -276,14 +276,14 @@
 888+ [268] = { 6,	0,		SEN(futex_time64),		"futex"			},
 889+ [269] = { 3,	0,		SEN(sched_setaffinity),		"sched_setaffinity"	},
 890+ [270] = { 3,	0,		SEN(sched_getaffinity),		"sched_getaffinity"	},
 891+-[271 ... 272] = { },
 892++/* [271 ... 272] - unused */
 893+ [273] = { 2,	TM,		SEN(io_setup),			"io_setup"		},
 894+ [274] = { 1,	TM,		SEN(io_destroy),		"io_destroy"		},
 895+ [275] = { 5,	0,		SEN(io_getevents_time64),	"io_getevents"		},
 896+ [276] = { 3,	0,		SEN(io_submit),			"io_submit"		},
 897+ [277] = { 3,	0,		SEN(io_cancel),			"io_cancel"		},
 898+ [278] = { 4,	TD,		SEN(fadvise64),			"fadvise64"		},
 899+-[279] = { },
 900++/* [279] - unused */
 901+ [280] = { 1,	TP|SE,		SEN(exit),			"exit_group"		},
 902+ [281] = { 3,	0,		SEN(lookup_dcookie),		"lookup_dcookie"	},
 903+ [282] = { 1,	TD,		SEN(epoll_create),		"epoll_create"		},
 904+@@ -305,7 +305,7 @@
 905+ [298] = { 3,	TS|TP,		SEN(tgkill),			"tgkill"		},
 906+ [299] = { 2,	TF,		SEN(utimes),			"utimes"		},
 907+ [300] = { 4,	TD,		SEN(fadvise64_64),		"fadvise64_64"		},
 908+-[301] = { },
 909++/* [301] - unused */
 910+ [302] = { 6,	TM,		SEN(mbind),			"mbind"			},
 911+ [303] = { 5,	TM,		SEN(get_mempolicy),		"get_mempolicy"		},
 912+ [304] = { 3,	TM,		SEN(set_mempolicy),		"set_mempolicy"		},
 913+@@ -325,7 +325,7 @@
 914+ [318] = { 0,	TD,		SEN(inotify_init),		"inotify_init"		},
 915+ [319] = { 3,	TD|TF,		SEN(inotify_add_watch),		"inotify_add_watch"	},
 916+ [320] = { 2,	TD,		SEN(inotify_rm_watch),		"inotify_rm_watch"	},
 917+-[321] = { },
 918++/* [321] - unused */
 919+ [322] = { 4,	TM,		SEN(migrate_pages),		"migrate_pages"		},
 920+ [323] = { 4,	TD|TF,		SEN(openat),			"openat"		},
 921+ [324] = { 3,	TD|TF,		SEN(mkdirat),			"mkdirat"		},
 922+diff --git a/src/linux/xtensa/syscallent.h b/src/linux/xtensa/syscallent.h
 923+index 09fed329c..69d58ec6d 100644
 924+--- a/src/linux/xtensa/syscallent.h
 925++++ b/src/linux/xtensa/syscallent.h
 926+@@ -7,7 +7,7 @@
 927+ 
 928+ [  0] = { 0,	0,		SEN(printargs),			"spill"			},
 929+ [  1] = { 0,	0,		SEN(printargs),			"xtensa"		},
 930+-[  2 ... 7] = { },
 931++/* [  2 ... 7] - unused */
 932+ [  8] = { 3,	TD|TF,		SEN(open),			"open"			},
 933+ [  9] = { 1,	TD,		SEN(close),			"close"			},
 934+ [ 10] = { 1,	TD,		SEN(dup),			"dup"			},
 935+@@ -51,7 +51,7 @@
 936+ [ 48] = { 3,	TF,		SEN(chown),			"lchown"		},
 937+ [ 49] = { 2,	TF|TLST|TSTA,	SEN(lstat),			"lstat"			},
 938+ [ 50] = { 2,	TF|TLST|TSTA,	SEN(lstat64),			"lstat64"		},
 939+-[ 51] = { },
 940++/* [ 51] - unused */
 941+ [ 52] = { 2,	TD,		SEN(fchmod),			"fchmod"		},
 942+ [ 53] = { 3,	TD,		SEN(fchown),			"fchown"		},
 943+ [ 54] = { 2,	TD|TFST|TSTA,	SEN(fstat),			"fstat"			},
 944+@@ -152,7 +152,7 @@
 945+ [149] = { 1,	0,		SEN(getpgid),			"getpgid"		},
 946+ [150] = { 0,	PU|NF,		SEN(getppid),			"getppid"		},
 947+ [151] = { 0,	PU|NF,		SEN(getpgrp),			"getpgrp"		},
 948+-[152 ... 153] = { },
 949++/* [152 ... 153] - unused */
 950+ [154] = { 1,	0,		SEN(times),			"times"			},
 951+ [155] = { 1,	TF,		SEN(acct),			"acct"			},
 952+ [156] = { 3,	0,		SEN(sched_setaffinity),		"sched_setaffinity"	},
 953+@@ -164,12 +164,12 @@
 954+ [162] = { 3,	TI,		SEN(semget),			"semget"		},
 955+ [163] = { 3,	TI,		SEN(semop),			"semop"			},
 956+ [164] = { 4,	TI,		SEN(semctl),			"semctl"		},
 957+-[165] = { },
 958++/* [165] - unused */
 959+ [166] = { 2,	TI,		SEN(msgget),			"msgget"		},
 960+ [167] = { 4,	TI,		SEN(msgsnd),			"msgsnd"		},
 961+ [168] = { 5,	TI,		SEN(msgrcv),			"msgrcv"		},
 962+ [169] = { 3,	TI,		SEN(msgctl),			"msgctl"		},
 963+-[170] = { },
 964++/* [170] - unused */
 965+ [171] = { 2,	TF,		SEN(umount2),			"umount2"		},
 966+ [172] = { 5,	TF,		SEN(mount),			"mount"			},
 967+ [173] = { 2,	TF,		SEN(swapon),			"swapon"		},
 968+@@ -219,7 +219,7 @@
 969+ [217] = { 1,	0,		SEN(sched_get_priority_min),	"sched_get_priority_min"},
 970+ [218] = { 2,	0,		SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
 971+ [219] = { 0,	0,		SEN(sched_yield),		"sched_yield"		},
 972+-[220 ... 222] = { },
 973++/* [220 ... 222] - unused */
 974+ [223] = { 0,	0,		SEN(restart_syscall),		"restart_syscall"	},
 975+ [224] = { 2,	TS,		SEN(sigaltstack),		"sigaltstack"		},
 976+ [225] = { 0,	TS,		SEN(rt_sigreturn),		"rt_sigreturn"		},
 977+@@ -235,7 +235,7 @@
 978+ [235] = { 5,	TD,		SEN(mq_timedreceive_time32),	"mq_timedreceive"	},
 979+ [236] = { 2,	TD,		SEN(mq_notify),			"mq_notify"		},
 980+ [237] = { 3,	TD,		SEN(mq_getsetattr),		"mq_getsetattr"		},
 981+-[238] = { },
 982++/* [238] - unused */
 983+ [239] = { 2,	TM,		SEN(io_setup),			"io_setup"		},
 984+ [240] = { 1,	TM,		SEN(io_destroy),		"io_destroy"		},
 985+ [241] = { 3,	0,		SEN(io_submit),			"io_submit"		},
 986+@@ -250,13 +250,13 @@
 987+ [250] = { 4,	0,		SEN(timer_settime32),		"timer_settime"		},
 988+ [251] = { 2,	0,		SEN(timer_gettime32),		"timer_gettime"		},
 989+ [252] = { 1,	0,		SEN(timer_getoverrun),		"timer_getoverrun"	},
 990+-[253] = { },
 991++/* [253] - unused */
 992+ [254] = { 4,	0,		SEN(lookup_dcookie),		"lookup_dcookie"	},
 993+-[255] = { },
 994++/* [255] - unused */
 995+ [256] = { 5,	0,		SEN(add_key),			"add_key"		},
 996+ [257] = { 4,	0,		SEN(request_key),		"request_key"		},
 997+ [258] = { 5,	0,		SEN(keyctl),			"keyctl"		},
 998+-[259] = { },
 999++/* [259] - unused */
1000+ [260] = { 5,	TD,		SEN(readahead),			"readahead"		},
1001+ [261] = { 5,	TM|SI,		SEN(remap_file_pages),		"remap_file_pages"	},
1002+ [262] = { 4,	TM,		SEN(migrate_pages),		"migrate_pages"		},
1003+@@ -268,7 +268,7 @@
1004+ [268] = { 6,	TD,		SEN(splice),			"splice"		},
1005+ [269] = { 4,	TD,		SEN(tee),			"tee"			},
1006+ [270] = { 4,	TD,		SEN(vmsplice),			"vmsplice"		},
1007+-[271] = { },
1008++/* [271] - unused */
1009+ [272] = { 6,	TD,		SEN(pselect6_time32),		"pselect6"		},
1010+ [273] = { 5,	TD,		SEN(ppoll_time32),		"ppoll"			},
1011+ [274] = { 6,	TD,		SEN(epoll_pwait),		"epoll_pwait"		},
1012+@@ -283,7 +283,7 @@
1013+ [283] = { 2,	0,		SEN(ioprio_get),		"ioprio_get"		},
1014+ [284] = { 2,	0,		SEN(set_robust_list),		"set_robust_list"	},
1015+ [285] = { 3,	0,		SEN(get_robust_list),		"get_robust_list"	},
1016+-[286 ... 287] = { },
1017++/* [286 ... 287] - unused */
1018+ [288] = { 4,	TD|TF,		SEN(openat),			"openat"		},
1019+ [289] = { 3,	TD|TF,		SEN(mkdirat),			"mkdirat"		},
1020+ [290] = { 4,	TD|TF,		SEN(mknodat),			"mknodat"		},
1021+@@ -298,9 +298,9 @@
1022+ [299] = { 4,	TD|TF|TFST|TSTA,SEN(fstatat64),			"fstatat64"		},
1023+ [300] = { 3,	TD|TF,		SEN(fchmodat),			"fchmodat"		},
1024+ [301] = { 3,	TD|TF,		SEN(faccessat),			"faccessat"		},
1025+-[302 ... 303] = { },
1026++/* [302 ... 303] - unused */
1027+ [304] = { 3,	TD|TS,		SEN(signalfd),			"signalfd"		},
1028+-[305] = { },
1029++/* [305] - unused */
1030+ [306] = { 1,	TD,		SEN(eventfd),			"eventfd"		},
1031+ [307] = { 5,	TN,		SEN(recvmmsg_time32),		"recvmmsg"		},
1032+ [308] = { 2,	TD,		SEN(setns),			"setns"			},
1033+@@ -310,11 +310,11 @@
1034+ [312] = { 2,	TD,		SEN(timerfd_create),		"timerfd_create"	},
1035+ [313] = { 4,	TD,		SEN(timerfd_settime32),		"timerfd_settime"	},
1036+ [314] = { 2,	TD,		SEN(timerfd_gettime32),		"timerfd_gettime"	},
1037+-[315] = { },
1038++/* [315] - unused */
1039+ [316] = { 2,	TD,		SEN(eventfd2),			"eventfd2"		},
1040+ [317] = { 5,	TD,		SEN(preadv),			"preadv"		},
1041+ [318] = { 5,	TD,		SEN(pwritev),			"pwritev"		},
1042+-[319] = { },
1043++/* [319] - unused */
1044+ [320] = { 2,	TD,		SEN(fanotify_init),		"fanotify_init"		},
1045+ [321] = { 6,	TD|TF,		SEN(fanotify_mark),		"fanotify_mark"		},
1046+ [322] = { 6,	0,		SEN(process_vm_readv),		"process_vm_readv"	},
1047+-- 
1048+2.37.3
1049+
+31, -0
 1@@ -0,0 +1,31 @@
 2+From 4673bf0d6a0eba5d363266a40cfb087e08a66e7f Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 30 Jan 2020 21:57:34 -0800
 5+Subject: [PATCH] Use alloca when VLAs aren't available
 6+
 7+---
 8+ src/evdev.c | 6 +++++-
 9+ 1 file changed, 5 insertions(+), 1 deletion(-)
10+
11+diff --git a/src/evdev.c b/src/evdev.c
12+index 81dd951cb..74a765469 100644
13+--- a/src/evdev.c
14++++ b/src/evdev.c
15+@@ -164,9 +164,13 @@ decode_bitset(struct tcb *const tcp, const kernel_ulong_t arg,
16+ 		return RVAL_IOCTL_DECODED;
17+ 	}
18+ 
19++#ifndef __STDC_NO_VLA__
20+ 	char decoded_arg[size];
21++#else
22++	char *decoded_arg = alloca(size);
23++#endif
24+ 
25+-	if (umove_or_printaddr(tcp, arg, &decoded_arg))
26++	if (umoven_or_printaddr(tcp, arg, size, decoded_arg))
27+ 		return RVAL_IOCTL_DECODED;
28+ 
29+ 	if (xlat_verbose(xlat_verbosity) != XLAT_STYLE_RAW) {
30+-- 
31+2.34.1
32+
+62, -0
 1@@ -0,0 +1,62 @@
 2+From d1c93514cb65877134e8f53b189adbcd5a0e1b43 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Thu, 30 Jan 2020 22:32:50 -0800
 5+Subject: [PATCH] Avoid index ranges
 6+
 7+The change in print_mac.c is not functionally the same, but we
 8+ignore this for now.
 9+---
10+ src/print_mac.c | 4 +---
11+ src/util.c      | 8 ++++----
12+ 2 files changed, 5 insertions(+), 7 deletions(-)
13+
14+diff --git a/src/print_mac.c b/src/print_mac.c
15+index cad1013a8..73d7bbe28 100644
16+--- a/src/print_mac.c
17++++ b/src/print_mac.c
18+@@ -17,8 +17,6 @@
19+ DIAG_PUSH_IGNORE_OVERRIDE_INIT
20+ 
21+ static uint8_t hwaddr_sizes[] = {
22+-	[0 ... ARPHRD_VSOCKMON] = 255,
23+-
24+ 	[ARPHRD_NETROM]     =  7 /* AX25_ADDR_LEN */,
25+ 	[ARPHRD_ETHER]      =  6 /* ETH_ALEN */,
26+ 	/* ARPHRD_EETHER - no actual devices in Linux */
27+@@ -129,7 +127,7 @@ print_mac_addr(const char *prefix, const uint8_t addr[], size_t size)
28+ static const char *
29+ sprint_hwaddr(const uint8_t hwaddr[], size_t size, uint32_t devtype)
30+ {
31+-	uint8_t sz = (devtype < ARRAY_SIZE(hwaddr_sizes))
32++	uint8_t sz = (devtype < ARRAY_SIZE(hwaddr_sizes) && hwaddr_sizes[devtype])
33+ 			? hwaddr_sizes[devtype] : 255;
34+ 
35+ 	return sprint_mac_addr(hwaddr, MIN(size, sz));
36+diff --git a/src/util.c b/src/util.c
37+index a3bea5b76..21fb9560f 100644
38+--- a/src/util.c
39++++ b/src/util.c
40+@@ -1477,16 +1477,16 @@ dumpstr(struct tcb *const tcp, const kernel_ulong_t addr,
41+ 		? 1 + ilog2_klong(len - 1) / HEX_BIT : DUMPSTR_OFFS_MIN_CHARS;
42+ 	kernel_ulong_t i = 0;
43+ 	const unsigned char *src;
44++	char outbuf[DUMPSTR_WIDTH_CHARS + 1];
45++
46++	memset(outbuf, ' ', DUMPSTR_WIDTH_CHARS);
47++	outbuf[DUMPSTR_WIDTH_CHARS] = '\0';
48+ 
49+ 	while (i < len) {
50+ 		/*
51+ 		 * It is important to overwrite all the byte values, as we
52+ 		 * re-use the buffer in order to avoid its re-initialisation.
53+ 		 */
54+-		static char outbuf[] = {
55+-			[0 ... DUMPSTR_WIDTH_CHARS - 1] = ' ',
56+-			'\0'
57+-		};
58+ 		char *dst = outbuf;
59+ 
60+ 		/* Fetching data from tracee.  */
61+-- 
62+2.37.3
63+
+72, -0
 1@@ -0,0 +1,72 @@
 2+From a9a8b003bc97952fcc47d84b2ba9c490d90985e3 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 18 Feb 2022 01:40:22 -0800
 5+Subject: [PATCH] Prevent zero-sized arrays
 6+
 7+---
 8+ src/xlat/btrfs_features_compat.h | 3 ++-
 9+ src/xlat/compat_ptrace_cmds.h    | 3 ++-
10+ src/xlat/sigprof_codes.h         | 3 ++-
11+ 3 files changed, 6 insertions(+), 3 deletions(-)
12+
13+diff --git a/src/xlat/btrfs_features_compat.h b/src/xlat/btrfs_features_compat.h
14+index 12136c495..cc5804a1b 100644
15+--- a/src/xlat/btrfs_features_compat.h
16++++ b/src/xlat/btrfs_features_compat.h
17+@@ -15,13 +15,14 @@ extern const struct xlat btrfs_features_compat[];
18+ 
19+ DIAG_PUSH_IGNORE_TAUTOLOGICAL_CONSTANT_COMPARE
20+ static const struct xlat_data btrfs_features_compat_xdata[] = {
21++ {0}
22+ };
23+ #  if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
24+ static
25+ #  endif
26+ const struct xlat btrfs_features_compat[1] = { {
27+  .data = btrfs_features_compat_xdata,
28+- .size = ARRAY_SIZE(btrfs_features_compat_xdata),
29++ .size = ARRAY_SIZE(btrfs_features_compat_xdata) - 1,
30+  .type = XT_NORMAL,
31+  .flags_mask = 0
32+   ,
33+diff --git a/src/xlat/compat_ptrace_cmds.h b/src/xlat/compat_ptrace_cmds.h
34+index 9a7fc96b1..a29567689 100644
35+--- a/src/xlat/compat_ptrace_cmds.h
36++++ b/src/xlat/compat_ptrace_cmds.h
37+@@ -225,11 +225,12 @@ static const struct xlat_data compat_ptrace_cmds_xdata[] = {
38+  #define XLAT_VAL_9 ((unsigned) (COMPAT_PTRACE_SETHBPREGS))
39+  #define XLAT_STR_9 STRINGIFY(COMPAT_PTRACE_SETHBPREGS)
40+ #endif
41++ {0}
42+ };
43+ static
44+ const struct xlat compat_ptrace_cmds[1] = { {
45+  .data = compat_ptrace_cmds_xdata,
46+- .size = ARRAY_SIZE(compat_ptrace_cmds_xdata),
47++ .size = ARRAY_SIZE(compat_ptrace_cmds_xdata) - 1,
48+  .type = XT_SORTED,
49+  .flags_mask = 0
50+ #  ifdef XLAT_VAL_0
51+diff --git a/src/xlat/sigprof_codes.h b/src/xlat/sigprof_codes.h
52+index bc61fdc8f..88f043ab9 100644
53+--- a/src/xlat/sigprof_codes.h
54++++ b/src/xlat/sigprof_codes.h
55+@@ -20,13 +20,14 @@ static const struct xlat_data sigprof_codes_xdata[] = {
56+  #define XLAT_VAL_0 ((unsigned) (PROF_SIG))
57+  #define XLAT_STR_0 STRINGIFY(PROF_SIG)
58+ #endif
59++  {0}
60+ };
61+ #  if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
62+ static
63+ #  endif
64+ const struct xlat sigprof_codes[1] = { {
65+  .data = sigprof_codes_xdata,
66+- .size = ARRAY_SIZE(sigprof_codes_xdata),
67++ .size = ARRAY_SIZE(sigprof_codes_xdata) - 1,
68+  .type = XT_NORMAL,
69+  .flags_mask = 0
70+ #  ifdef XLAT_VAL_0
71+-- 
72+2.34.1
73+
+11, -0
 1@@ -0,0 +1,11 @@
 2+BEGIN {
 3+	FS = "\\(|\\)|, "
 4+	OFS = ", "
 5+}
 6+
 7+$1 == "MPERS_PRINTER_DECL" {
 8+	printf "extern %s %s(%s", $2, $3, $4
 9+	for (i = 5; i < NF; ++i)
10+		printf ", %s", $i
11+	print ");"
12+}
+8, -0
1@@ -0,0 +1,8 @@
2+BEGIN {
3+	FS = "\\(|\\)|, "
4+	OFS = ", "
5+}
6+
7+$1 == "MPERS_PRINTER_DECL" {
8+	print "." $3 " = " $3 ","
9+}
+19, -0
 1@@ -0,0 +1,19 @@
 2+BEGIN {
 3+	FS = "\\(|\\)|, "
 4+	OFS = ", "
 5+	print "typedef struct {"
 6+}
 7+
 8+$1 == "MPERS_PRINTER_DECL" {
 9+	printf " %s (*%s)(%s", $2, $3, $4
10+	for (i = 5; i < NF; ++i)
11+		printf ", %s", $i
12+	print ");"
13+	print "#define " $3 " MPERS_PRINTER_NAME(" $3 ")\n"
14+}
15+
16+END {
17+	print "} struct_printers;"
18+	print "extern const struct_printers *printers;"
19+	print "#define MPERS_PRINTER_NAME(printer_name) printers->printer_name"
20+}
+11, -0
 1@@ -0,0 +1,11 @@
 2+BEGIN {
 3+	FS = "[][\"]"
 4+}
 5+
 6+{
 7+	name = $4
 8+	number = int($2)
 9+	print "#ifndef __NR_" name
10+	print "# define __NR_" name " (SYSCALL_BIT | " number ")"
11+	print "#endif"
12+}
+16, -0
 1@@ -0,0 +1,16 @@
 2+BEGIN {
 3+	print "enum {"
 4+	print "SEN_printargs = 0,"
 5+}
 6+
 7+match($0, /SEN\([^)]+\)/) {
 8+	name = substr($0, RSTART + 4, RLENGTH - 5)
 9+	if (name != "printargs")
10+		print "SEN_" name "," | "sort -u"
11+}
12+
13+END {
14+	if (close("sort -u"))
15+		exit 1
16+	print "};"
17+}
+1, -0
1@@ -0,0 +1 @@
2+27987dbac57fdfd260c6db4dc8328df35c95c6867c8a3d4371d59cdcf4eb9238  strace-6.4.tar.xz
+1, -0
1@@ -0,0 +1 @@
2+url = "https://github.com/strace/strace/releases/download/v6.4/strace-6.4.tar.xz"
+1, -0
1@@ -0,0 +1 @@
2+6.4 r0
+4, -0
1@@ -0,0 +1,4 @@
2+/libminiupnp.ninja
3+/libnatpmp.ninja
4+/src
5+/transmission-3.00.tar.xz
+16, -0
 1@@ -0,0 +1,16 @@
 2+# transmission
 3+
 4+## config.h
 5+
 6+Generated with
 7+
 8+	./configure \
 9+		--disable-nls \
10+		--without-gtk \
11+		--without-systemd \
12+		LIBCURL_CFLAGS=-I/src/oasis/out/pkg/curl/include \
13+		LIBCURL_LIBS=/src/oasis/out/pkg/curl/libcurl.a \
14+		PKG_CONFIG=true
15+
16+transmission doesn't create `config.h` by default, so it was created from the
17+defines at the end of `config.log`.
+82, -0
 1@@ -0,0 +1,82 @@
 2+#define PACKAGE_DATA_DIR "/share"
 3+#define WITH_INOTIFY 1
 4+
 5+/* #undef BUILD_MAC_CLIENT */
 6+/* #undef ENABLE_NLS */
 7+/* #undef GETTEXT_PACKAGE */
 8+#define HAVE_BASENAME 1
 9+/* #undef HAVE_BIND_TEXTDOMAIN_CODESET */
10+/* #undef HAVE_CANONICALIZE_FILE_NAME */
11+#define HAVE_DAEMON 1
12+/* #undef HAVE_DCGETTEXT */
13+#define HAVE_DECL_POSIX_FADVISE 1
14+#define HAVE_DIRNAME 1
15+#define HAVE_DLFCN_H 1
16+#define HAVE_FALLOCATE64 1
17+#define HAVE_GETMNTENT 1
18+#define HAVE_GETPAGESIZE 1
19+/* #undef HAVE_GETTEXT */
20+/* #undef HAVE_HTONLL */
21+#define HAVE_ICONV 1
22+#define HAVE_INTTYPES_H 1
23+/* #undef HAVE_LC_MESSAGES */
24+/* #undef HAVE_LIBAPPINDICATOR */
25+/* #undef HAVE_LIBINTL_H */
26+/* #undef HAVE_LOCALE_H */
27+#define HAVE_LOCALTIME_R 1
28+#define HAVE_LRINTF 1
29+#define HAVE_MEMMEM 1
30+#define HAVE_MEMORY_H 1
31+#define HAVE_MKDTEMP 1
32+/* #undef HAVE_NTOHLL */
33+#define HAVE_POSIX_FADVISE 1
34+#define HAVE_POSIX_FALLOCATE 1
35+#define HAVE_POSIX_MEMALIGN 1
36+#define HAVE_PREAD 1
37+#define HAVE_PTHREAD 1
38+#define HAVE_PWRITE 1
39+#define HAVE_STATVFS 1
40+#define HAVE_STDINT_H 1
41+#define HAVE_STDLIB_H 1
42+#define HAVE_STRCASECMP 1
43+#define HAVE_STRCASESTR 1
44+#define HAVE_STRINGS_H 1
45+#define HAVE_STRING_H 1
46+#define HAVE_STRLCPY 1
47+#define HAVE_STRSEP 1
48+#define HAVE_STRTOLD 1
49+#define HAVE_SYSLOG 1
50+#define HAVE_SYS_STATVFS_H 1
51+#define HAVE_SYS_STAT_H 1
52+#define HAVE_SYS_TYPES_H 1
53+#define HAVE_UNISTD_H 1
54+#define HAVE_USELOCALE 1
55+#define HAVE_VALLOC 1
56+/* #undef HAVE_XFS_XFS_H */
57+/* #undef HAVE_XLOCALE_H */
58+/* #undef HAVE__CONFIGTHREADLOCALE */
59+#define LT_OBJDIR ".libs/"
60+/* #undef MINIUPNPC_API_VERSION */
61+#define PACKAGE "transmission"
62+#define PACKAGE_BUGREPORT "https://github.com/transmission/transmission"
63+#define PACKAGE_NAME "transmission"
64+#define PACKAGE_STRING "transmission 3.00"
65+#define PACKAGE_TARNAME "transmission"
66+#define PACKAGE_URL ""
67+#define PACKAGE_VERSION "3.00"
68+/* #undef PTHREAD_CREATE_JOINABLE */
69+#define STDC_HEADERS 1
70+#define SYSTEM_MINIUPNP 1
71+#define TIME_WITH_SYS_TIME 1
72+/* #undef TR_LIGHTWEIGHT */
73+/* #undef USE_SYSTEMD */
74+#define VERSION "3.00"
75+#define WITH_UTP 1
76+#ifndef _DARWIN_USE_64_BIT_INODE
77+# define _DARWIN_USE_64_BIT_INODE 1
78+#endif
79+/* #undef _FILE_OFFSET_BITS */
80+/* #undef _LARGE_FILES */
81+#ifndef __cplusplus
82+/* #undef inline */
83+#endif
+156, -0
  1@@ -0,0 +1,156 @@
  2+sub('libnatpmp.ninja', function()
  3+	cflags{'-D ENABLE_STRNATPMPERR'}
  4+	lib('libnatpmp.a', 'third-party/libnatpmp/(getgateway.c natpmp.c wingettimeofday.c)')
  5+end)
  6+sub('libminiupnp.ninja', function()
  7+	cflags{
  8+		'-D _GNU_SOURCE',
  9+		'-I $outdir/miniupnpc',
 10+		'-isystem $outdir/pkg/openbsd/include',
 11+	}
 12+
 13+	build('sed', '$outdir/miniupnpc/miniupnpcstrings.h', '$srcdir/third-party/miniupnpc/miniupnpcstrings.h.in', {
 14+		expr='-e s,OS/version,Linux, -e s,version,,',
 15+	})
 16+
 17+	lib('libminiupnp.a', [[
 18+		third-party/miniupnpc/(
 19+			connecthostport.c
 20+			igd_desc_parse.c
 21+			minisoap.c
 22+			minissdpc.c
 23+			miniupnpc.c
 24+			miniwget.c
 25+			minixml.c
 26+			portlistingparse.c
 27+			receivedata.c
 28+			upnpcommands.c
 29+			upnpdev.c
 30+			upnperrors.c
 31+			upnpreplyparse.c
 32+		)
 33+	]], {'$outdir/miniupnpc/miniupnpcstrings.h', 'pkg/openbsd/headers'})
 34+end)
 35+
 36+cflags{
 37+	'-D __TRANSMISSION__',
 38+	'-I $dir',
 39+	'-I $srcdir',
 40+	'-I $srcdir/third-party',
 41+	'-I $srcdir/third-party/libb64/include',
 42+	'-I $srcdir/third-party/libnatpmp',
 43+	'-isystem $builddir/pkg/bearssl/include',
 44+	'-isystem $builddir/pkg/curl/include',
 45+	'-isystem $builddir/pkg/libevent/include',
 46+	'-isystem $builddir/pkg/libutp/include',
 47+	'-isystem $builddir/pkg/zlib/include',
 48+	'-isystem $builddir/pkg/openbsd/include',
 49+	'-include config.h',
 50+}
 51+
 52+pkg.deps = {
 53+	'pkg/bearssl/headers',
 54+	'pkg/curl/headers',
 55+	'pkg/libevent/headers',
 56+	'pkg/libutp/headers',
 57+	'pkg/openbsd/headers',
 58+	'pkg/zlib/headers',
 59+}
 60+
 61+lib('libtransmission.a', [[
 62+	libtransmission/(
 63+		announcer.c
 64+		announcer-http.c
 65+		announcer-udp.c
 66+		bandwidth.c
 67+		bitfield.c
 68+		blocklist.c
 69+		cache.c
 70+		clients.c
 71+		completion.c
 72+		ConvertUTF.c
 73+		crypto.c
 74+		crypto-utils.c
 75+		crypto-utils-fallback.c
 76+		error.c
 77+		fdlimit.c
 78+		file.c
 79+		handshake.c
 80+		history.c
 81+		inout.c
 82+		list.c
 83+		log.c
 84+		magnet.c
 85+		makemeta.c
 86+		metainfo.c
 87+		natpmp.c
 88+		net.c
 89+		peer-io.c
 90+		peer-mgr.c
 91+		peer-msgs.c
 92+		platform.c
 93+		platform-quota.c
 94+		port-forwarding.c
 95+		ptrarray.c
 96+		quark.c
 97+		resume.c
 98+		rpcimpl.c
 99+		rpc-server.c
100+		session.c
101+		session-id.c
102+		stats.c
103+		torrent.c
104+		torrent-ctor.c
105+		torrent-magnet.c
106+		tr-assert.c
107+		tr-dht.c
108+		tr-lpd.c
109+		tr-udp.c
110+		tr-utp.c
111+		tr-getopt.c
112+		trevent.c
113+		upnp.c
114+		utils.c
115+		variant.c
116+		variant-benc.c
117+		variant-json.c
118+		verify.c
119+		watchdir.c
120+		watchdir-generic.c
121+		web.c
122+		webseed.c
123+		wildmat.c
124+
125+		watchdir-inotify.c
126+		file-posix.c
127+		subprocess-posix.c
128+		crypto-utils-bearssl.c
129+	)
130+	libb64.a libdht.a libminiupnp.a libnatpmp.a
131+	$builddir/pkg/(
132+		bearssl/libbearssl.a
133+		curl/libcurl.a.d
134+		libevent/libevent.a
135+		libutp/libutp.a
136+		zlib/libz.a
137+	)
138+]])
139+
140+lib('libb64.a', {'third-party/libb64/src/cdecode.c', 'third-party/libb64/src/cencode.c'})
141+lib('libdht.a', {'third-party/dht/dht.c'})
142+
143+exe('transmission-daemon', {
144+	'daemon/daemon.c',
145+	'daemon/daemon-posix.c',
146+	'libtransmission.a.d',
147+})
148+file('bin/transmission-daemon', '755', '$outdir/transmission-daemon')
149+man{'daemon/transmission-daemon.1'}
150+
151+for _, tool in ipairs{'create', 'edit', 'remote', 'show'} do
152+	exe('transmission-'..tool, {'utils/'..tool..'.c', 'libtransmission.a.d'})
153+	file('bin/transmission-'..tool, '755', '$outdir/transmission-'..tool)
154+	man{'utils/transmission-'..tool..'.1'}
155+end
156+
157+fetch 'curl'
+339, -0
  1@@ -0,0 +1,339 @@
  2+From eb8e399417b22099b5a52e5fb468979e44486e73 Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Sun, 17 Nov 2019 01:27:04 -0800
  5+Subject: [PATCH] Use BearSSL for SHA1 and DH, add fallback RC4
  6+
  7+---
  8+ libtransmission/crypto-utils-bearssl.c  | 234 ++++++++++++++++++++++++
  9+ libtransmission/crypto-utils-fallback.c |  77 ++++++++
 10+ 2 files changed, 311 insertions(+)
 11+ create mode 100644 libtransmission/crypto-utils-bearssl.c
 12+
 13+diff --git a/libtransmission/crypto-utils-bearssl.c b/libtransmission/crypto-utils-bearssl.c
 14+new file mode 100644
 15+index 000000000..5672a48df
 16+--- /dev/null
 17++++ b/libtransmission/crypto-utils-bearssl.c
 18+@@ -0,0 +1,234 @@
 19++#include <assert.h>
 20++#include <stdlib.h>
 21++
 22++#include <bearssl.h>
 23++
 24++#include "crypto-utils.h"
 25++
 26++#define TR_CRYPTO_DH_SECRET_FALLBACK
 27++#define TR_CRYPTO_X509_FALLBACK
 28++#define TR_CRYPTO_RC4_FALLBACK
 29++#include "crypto-utils-fallback.c"
 30++
 31++/***
 32++****
 33++***/
 34++
 35++#define MY_NAME "tr_crypto_utils"
 36++
 37++tr_sha1_ctx_t tr_sha1_init(void)
 38++{
 39++    br_sha1_context * ctx;
 40++
 41++    ctx = tr_malloc(sizeof (*ctx));
 42++    if (!ctx)
 43++    {
 44++        return NULL;
 45++    }
 46++
 47++    br_sha1_init(ctx);
 48++
 49++    return ctx;
 50++}
 51++
 52++bool tr_sha1_update(tr_sha1_ctx_t handle, void const* data, size_t data_length)
 53++{
 54++    TR_ASSERT(handle != NULL);
 55++
 56++    if (data_length == 0)
 57++    {
 58++        return true;
 59++    }
 60++
 61++    TR_ASSERT(data != NULL);
 62++
 63++    br_sha1_update(handle, data, data_length);
 64++
 65++    return true;
 66++}
 67++
 68++bool tr_sha1_final(tr_sha1_ctx_t handle, uint8_t* hash)
 69++{
 70++    if (hash != NULL)
 71++    {
 72++        TR_ASSERT(handle != NULL);
 73++        br_sha1_out(handle, hash);
 74++    }
 75++
 76++    tr_free(handle);
 77++    return true;
 78++}
 79++
 80++/***
 81++****
 82++***/
 83++
 84++typedef struct {
 85++  uint8_t const* prime_num;
 86++  size_t         prime_num_length;
 87++  uint8_t const* generator_num;
 88++  size_t         generator_num_length;
 89++  uint8_t*       private_key;
 90++  size_t         private_key_length;
 91++} DH;
 92++
 93++tr_dh_ctx_t tr_dh_new(uint8_t const* prime_num, size_t prime_num_length, uint8_t const* generator_num,
 94++    size_t generator_num_length)
 95++{
 96++    DH* handle;
 97++
 98++    TR_ASSERT(prime_num != NULL);
 99++    TR_ASSERT(generator_num != NULL);
100++    TR_ASSERT(generator_num_length < prime_num_length);
101++
102++    if (generator_num_length > prime_num_length)
103++    {
104++        return NULL;
105++    }
106++
107++    handle = tr_malloc(sizeof(*handle));
108++    if (handle == NULL)
109++    {
110++        return NULL;
111++    }
112++
113++    handle->prime_num = prime_num;
114++    handle->prime_num_length = prime_num_length;
115++    handle->generator_num = generator_num;
116++    handle->generator_num_length = generator_num_length;
117++    handle->private_key = NULL;
118++
119++    return handle;
120++}
121++
122++void
123++tr_dh_free (tr_dh_ctx_t raw_handle)
124++{
125++    DH* handle = raw_handle;
126++
127++    if (handle == NULL)
128++    {
129++        return;
130++    }
131++
132++    tr_free(handle->private_key);
133++    tr_free(handle);
134++}
135++
136++bool tr_dh_make_key(tr_dh_ctx_t raw_handle, size_t private_key_length, uint8_t* public_key, size_t* public_key_length)
137++{
138++    TR_ASSERT(raw_handle != NULL);
139++    TR_ASSERT(public_key != NULL);
140++
141++    DH* handle = raw_handle;
142++    br_rsa_public modexp;
143++    br_rsa_public_key key;
144++    uint8_t* x;
145++    size_t xlen;
146++
147++    modexp = br_rsa_public_get_default();
148++
149++    handle->private_key = tr_malloc(private_key_length);
150++    handle->private_key_length = private_key_length;
151++
152++    if (!handle->private_key)
153++    {
154++        goto fail;
155++    }
156++
157++    if (!tr_rand_buffer(handle->private_key, handle->private_key_length))
158++    {
159++        goto fail;
160++    }
161++
162++    memset(public_key, 0, handle->prime_num_length - handle->generator_num_length);
163++    memcpy(public_key + handle->prime_num_length - handle->generator_num_length, handle->generator_num, handle->generator_num_length);
164++
165++    key.n = (unsigned char*)handle->prime_num;
166++    key.nlen = handle->prime_num_length;
167++    key.e = handle->private_key;
168++    key.elen = handle->private_key_length;
169++
170++    if (!modexp(public_key, handle->prime_num_length, &key))
171++    {
172++        goto fail;
173++    }
174++
175++    *public_key_length = handle->prime_num_length;
176++
177++    return true;
178++
179++fail:
180++    tr_free(handle->private_key);
181++    handle->private_key = NULL;
182++    return false;
183++}
184++
185++tr_dh_secret_t tr_dh_agree(tr_dh_ctx_t raw_handle, uint8_t const* other_public_key, size_t other_public_key_length)
186++{
187++    TR_ASSERT(raw_handle != NULL);
188++    TR_ASSERT(other_public_key != NULL);
189++
190++    DH* handle = raw_handle;
191++    struct tr_dh_secret* ret;
192++    br_rsa_public modexp;
193++    br_rsa_public_key key;
194++    uint8_t* x;
195++    size_t xlen;
196++
197++    if (other_public_key_length > handle->prime_num_length)
198++    {
199++        return NULL;
200++    }
201++
202++    ret = tr_dh_secret_new(handle->prime_num_length);
203++    if (!ret)
204++    {
205++        return NULL;
206++    }
207++
208++    memset(ret->key, 0, ret->key_length - other_public_key_length);
209++    memcpy(ret->key + ret->key_length - other_public_key_length, other_public_key, other_public_key_length);
210++
211++    modexp = br_rsa_public_get_default();
212++
213++    key.n = (unsigned char*)handle->prime_num;
214++    key.nlen = handle->prime_num_length;
215++    key.e = handle->private_key;
216++    key.elen = handle->private_key_length;
217++
218++    if (!modexp(ret->key, ret->key_length, &key))
219++    {
220++        tr_dh_secret_free (ret);
221++        ret = NULL;
222++    }
223++
224++    return ret;
225++}
226++
227++/***
228++****
229++***/
230++
231++bool tr_rand_buffer(void* buffer, size_t length)
232++{
233++    TR_ASSERT(buffer != NULL);
234++
235++    static br_hmac_drbg_context ctx;
236++    static bool init;
237++    br_prng_seeder seeder;
238++
239++    if (!init)
240++    {
241++        br_hmac_drbg_init(&ctx, &br_sha256_vtable, NULL, 0);
242++        seeder = br_prng_seeder_system(NULL);
243++        if (!seeder || !seeder(&ctx.vtable))
244++        {
245++            return false;
246++        }
247++        init = true;
248++    }
249++
250++    br_hmac_drbg_generate(&ctx, buffer, length);
251++    return true;
252++}
253+diff --git a/libtransmission/crypto-utils-fallback.c b/libtransmission/crypto-utils-fallback.c
254+index c17b54e25..a521956a3 100644
255+--- a/libtransmission/crypto-utils-fallback.c
256++++ b/libtransmission/crypto-utils-fallback.c
257+@@ -92,3 +92,80 @@ void tr_x509_cert_free(tr_x509_cert_t handle)
258+ }
259+ 
260+ #endif /* TR_CRYPTO_X509_FALLBACK */
261++
262++#ifdef TR_CRYPTO_RC4_FALLBACK
263++
264++struct tr_rc4
265++{
266++  uint32_t i, j, S[256];
267++};
268++
269++tr_rc4_ctx_t
270++tr_rc4_new (void)
271++{
272++  return tr_malloc (sizeof (struct tr_rc4));
273++}
274++
275++void
276++tr_rc4_free (tr_rc4_ctx_t handle)
277++{
278++  tr_free (handle);
279++}
280++
281++void
282++tr_rc4_set_key (tr_rc4_ctx_t    raw_handle,
283++                const uint8_t * key,
284++                size_t key_length)
285++{
286++  struct tr_rc4 * handle = raw_handle;
287++  uint32_t tmp, * S;
288++  size_t i, j;
289++
290++  assert (handle != NULL);
291++  assert (key != NULL);
292++
293++  S = handle->S;
294++  for (i = 0; i < 256; ++i)
295++    S[i] = i;
296++
297++  j = 0;
298++  for (i = 0; i < 256; ++i) {
299++    j = (j + S[i] + key[i % key_length]) & 0xff;
300++    tmp = S[i];
301++    S[i] = S[j];
302++    S[j] = tmp;
303++  }
304++  handle->i = 0;
305++  handle->j = 0;
306++}
307++
308++void
309++tr_rc4_process (tr_rc4_ctx_t   raw_handle,
310++                const void   * raw_input,
311++                void         * raw_output,
312++                size_t         length)
313++{
314++  struct tr_rc4 * handle = raw_handle;
315++  const uint8_t * input = raw_input;
316++  uint8_t * output = raw_output;
317++  uint32_t * S, i, j, tmp;
318++
319++  assert (handle != NULL);
320++  assert (handle != NULL);
321++
322++  i = handle->i;
323++  j = handle->j;
324++  S = handle->S;
325++  while (length--) {
326++    i = (i + 1) & 0xff;
327++    j = (j + S[i]) & 0xff;
328++    tmp = S[i];
329++    S[i] = S[j];
330++    S[j] = tmp;
331++    *output++ = S[(S[i] + S[j]) & 0xff] ^ *input++;
332++  }
333++  handle->i = i;
334++  handle->j = j;
335++}
336++
337++#endif /* TR_CRYPTO_RC4_FALLBACK */
338+-- 
339+2.26.2
340+
+44, -0
 1@@ -0,0 +1,44 @@
 2+From ed525431bbe23d61c4c8dd4664c13bc19b4db889 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 24 Apr 2023 21:09:06 -0700
 5+Subject: [PATCH] Choose larger pieces for larger sizes
 6+
 7+---
 8+ libtransmission/makemeta.c | 21 ++++++++++++++++++---
 9+ 1 file changed, 18 insertions(+), 3 deletions(-)
10+
11+diff --git a/libtransmission/makemeta.c b/libtransmission/makemeta.c
12+index 713f3e5cb..ae422395d 100644
13+--- a/libtransmission/makemeta.c
14++++ b/libtransmission/makemeta.c
15+@@ -88,9 +88,24 @@ static struct FileList* getFiles(char const* dir, char const* base, struct FileL
16+ 
17+ static uint32_t bestPieceSize(uint64_t totalSize)
18+ {
19+-    uint32_t const KiB = 1024;
20+-    uint32_t const MiB = 1048576;
21+-    uint32_t const GiB = 1073741824;
22++    uint64_t const KiB = 1024;
23++    uint64_t const MiB = 1048576;
24++    uint64_t const GiB = 1073741824;
25++
26++    if (totalSize >= 16 * GiB)
27++    {
28++        return 16 * MiB;
29++    }
30++
31++    if (totalSize >= 8 * GiB)
32++    {
33++        return 8 * MiB;
34++    }
35++
36++    if (totalSize >= 4 * GiB)
37++    {
38++        return 4 * MiB;
39++    }
40+ 
41+     if (totalSize >= 2 * GiB)
42+     {
43+-- 
44+2.37.3
45+
+1, -0
1@@ -0,0 +1 @@
2+9144652fe742f7f7dd6657716e378da60b751aaeda8bef8344b3eefc4db255f2  transmission-3.00.tar.xz
+1, -0
1@@ -0,0 +1 @@
2+url = "https://github.com/transmission/transmission-releases/raw/master/transmission-3.00.tar.xz"
+1, -0
1@@ -0,0 +1 @@
2+3.00 r2
+17, -0
 1@@ -0,0 +1,17 @@
 2+BEGIN { print "return {" }
 3+
 4+FNR == 1 {
 5+	if (n)
 6+		print "\t},"
 7+	n = split(FILENAME, src, "/")
 8+	printf "\t%s={\n", src[n]
 9+}
10+
11+$1 == "Link" { printf "\t\t[\"%s\"]=\"%s\",\n", $3, $2 }
12+$1 == "Zone" { printf "\t\t[\"%s\"]=false,\n", $2 }
13+
14+END {
15+	if (n)
16+		print "\t},"
17+	print "}"
18+}
+494, -0
  1@@ -0,0 +1,494 @@
  2+-- 2,<cd src && awk -f ../data.awk africa antarctica asia australasia europe northamerica southamerica etcetera factory
  3+return {
  4+	africa={
  5+		["Africa/Algiers"]=false,
  6+		["Atlantic/Cape_Verde"]=false,
  7+		["Africa/Ndjamena"]=false,
  8+		["Africa/Abidjan"]=false,
  9+		["Africa/Accra"]="Africa/Abidjan",
 10+		["Africa/Bamako"]="Africa/Abidjan",
 11+		["Africa/Banjul"]="Africa/Abidjan",
 12+		["Africa/Conakry"]="Africa/Abidjan",
 13+		["Africa/Dakar"]="Africa/Abidjan",
 14+		["Africa/Freetown"]="Africa/Abidjan",
 15+		["Africa/Lome"]="Africa/Abidjan",
 16+		["Africa/Nouakchott"]="Africa/Abidjan",
 17+		["Africa/Ouagadougou"]="Africa/Abidjan",
 18+		["Atlantic/Reykjavik"]="Africa/Abidjan",
 19+		["Atlantic/St_Helena"]="Africa/Abidjan",
 20+		["Africa/Cairo"]=false,
 21+		["Africa/Bissau"]=false,
 22+		["Africa/Nairobi"]=false,
 23+		["Africa/Addis_Ababa"]="Africa/Nairobi",
 24+		["Africa/Asmara"]="Africa/Nairobi",
 25+		["Africa/Dar_es_Salaam"]="Africa/Nairobi",
 26+		["Africa/Djibouti"]="Africa/Nairobi",
 27+		["Africa/Kampala"]="Africa/Nairobi",
 28+		["Africa/Mogadishu"]="Africa/Nairobi",
 29+		["Indian/Antananarivo"]="Africa/Nairobi",
 30+		["Indian/Comoro"]="Africa/Nairobi",
 31+		["Indian/Mayotte"]="Africa/Nairobi",
 32+		["Africa/Monrovia"]=false,
 33+		["Africa/Tripoli"]=false,
 34+		["Indian/Mauritius"]=false,
 35+		["Africa/Casablanca"]=false,
 36+		["Africa/El_Aaiun"]=false,
 37+		["Africa/Maputo"]=false,
 38+		["Africa/Blantyre"]="Africa/Maputo",
 39+		["Africa/Bujumbura"]="Africa/Maputo",
 40+		["Africa/Gaborone"]="Africa/Maputo",
 41+		["Africa/Harare"]="Africa/Maputo",
 42+		["Africa/Kigali"]="Africa/Maputo",
 43+		["Africa/Lubumbashi"]="Africa/Maputo",
 44+		["Africa/Lusaka"]="Africa/Maputo",
 45+		["Africa/Windhoek"]=false,
 46+		["Africa/Lagos"]=false,
 47+		["Africa/Bangui"]="Africa/Lagos",
 48+		["Africa/Brazzaville"]="Africa/Lagos",
 49+		["Africa/Douala"]="Africa/Lagos",
 50+		["Africa/Kinshasa"]="Africa/Lagos",
 51+		["Africa/Libreville"]="Africa/Lagos",
 52+		["Africa/Luanda"]="Africa/Lagos",
 53+		["Africa/Malabo"]="Africa/Lagos",
 54+		["Africa/Niamey"]="Africa/Lagos",
 55+		["Africa/Porto-Novo"]="Africa/Lagos",
 56+		["Africa/Sao_Tome"]=false,
 57+		["Africa/Johannesburg"]=false,
 58+		["Africa/Maseru"]="Africa/Johannesburg",
 59+		["Africa/Mbabane"]="Africa/Johannesburg",
 60+		["Africa/Khartoum"]=false,
 61+		["Africa/Juba"]=false,
 62+		["Africa/Tunis"]=false,
 63+	},
 64+	antarctica={
 65+		["Antarctica/Casey"]=false,
 66+		["Antarctica/Davis"]=false,
 67+		["Antarctica/Mawson"]=false,
 68+		["Antarctica/Troll"]=false,
 69+		["Antarctica/Rothera"]=false,
 70+	},
 71+	asia={
 72+		["Asia/Kabul"]=false,
 73+		["Asia/Yerevan"]=false,
 74+		["Asia/Baku"]=false,
 75+		["Asia/Dhaka"]=false,
 76+		["Asia/Thimphu"]=false,
 77+		["Indian/Chagos"]=false,
 78+		["Asia/Yangon"]=false,
 79+		["Indian/Cocos"]="Asia/Yangon",
 80+		["Asia/Shanghai"]=false,
 81+		["Asia/Urumqi"]=false,
 82+		["Antarctica/Vostok"]="Asia/Urumqi",
 83+		["Asia/Hong_Kong"]=false,
 84+		["Asia/Taipei"]=false,
 85+		["Asia/Macau"]=false,
 86+		["Asia/Nicosia"]=false,
 87+		["Asia/Famagusta"]=false,
 88+		["Europe/Nicosia"]="Asia/Nicosia",
 89+		["Asia/Tbilisi"]=false,
 90+		["Asia/Dili"]=false,
 91+		["Asia/Kolkata"]=false,
 92+		["Asia/Jakarta"]=false,
 93+		["Asia/Pontianak"]=false,
 94+		["Asia/Makassar"]=false,
 95+		["Asia/Jayapura"]=false,
 96+		["Asia/Tehran"]=false,
 97+		["Asia/Baghdad"]=false,
 98+		["Asia/Jerusalem"]=false,
 99+		["Asia/Tokyo"]=false,
100+		["Asia/Amman"]=false,
101+		["Asia/Almaty"]=false,
102+		["Asia/Qyzylorda"]=false,
103+		["Asia/Qostanay"]=false,
104+		["Asia/Aqtobe"]=false,
105+		["Asia/Aqtau"]=false,
106+		["Asia/Atyrau"]=false,
107+		["Asia/Oral"]=false,
108+		["Asia/Bishkek"]=false,
109+		["Asia/Seoul"]=false,
110+		["Asia/Pyongyang"]=false,
111+		["Asia/Beirut"]=false,
112+		["Asia/Kuching"]=false,
113+		["Asia/Brunei"]="Asia/Kuching",
114+		["Indian/Maldives"]=false,
115+		["Indian/Kerguelen"]="Indian/Maldives",
116+		["Asia/Hovd"]=false,
117+		["Asia/Ulaanbaatar"]=false,
118+		["Asia/Choibalsan"]=false,
119+		["Asia/Kathmandu"]=false,
120+		["Asia/Karachi"]=false,
121+		["Asia/Gaza"]=false,
122+		["Asia/Hebron"]=false,
123+		["Asia/Manila"]=false,
124+		["Asia/Qatar"]=false,
125+		["Asia/Bahrain"]="Asia/Qatar",
126+		["Asia/Riyadh"]=false,
127+		["Antarctica/Syowa"]="Asia/Riyadh",
128+		["Asia/Aden"]="Asia/Riyadh",
129+		["Asia/Kuwait"]="Asia/Riyadh",
130+		["Asia/Singapore"]=false,
131+		["Asia/Kuala_Lumpur"]="Asia/Singapore",
132+		["Asia/Colombo"]=false,
133+		["Asia/Damascus"]=false,
134+		["Asia/Dushanbe"]=false,
135+		["Asia/Bangkok"]=false,
136+		["Asia/Phnom_Penh"]="Asia/Bangkok",
137+		["Asia/Vientiane"]="Asia/Bangkok",
138+		["Indian/Christmas"]="Asia/Bangkok",
139+		["Asia/Ashgabat"]=false,
140+		["Asia/Dubai"]=false,
141+		["Asia/Muscat"]="Asia/Dubai",
142+		["Indian/Mahe"]="Asia/Dubai",
143+		["Indian/Reunion"]="Asia/Dubai",
144+		["Asia/Samarkand"]=false,
145+		["Asia/Tashkent"]=false,
146+		["Asia/Ho_Chi_Minh"]=false,
147+	},
148+	australasia={
149+		["Australia/Darwin"]=false,
150+		["Australia/Perth"]=false,
151+		["Australia/Eucla"]=false,
152+		["Australia/Brisbane"]=false,
153+		["Australia/Lindeman"]=false,
154+		["Australia/Adelaide"]=false,
155+		["Australia/Hobart"]=false,
156+		["Australia/Melbourne"]=false,
157+		["Australia/Sydney"]=false,
158+		["Australia/Broken_Hill"]=false,
159+		["Australia/Lord_Howe"]=false,
160+		["Antarctica/Macquarie"]=false,
161+		["Pacific/Fiji"]=false,
162+		["Pacific/Gambier"]=false,
163+		["Pacific/Marquesas"]=false,
164+		["Pacific/Tahiti"]=false,
165+		["Pacific/Guam"]=false,
166+		["Pacific/Saipan"]="Pacific/Guam",
167+		["Pacific/Tarawa"]=false,
168+		["Pacific/Funafuti"]="Pacific/Tarawa",
169+		["Pacific/Majuro"]="Pacific/Tarawa",
170+		["Pacific/Wake"]="Pacific/Tarawa",
171+		["Pacific/Wallis"]="Pacific/Tarawa",
172+		["Pacific/Kanton"]=false,
173+		["Pacific/Kiritimati"]=false,
174+		["Pacific/Kwajalein"]=false,
175+		["Pacific/Kosrae"]=false,
176+		["Pacific/Nauru"]=false,
177+		["Pacific/Noumea"]=false,
178+		["Pacific/Auckland"]=false,
179+		["Antarctica/McMurdo"]="Pacific/Auckland",
180+		["Pacific/Chatham"]=false,
181+		["Pacific/Rarotonga"]=false,
182+		["Pacific/Niue"]=false,
183+		["Pacific/Norfolk"]=false,
184+		["Pacific/Palau"]=false,
185+		["Pacific/Port_Moresby"]=false,
186+		["Antarctica/DumontDUrville"]="Pacific/Port_Moresby",
187+		["Pacific/Chuuk"]="Pacific/Port_Moresby",
188+		["Pacific/Bougainville"]=false,
189+		["Pacific/Pitcairn"]=false,
190+		["Pacific/Pago_Pago"]=false,
191+		["Pacific/Midway"]="Pacific/Pago_Pago",
192+		["Pacific/Apia"]=false,
193+		["Pacific/Guadalcanal"]=false,
194+		["Pacific/Pohnpei"]="Pacific/Guadalcanal",
195+		["Pacific/Fakaofo"]=false,
196+		["Pacific/Tongatapu"]=false,
197+		["Pacific/Efate"]=false,
198+	},
199+	europe={
200+		["Europe/London"]=false,
201+		["Europe/Jersey"]="Europe/London",
202+		["Europe/Guernsey"]="Europe/London",
203+		["Europe/Isle_of_Man"]="Europe/London",
204+		["Europe/Dublin"]=false,
205+		["WET"]=false,
206+		["CET"]=false,
207+		["MET"]=false,
208+		["EET"]=false,
209+		["Europe/Tirane"]=false,
210+		["Europe/Andorra"]=false,
211+		["Europe/Vienna"]=false,
212+		["Europe/Minsk"]=false,
213+		["Europe/Brussels"]=false,
214+		["Europe/Amsterdam"]="Europe/Brussels",
215+		["Europe/Luxembourg"]="Europe/Brussels",
216+		["Europe/Sofia"]=false,
217+		["Europe/Prague"]=false,
218+		["Europe/Bratislava"]="Europe/Prague",
219+		["Atlantic/Faroe"]=false,
220+		["America/Danmarkshavn"]=false,
221+		["America/Scoresbysund"]=false,
222+		["America/Nuuk"]=false,
223+		["America/Thule"]=false,
224+		["Europe/Tallinn"]=false,
225+		["Europe/Helsinki"]=false,
226+		["Europe/Mariehamn"]="Europe/Helsinki",
227+		["Europe/Paris"]=false,
228+		["Europe/Monaco"]="Europe/Paris",
229+		["Europe/Berlin"]=false,
230+		["Arctic/Longyearbyen"]="Europe/Berlin",
231+		["Europe/Copenhagen"]="Europe/Berlin",
232+		["Europe/Oslo"]="Europe/Berlin",
233+		["Europe/Stockholm"]="Europe/Berlin",
234+		["Europe/Gibraltar"]=false,
235+		["Europe/Athens"]=false,
236+		["Europe/Budapest"]=false,
237+		["Europe/Rome"]=false,
238+		["Europe/Vatican"]="Europe/Rome",
239+		["Europe/San_Marino"]="Europe/Rome",
240+		["Europe/Riga"]=false,
241+		["Europe/Vilnius"]=false,
242+		["Europe/Malta"]=false,
243+		["Europe/Chisinau"]=false,
244+		["Europe/Warsaw"]=false,
245+		["Europe/Lisbon"]=false,
246+		["Atlantic/Azores"]=false,
247+		["Atlantic/Madeira"]=false,
248+		["Europe/Bucharest"]=false,
249+		["Europe/Kaliningrad"]=false,
250+		["Europe/Moscow"]=false,
251+		["Europe/Simferopol"]=false,
252+		["Europe/Astrakhan"]=false,
253+		["Europe/Volgograd"]=false,
254+		["Europe/Saratov"]=false,
255+		["Europe/Kirov"]=false,
256+		["Europe/Samara"]=false,
257+		["Europe/Ulyanovsk"]=false,
258+		["Asia/Yekaterinburg"]=false,
259+		["Asia/Omsk"]=false,
260+		["Asia/Barnaul"]=false,
261+		["Asia/Novosibirsk"]=false,
262+		["Asia/Tomsk"]=false,
263+		["Asia/Novokuznetsk"]=false,
264+		["Asia/Krasnoyarsk"]=false,
265+		["Asia/Irkutsk"]=false,
266+		["Asia/Chita"]=false,
267+		["Asia/Yakutsk"]=false,
268+		["Asia/Vladivostok"]=false,
269+		["Asia/Khandyga"]=false,
270+		["Asia/Sakhalin"]=false,
271+		["Asia/Magadan"]=false,
272+		["Asia/Srednekolymsk"]=false,
273+		["Asia/Ust-Nera"]=false,
274+		["Asia/Kamchatka"]=false,
275+		["Asia/Anadyr"]=false,
276+		["Europe/Belgrade"]=false,
277+		["Europe/Ljubljana"]="Europe/Belgrade",
278+		["Europe/Podgorica"]="Europe/Belgrade",
279+		["Europe/Sarajevo"]="Europe/Belgrade",
280+		["Europe/Skopje"]="Europe/Belgrade",
281+		["Europe/Zagreb"]="Europe/Belgrade",
282+		["Europe/Madrid"]=false,
283+		["Africa/Ceuta"]=false,
284+		["Atlantic/Canary"]=false,
285+		["Europe/Zurich"]=false,
286+		["Europe/Busingen"]="Europe/Zurich",
287+		["Europe/Vaduz"]="Europe/Zurich",
288+		["Europe/Istanbul"]=false,
289+		["Asia/Istanbul"]="Europe/Istanbul",
290+		["Europe/Kyiv"]=false,
291+		["Europe/Uzhgorod"]=false,
292+		["Europe/Zaporozhye"]=false,
293+	},
294+	northamerica={
295+		["EST"]=false,
296+		["MST"]=false,
297+		["HST"]=false,
298+		["EST5EDT"]=false,
299+		["CST6CDT"]=false,
300+		["MST7MDT"]=false,
301+		["PST8PDT"]=false,
302+		["America/New_York"]=false,
303+		["America/Chicago"]=false,
304+		["America/North_Dakota/Center"]=false,
305+		["America/North_Dakota/New_Salem"]=false,
306+		["America/North_Dakota/Beulah"]=false,
307+		["America/Denver"]=false,
308+		["America/Los_Angeles"]=false,
309+		["America/Juneau"]=false,
310+		["America/Sitka"]=false,
311+		["America/Metlakatla"]=false,
312+		["America/Yakutat"]=false,
313+		["America/Anchorage"]=false,
314+		["America/Nome"]=false,
315+		["America/Adak"]=false,
316+		["Pacific/Honolulu"]=false,
317+		["America/Phoenix"]=false,
318+		["America/Creston"]="America/Phoenix",
319+		["America/Boise"]=false,
320+		["America/Indiana/Indianapolis"]=false,
321+		["America/Indiana/Marengo"]=false,
322+		["America/Indiana/Vincennes"]=false,
323+		["America/Indiana/Tell_City"]=false,
324+		["America/Indiana/Petersburg"]=false,
325+		["America/Indiana/Knox"]=false,
326+		["America/Indiana/Winamac"]=false,
327+		["America/Indiana/Vevay"]=false,
328+		["America/Kentucky/Louisville"]=false,
329+		["America/Kentucky/Monticello"]=false,
330+		["America/Detroit"]=false,
331+		["America/Menominee"]=false,
332+		["America/St_Johns"]=false,
333+		["America/Goose_Bay"]=false,
334+		["America/Halifax"]=false,
335+		["America/Glace_Bay"]=false,
336+		["America/Moncton"]=false,
337+		["America/Toronto"]=false,
338+		["America/Nassau"]="America/Toronto",
339+		["America/Thunder_Bay"]=false,
340+		["America/Nipigon"]=false,
341+		["America/Rainy_River"]=false,
342+		["America/Winnipeg"]=false,
343+		["America/Regina"]=false,
344+		["America/Swift_Current"]=false,
345+		["America/Edmonton"]=false,
346+		["America/Vancouver"]=false,
347+		["America/Dawson_Creek"]=false,
348+		["America/Fort_Nelson"]=false,
349+		["America/Pangnirtung"]=false,
350+		["America/Iqaluit"]=false,
351+		["America/Resolute"]=false,
352+		["America/Rankin_Inlet"]=false,
353+		["America/Cambridge_Bay"]=false,
354+		["America/Yellowknife"]=false,
355+		["America/Inuvik"]=false,
356+		["America/Whitehorse"]=false,
357+		["America/Dawson"]=false,
358+		["America/Cancun"]=false,
359+		["America/Merida"]=false,
360+		["America/Matamoros"]=false,
361+		["America/Monterrey"]=false,
362+		["America/Mexico_City"]=false,
363+		["America/Ojinaga"]=false,
364+		["America/Chihuahua"]=false,
365+		["America/Hermosillo"]=false,
366+		["America/Mazatlan"]=false,
367+		["America/Bahia_Banderas"]=false,
368+		["America/Tijuana"]=false,
369+		["America/Barbados"]=false,
370+		["America/Belize"]=false,
371+		["Atlantic/Bermuda"]=false,
372+		["America/Costa_Rica"]=false,
373+		["America/Havana"]=false,
374+		["America/Santo_Domingo"]=false,
375+		["America/El_Salvador"]=false,
376+		["America/Guatemala"]=false,
377+		["America/Port-au-Prince"]=false,
378+		["America/Tegucigalpa"]=false,
379+		["America/Jamaica"]=false,
380+		["America/Martinique"]=false,
381+		["America/Managua"]=false,
382+		["America/Panama"]=false,
383+		["America/Atikokan"]="America/Panama",
384+		["America/Cayman"]="America/Panama",
385+		["America/Puerto_Rico"]=false,
386+		["America/Anguilla"]="America/Puerto_Rico",
387+		["America/Antigua"]="America/Puerto_Rico",
388+		["America/Aruba"]="America/Puerto_Rico",
389+		["America/Curacao"]="America/Puerto_Rico",
390+		["America/Blanc-Sablon"]="America/Puerto_Rico",
391+		["America/Dominica"]="America/Puerto_Rico",
392+		["America/Grenada"]="America/Puerto_Rico",
393+		["America/Guadeloupe"]="America/Puerto_Rico",
394+		["America/Kralendijk"]="America/Puerto_Rico",
395+		["America/Lower_Princes"]="America/Puerto_Rico",
396+		["America/Marigot"]="America/Puerto_Rico",
397+		["America/Montserrat"]="America/Puerto_Rico",
398+		["America/Port_of_Spain"]="America/Puerto_Rico",
399+		["America/St_Barthelemy"]="America/Puerto_Rico",
400+		["America/St_Kitts"]="America/Puerto_Rico",
401+		["America/St_Lucia"]="America/Puerto_Rico",
402+		["America/St_Thomas"]="America/Puerto_Rico",
403+		["America/St_Vincent"]="America/Puerto_Rico",
404+		["America/Tortola"]="America/Puerto_Rico",
405+		["America/Miquelon"]=false,
406+		["America/Grand_Turk"]=false,
407+	},
408+	southamerica={
409+		["America/Argentina/Buenos_Aires"]=false,
410+		["America/Argentina/Cordoba"]=false,
411+		["America/Argentina/Salta"]=false,
412+		["America/Argentina/Tucuman"]=false,
413+		["America/Argentina/La_Rioja"]=false,
414+		["America/Argentina/San_Juan"]=false,
415+		["America/Argentina/Jujuy"]=false,
416+		["America/Argentina/Catamarca"]=false,
417+		["America/Argentina/Mendoza"]=false,
418+		["America/Argentina/San_Luis"]=false,
419+		["America/Argentina/Rio_Gallegos"]=false,
420+		["America/Argentina/Ushuaia"]=false,
421+		["America/La_Paz"]=false,
422+		["America/Noronha"]=false,
423+		["America/Belem"]=false,
424+		["America/Santarem"]=false,
425+		["America/Fortaleza"]=false,
426+		["America/Recife"]=false,
427+		["America/Araguaina"]=false,
428+		["America/Maceio"]=false,
429+		["America/Bahia"]=false,
430+		["America/Sao_Paulo"]=false,
431+		["America/Campo_Grande"]=false,
432+		["America/Cuiaba"]=false,
433+		["America/Porto_Velho"]=false,
434+		["America/Boa_Vista"]=false,
435+		["America/Manaus"]=false,
436+		["America/Eirunepe"]=false,
437+		["America/Rio_Branco"]=false,
438+		["America/Santiago"]=false,
439+		["America/Punta_Arenas"]=false,
440+		["Pacific/Easter"]=false,
441+		["Antarctica/Palmer"]=false,
442+		["America/Bogota"]=false,
443+		["America/Guayaquil"]=false,
444+		["Pacific/Galapagos"]=false,
445+		["Atlantic/Stanley"]=false,
446+		["America/Cayenne"]=false,
447+		["America/Guyana"]=false,
448+		["America/Asuncion"]=false,
449+		["America/Lima"]=false,
450+		["Atlantic/South_Georgia"]=false,
451+		["America/Paramaribo"]=false,
452+		["America/Montevideo"]=false,
453+		["America/Caracas"]=false,
454+	},
455+	etcetera={
456+		["Etc/GMT"]=false,
457+		["Etc/UTC"]=false,
458+		["GMT"]="Etc/GMT",
459+		["Etc/Universal"]="Etc/UTC",
460+		["Etc/Zulu"]="Etc/UTC",
461+		["Etc/Greenwich"]="Etc/GMT",
462+		["Etc/GMT-0"]="Etc/GMT",
463+		["Etc/GMT+0"]="Etc/GMT",
464+		["Etc/GMT0"]="Etc/GMT",
465+		["Etc/GMT-14"]=false,
466+		["Etc/GMT-13"]=false,
467+		["Etc/GMT-12"]=false,
468+		["Etc/GMT-11"]=false,
469+		["Etc/GMT-10"]=false,
470+		["Etc/GMT-9"]=false,
471+		["Etc/GMT-8"]=false,
472+		["Etc/GMT-7"]=false,
473+		["Etc/GMT-6"]=false,
474+		["Etc/GMT-5"]=false,
475+		["Etc/GMT-4"]=false,
476+		["Etc/GMT-3"]=false,
477+		["Etc/GMT-2"]=false,
478+		["Etc/GMT-1"]=false,
479+		["Etc/GMT+1"]=false,
480+		["Etc/GMT+2"]=false,
481+		["Etc/GMT+3"]=false,
482+		["Etc/GMT+4"]=false,
483+		["Etc/GMT+5"]=false,
484+		["Etc/GMT+6"]=false,
485+		["Etc/GMT+7"]=false,
486+		["Etc/GMT+8"]=false,
487+		["Etc/GMT+9"]=false,
488+		["Etc/GMT+10"]=false,
489+		["Etc/GMT+11"]=false,
490+		["Etc/GMT+12"]=false,
491+	},
492+	factory={
493+		["Factory"]=false,
494+	},
495+}
+39, -0
 1@@ -0,0 +1,39 @@
 2+cflags{
 3+	'-I $dir',
 4+	[[-D 'ZIC_BLOAT_DEFAULT="slim"']],
 5+}
 6+
 7+exe('zic', {'zic.c'})
 8+file('bin/zic', '755', '$outdir/zic')
 9+man{'zic.8'}
10+
11+local srcs = {
12+	'africa',
13+	'antarctica',
14+	'asia',
15+	'australasia',
16+	'europe',
17+	'northamerica',
18+	'southamerica',
19+	'etcetera',
20+	'factory',
21+}
22+
23+local zones = {}
24+local data = load 'data.lua'
25+for _, src in ipairs(srcs) do
26+	for _, name, target in sortedpairs(data[src]) do
27+		if target then
28+			target = name:gsub('[^/]+', '..'):sub(1, -3)..target
29+			sym('share/zoneinfo/'..name, target)
30+		else
31+			file('share/zoneinfo/'..name, '644', '$outdir/zoneinfo/'..name)
32+			table.insert(zones, name)
33+		end
34+	end
35+end
36+
37+rule('zic', 'zic -d $outdir/zoneinfo $in')
38+build('zic', expand{'$outdir/zoneinfo/', zones}, expand{'$srcdir/', srcs})
39+
40+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit ce4d77644d2793027bb27f095dec7b530edcd947
+1, -0
1@@ -0,0 +1 @@
2+2022c r0
+3, -0
1@@ -0,0 +1,3 @@
2+static char const PKGVERSION[]="(tzcode) ";
3+static char const TZVERSION[]="2022c";
4+static char const REPORT_BUGS_TO[]="tz@iana.org";
+11, -0
 1@@ -0,0 +1,11 @@
 2+/* See LICENSE file for copyright and license details. */
 3+
 4+#define ENV_SUPATH	"/bin"
 5+#define ENV_PATH	"/bin"
 6+#define PW_CIPHER	"$6$"	/* SHA-512 */
 7+#undef UTMP_PATH
 8+#define UTMP_PATH	"/run/utmp"
 9+#undef BTMP_PATH
10+#define BTMP_PATH	"/var/log/btmp"
11+#undef WTMP_PATH
12+#define WTMP_PATH	"/var/log/wtmp"
+91, -0
 1@@ -0,0 +1,91 @@
 2+cflags{
 3+	'-std=c99', '-Wall', '-Wpedantic',
 4+	'-Wno-maybe-uninitialized', '-Wno-overflow', '-Wno-format-truncation',
 5+	'-D _GNU_SOURCE',
 6+	'-D _XOPEN_SOURCE=700',
 7+	'-I $dir',
 8+}
 9+
10+lib('libutil.a', [[libutil/(
11+	agetcwd.c
12+	agetline.c
13+	apathmax.c
14+	concat.c
15+	ealloc.c
16+	eprintf.c
17+	estrtol.c
18+	estrtoul.c
19+	explicit_bzero.c
20+	passwd.c
21+	proc.c
22+	putword.c
23+	recurse.c
24+	strlcat.c
25+	strlcpy.c
26+	strtonum.c
27+	tty.c
28+)]])
29+
30+local tools = {
31+	{'blkdiscard', 8},
32+	{'chvt', 1},
33+	{'clear', 1},
34+	{'ctrlaltdel', 8},
35+	{'df', 1},
36+	{'dmesg', 1},
37+	{'eject', 1},
38+	{'fallocate', 1},
39+	{'free', 1},
40+	{'freeramdisk', 8},
41+	{'fsfreeze', 8},
42+	{'getty', 8},
43+	{'halt', 8},
44+	{'hwclock', 8},
45+	{'id', 1},
46+	{'insmod', 8},
47+	{'killall5', 8},
48+	{'last'},
49+	{'lastlog', 8},
50+	{'login', 1},
51+	{'lsmod', 8},
52+	{'lsusb', 8},
53+	{'mesg', 1},
54+	{'mkswap', 8},
55+	{'mount', 8},
56+	{'mountpoint', 1},
57+	{'nologin', 8},
58+	{'pagesize', 1},
59+	{'passwd', 1, '4755'},
60+	{'pidof', 1},
61+	{'pivot_root', 8},
62+	{'ps', 1},
63+	{'pwdx', 1},
64+	{'readahead', 8},
65+	{'respawn', 1},
66+	{'rmmod', 8},
67+	{'stat', 1},
68+	{'stty'},
69+	{'swaplabel', 8},
70+	{'swapoff', 8},
71+	{'swapon', 8},
72+	{'switch_root', 8},
73+	{'sysctl', 8},
74+	{'truncate', 1},
75+	{'umount', 8},
76+	{'unshare', 1},
77+	{'uptime', 1},
78+	{'vmstat'},
79+	{'vtallow', 1},
80+	{'watch', 1},
81+	{'who', 1},
82+}
83+
84+for _, tool in ipairs(tools) do
85+	local name, sect, mode = tool[1], tool[2], tool[3]
86+	file('bin/'..name, mode or '755', exe(name, {name..'.c', 'libutil.a'}))
87+	if sect then
88+		man{name..'.'..sect}
89+	end
90+end
91+
92+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit f152e7fc3bd1675060818ac224f96541a2d9d6e7
+1, -0
1@@ -0,0 +1 @@
2+f152e7fc3b r0
+22, -0
 1@@ -0,0 +1,22 @@
 2+# util-linux
 3+
 4+## config.h
 5+Generated with
 6+
 7+	./configure \
 8+		--disable-all-programs \
 9+		--enable-fs-paths-default=/bin \
10+		--enable-fsck \
11+		--enable-libblkid \
12+		--enable-libmount \
13+		--enable-libuuid
14+
15+`HAVE_LIBBLKID` and `HAVE_LIBMOUNT` were undefined because although configure
16+requires that we enable them, they aren't actually needed to build fdisk.
17+
18+`_PATH_RUNSTATEDIR` and `LOCALEDIR` are defined in a separate top section. They
19+are normally defined with flags in `Makefile.am`.
20+
21+`HAVE_IOPERM` was removed since it appears to be unused. `HAVE_IOPL`
22+was removed since it is only used by `sys-utils/hwclock-cmos.c`,
23+which we don't build.
+320, -0
  1@@ -0,0 +1,320 @@
  2+#define _PATH_RUNSTATEDIR "/run"
  3+#define LOCALEDIR "/share/locale"
  4+
  5+/* #undef AC_APPLE_UNIVERSAL_BUILD */
  6+#define AGETTY_RELOAD 1
  7+#define CHFN_CHSH_PASSWORD 1
  8+#define CONFIG_ADJTIME_PATH "/etc/adjtime"
  9+/* #undef CRYPTSETUP_VIA_DLOPEN */
 10+/* #undef ENABLE_NLS */
 11+#define FS_SEARCH_PATH "/bin"
 12+/* #undef HAVE_ASM_IO_H */
 13+#define HAVE_BTRFS_SUPPORT 1
 14+#define HAVE_BYTESWAP_H 1
 15+/* #undef HAVE_CFLOCALECOPYCURRENT */
 16+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
 17+#define HAVE_CLEARENV 1
 18+#define HAVE_CLOCK_GETTIME 1
 19+/* #undef HAVE_CLOSE_RANGE */
 20+#define HAVE_CPU_SET_T 1
 21+/* #undef HAVE_CRYPTSETUP */
 22+/* #undef HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY */
 23+#define HAVE_CRYPT_H 1
 24+/* #undef HAVE_DCGETTEXT */
 25+#define HAVE_DECL_BLK_ZONE_REP_CAPACITY 1
 26+#define HAVE_DECL_CPU_ALLOC 1
 27+/* #undef HAVE_DECL_DIRFD */
 28+/* #undef HAVE_DECL_TZNAME */
 29+#define HAVE_DECL__NL_TIME_WEEK_1STDAY 0
 30+#define HAVE_DIRFD 1
 31+/* #undef HAVE_DIR_DD_FD */
 32+#define HAVE_DLFCN_H 1
 33+#define HAVE_EACCESS 1
 34+#define HAVE_ENDIAN_H 1
 35+#define HAVE_ENVIRON_DECL 1
 36+#define HAVE_ERR 1
 37+#define HAVE_ERRNO_H 1
 38+#define HAVE_ERRX 1
 39+#define HAVE_ERR_H 1
 40+#define HAVE_EXPLICIT_BZERO 1
 41+/* #undef HAVE_FALLOCATE */
 42+#define HAVE_FCNTL_H 1
 43+#define HAVE_FPURGE 1
 44+#define HAVE_FSEEKO 1
 45+#define HAVE_FSTATAT 1
 46+#define HAVE_FSYNC 1
 47+#define HAVE_FUTIMENS 1
 48+#define HAVE_GETDOMAINNAME 1
 49+#define HAVE_GETDTABLESIZE 1
 50+/* #undef HAVE_GETEXECNAME */
 51+/* #undef HAVE_GETMNTINFO */
 52+#define HAVE_GETOPT_H 1
 53+#define HAVE_GETRANDOM 1
 54+#define HAVE_GETRLIMIT 1
 55+/* #undef HAVE_GETSGNAM */
 56+/* #undef HAVE_GETTEXT */
 57+#define HAVE_GETUSERSHELL 1
 58+#define HAVE_ICONV 1
 59+#define HAVE_INOTIFY_INIT 1
 60+#define HAVE_INOTIFY_INIT1 1
 61+#define HAVE_INTTYPES_H 1
 62+#define HAVE_IOPERM 1
 63+#define HAVE_IOPL 1
 64+/* #undef HAVE_ISNAN */
 65+#define HAVE_JRAND48 1
 66+/* #undef HAVE_LANGINFO_ALTMON */
 67+#define HAVE_LANGINFO_H 1
 68+/* #undef HAVE_LANGINFO_NL_ABALTMON */
 69+#define HAVE_LASTLOG_H 1
 70+#define HAVE_LCHOWN 1
 71+/* #undef HAVE_LIBAUDIT */
 72+#define HAVE_LIBBLKID 1
 73+/* #undef HAVE_LIBCAP_NG */
 74+/* #undef HAVE_LIBCRYPT */
 75+/* #undef HAVE_LIBECONF */
 76+/* #undef HAVE_LIBMOUNT */
 77+/* #undef HAVE_LIBNCURSES */
 78+/* #undef HAVE_LIBNCURSESW */
 79+/* #undef HAVE_LIBREADLINE */
 80+/* #undef HAVE_LIBRTAS */
 81+/* #undef HAVE_LIBSELINUX */
 82+/* #undef HAVE_LIBSYSTEMD */
 83+/* #undef HAVE_LIBTINFO */
 84+/* #undef HAVE_LIBUDEV */
 85+/* #undef HAVE_LIBUSER */
 86+/* #undef HAVE_LIBUTEMPTER */
 87+#define HAVE_LIBUTIL 1
 88+/* #undef HAVE_LIBUTIL_H */
 89+#define HAVE_LIBUUID 1
 90+#define HAVE_LINUX_BLKPG_H 1
 91+#define HAVE_LINUX_BLKZONED_H 1
 92+#define HAVE_LINUX_BTRFS_H 1
 93+#define HAVE_LINUX_CAPABILITY_H 1
 94+#define HAVE_LINUX_CDROM_H 1
 95+/* #undef HAVE_LINUX_COMPILER_H */
 96+#define HAVE_LINUX_FALLOC_H 1
 97+#define HAVE_LINUX_FD_H 1
 98+#define HAVE_LINUX_FIEMAP_H 1
 99+#define HAVE_LINUX_FS_H 1
100+#define HAVE_LINUX_GSMMUX_H 1
101+#define HAVE_LINUX_MAJOR_H 1
102+#define HAVE_LINUX_NET_NAMESPACE_H 1
103+#define HAVE_LINUX_NSFS_H 1
104+/* #undef HAVE_LINUX_RAW_H */
105+#define HAVE_LINUX_SECUREBITS_H 1
106+#define HAVE_LINUX_TIOCL_H 1
107+#define HAVE_LINUX_VERSION_H 1
108+#define HAVE_LINUX_WATCHDOG_H 1
109+/* #undef HAVE_LLSEEK */
110+#define HAVE_LOCALE_H 1
111+/* #undef HAVE_LOFF_T */
112+/* #undef HAVE_MAGIC */
113+#define HAVE_MEMORY_H 1
114+#define HAVE_MEMPCPY 1
115+#define HAVE_MKOSTEMP 1
116+#define HAVE_MNTENT_H 1
117+#define HAVE_NANOSLEEP 1
118+/* #undef HAVE_NCURSESW_NCURSES_H */
119+/* #undef HAVE_NCURSESW_TERM_H */
120+/* #undef HAVE_NCURSES_H */
121+/* #undef HAVE_NCURSES_NCURSES_H */
122+/* #undef HAVE_NCURSES_TERM_H */
123+#define HAVE_NETINET_IN_H 1
124+/* #undef HAVE_NET_IF_DL_H */
125+#define HAVE_NET_IF_H 1
126+/* #undef HAVE_NTP_GETTIME */
127+#define HAVE_OPENAT 1
128+#define HAVE_OPEN_MEMSTREAM 1
129+#define HAVE_PATHS_H 1
130+/* #undef HAVE_PCRE2_POSIX */
131+#define HAVE_PERSONALITY 1
132+/* #undef HAVE_PIDFD_OPEN */
133+/* #undef HAVE_PIDFD_SEND_SIGNAL */
134+#define HAVE_POSIX_FADVISE 1
135+/* #undef HAVE_POSIX_FALLOCATE */
136+#define HAVE_PRCTL 1
137+/* #undef HAVE_PRLIMIT */
138+#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1
139+#define HAVE_PTY 1
140+#define HAVE_PTY_H 1
141+#define HAVE_QSORT_R 1
142+#define HAVE_REBOOT 1
143+/* #undef HAVE_RESIZETERM */
144+/* #undef HAVE_RPMATCH */
145+/* #undef HAVE_SA_LEN */
146+/* #undef HAVE_SCANDIRAT */
147+/* #undef HAVE_SCHED_SETATTR */
148+#define HAVE_SCHED_SETSCHEDULER 1
149+#define HAVE_SECURE_GETENV 1
150+/* #undef HAVE_SECURITY_GET_INITIAL_CONTEXT */
151+/* #undef HAVE_SECURITY_OPENPAM_H */
152+/* #undef HAVE_SECURITY_PAM_APPL_H */
153+/* #undef HAVE_SECURITY_PAM_MISC_H */
154+#define HAVE_SENDFILE 1
155+/* #undef HAVE_SETITIMER */
156+#define HAVE_SETNS 1
157+/* #undef HAVE_SETPROGNAME */
158+#define HAVE_SETRESGID 1
159+#define HAVE_SETRESUID 1
160+#define HAVE_SHADOW_H 1
161+#define HAVE_SIGHANDLER_T 1
162+#define HAVE_SIGQUEUE 1
163+/* #undef HAVE_SLANG_H */
164+/* #undef HAVE_SLANG_SLANG_H */
165+/* #undef HAVE_SLANG_SLCURSES_H */
166+/* #undef HAVE_SLCURSES_H */
167+/* #undef HAVE_SMACK */
168+#define HAVE_SRANDOM 1
169+#define HAVE_STDINT_H 1
170+#define HAVE_STDIO_EXT_H 1
171+#define HAVE_STDLIB_H 1
172+#define HAVE_STRINGS_H 1
173+#define HAVE_STRING_H 1
174+/* #undef HAVE_STRNCHR */
175+#define HAVE_STRNDUP 1
176+#define HAVE_STRNLEN 1
177+#define HAVE_STRSIGNAL_DECL 1
178+#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
179+#define HAVE_STRUCT_TERMIOS_C_LINE 1
180+#define HAVE_STRUCT_TM_TM_ZONE 1
181+#define HAVE_SWAPOFF 1
182+#define HAVE_SWAPON 1
183+#define HAVE_SYSCONF 1
184+#define HAVE_SYSINFO 1
185+/* #undef HAVE_SYS_DISKLABEL_H */
186+/* #undef HAVE_SYS_DISK_H */
187+/* #undef HAVE_SYS_ENDIAN_H */
188+#define HAVE_SYS_FILE_H 1
189+/* #undef HAVE_SYS_IOCCOM_H */
190+#define HAVE_SYS_IOCTL_H 1
191+#define HAVE_SYS_IO_H 1
192+/* #undef HAVE_SYS_MKDEV_H */
193+#define HAVE_SYS_MOUNT_H 1
194+#define HAVE_SYS_PARAM_H 1
195+#define HAVE_SYS_PRCTL_H 1
196+#define HAVE_SYS_RESOURCE_H 1
197+#define HAVE_SYS_SENDFILE_H 1
198+#define HAVE_SYS_SIGNALFD_H 1
199+#define HAVE_SYS_SOCKET_H 1
200+/* #undef HAVE_SYS_SOCKIO_H */
201+#define HAVE_SYS_STAT_H 1
202+#define HAVE_SYS_SWAP_H 1
203+#define HAVE_SYS_SYSCALL_H 1
204+#define HAVE_SYS_SYSMACROS_H 1
205+#define HAVE_SYS_TIMEX_H 1
206+#define HAVE_SYS_TIME_H 1
207+#define HAVE_SYS_TTYDEFAULTS_H 1
208+#define HAVE_SYS_TYPES_H 1
209+/* #undef HAVE_SYS_UCRED_H */
210+#define HAVE_SYS_UN_H 1
211+#define HAVE_SYS_XATTR_H 1
212+/* #undef HAVE_TERM_H */
213+#define HAVE_TIMEGM 1
214+#define HAVE_TIMER_CREATE 1
215+#ifdef HAVE__THREAD_LOCAL
216+# define HAVE_TLS 1
217+#endif
218+#define HAVE_TM_GMTOFF 1
219+#define HAVE_TM_ZONE 1
220+/* #undef HAVE_TZNAME */
221+/* #undef HAVE_UNION_SEMUN */
222+#define HAVE_UNISTD_H 1
223+#define HAVE_UNLINKAT 1
224+#define HAVE_UNSHARE 1
225+#define HAVE_UPDWTMPX 1
226+/* #undef HAVE_USE_DEFAULT_COLORS */
227+#define HAVE_USLEEP 1
228+#define HAVE_UTIMENSAT 1
229+#define HAVE_UTMPX_H 1
230+#define HAVE_UTMP_H 1
231+/* #undef HAVE_UUIDD */
232+#define HAVE_VWARNX 1
233+#define HAVE_WARN 1
234+#define HAVE_WARNX 1
235+#define HAVE_WIDECHAR 1
236+#define HAVE___FPENDING 1
237+#define HAVE___FPURGE 1
238+#define HAVE___PROGNAME 1
239+/* #undef HAVE___SECURE_GETENV */
240+#define LIBBLKID_DATE "01-Jun-2021"
241+#define LIBBLKID_VERSION "2.37.0"
242+#define LIBFDISK_VERSION "2.37.0"
243+#define LIBMOUNT_VERSION "2.37.0"
244+#define LIBSMARTCOLS_VERSION "2.37.0"
245+/* #undef LOGIN_CHOWN_VCS */
246+/* #undef LOGIN_STAT_MAIL */
247+#define LT_OBJDIR ".libs/"
248+/* #undef MULTIARCHTRIPLET */
249+/* #undef NDEBUG */
250+#define ONLY_LISTED_SHELLS 1
251+#define PACKAGE "util-linux"
252+#define PACKAGE_BUGREPORT "kzak@redhat.com"
253+#define PACKAGE_NAME "util-linux"
254+#define PACKAGE_STRING "util-linux 2.37"
255+#define PACKAGE_TARNAME "util-linux"
256+#define PACKAGE_URL "http://www.kernel.org/pub/linux/utils/util-linux/"
257+#define PACKAGE_VERSION "2.37"
258+#define PG_BELL 1
259+#define STDC_HEADERS 1
260+/* #undef SYS_close_range */
261+/* #undef SYS_fallocate */
262+/* #undef SYS_ioprio_get */
263+/* #undef SYS_ioprio_set */
264+/* #undef SYS_pidfd_open */
265+/* #undef SYS_pidfd_send_signal */
266+/* #undef SYS_pivot_root */
267+/* #undef SYS_prlimit64 */
268+/* #undef SYS_sched_getaffinity */
269+/* #undef SYS_sched_setattr */
270+/* #undef SYS_setns */
271+/* #undef SYS_swapoff */
272+/* #undef SYS_swapon */
273+/* #undef SYS_unshare */
274+/* #undef TM_IN_SYS_TIME */
275+#define USE_COLORS_BY_DEFAULT 1
276+/* #undef USE_HWCLOCK_CMOS */
277+#define USE_HWCLOCK_GPLv3_DATETIME 1
278+/* #undef USE_LIBMOUNT_SUPPORT_MTAB */
279+#define USE_LIBMOUNT_SUPPORT_NAMESPACES 1
280+#define USE_PLYMOUTH_SUPPORT 1
281+/* #undef USE_SULOGIN_EMERGENCY_MOUNT */
282+#ifndef _ALL_SOURCE
283+# define _ALL_SOURCE 1
284+#endif
285+#ifndef _GNU_SOURCE
286+# define _GNU_SOURCE 1
287+#endif
288+#ifndef _POSIX_PTHREAD_SEMANTICS
289+# define _POSIX_PTHREAD_SEMANTICS 1
290+#endif
291+#ifndef _TANDEM_SOURCE
292+# define _TANDEM_SOURCE 1
293+#endif
294+#ifndef __EXTENSIONS__
295+# define __EXTENSIONS__ 1
296+#endif
297+#define USE_TTY_GROUP 1
298+/* #undef USE_USRDIR_PATHS_ONLY */
299+/* #undef USE_VENDORDIR */
300+#define VERSION "2.37"
301+#if defined AC_APPLE_UNIVERSAL_BUILD
302+# if defined __BIG_ENDIAN__
303+#  define WORDS_BIGENDIAN 1
304+# endif
305+#else
306+# ifndef WORDS_BIGENDIAN
307+/* #  undef WORDS_BIGENDIAN */
308+# endif
309+#endif
310+/* #undef _DARWIN_C_SOURCE */
311+#ifndef _DARWIN_USE_64_BIT_INODE
312+# define _DARWIN_USE_64_BIT_INODE 1
313+#endif
314+/* #undef _FILE_OFFSET_BITS */
315+/* #undef _LARGEFILE_SOURCE */
316+/* #undef _LARGE_FILES */
317+/* #undef _MINIX */
318+/* #undef _POSIX_1_SOURCE */
319+/* #undef _POSIX_SOURCE */
320+/* #undef const */
321+/* #undef volatile */
+271, -0
  1@@ -0,0 +1,271 @@
  2+set('version', '2.37.0')
  3+cflags{
  4+	'-include $dir/config.h',
  5+	'-I $outdir',
  6+	'-I $srcdir/include',
  7+	'-I $srcdir/libblkid/src',
  8+	'-I $srcdir/libuuid/src',
  9+	'-isystem $builddir/pkg/linux-headers/include',
 10+}
 11+
 12+build('cat', '$outdir/config.h', {
 13+	'$builddir/probe/HAVE__THREAD_LOCAL',
 14+	'$dir/config.h',
 15+})
 16+
 17+build('sed', '$outdir/libsmartcols.h', '$srcdir/libsmartcols/src/libsmartcols.h.in', {
 18+	expr='s,@LIBSMARTCOLS_VERSION@,$version,',
 19+})
 20+build('sed', '$outdir/blkid.h', '$srcdir/libblkid/src/blkid.h.in', {
 21+	expr={
 22+		'-e /@LIBBLKID_VERSION@/d',
 23+		'-e /@LIBBLKID_DATE@/d',
 24+	},
 25+})
 26+build('sed', '$outdir/libfdisk.h', '$srcdir/libfdisk/src/libfdisk.h.in', {
 27+	expr={
 28+		'-e s,@LIBFDISK_VERSION@,$version,',
 29+		'-e /@LIBFDISK_MAJOR_VERSION@/d',
 30+		'-e /@LIBFDISK_MINOR_VERSION@/d',
 31+		'-e /@LIBFDISK_PATCH_VERSION@/d',
 32+	},
 33+})
 34+
 35+pkg.hdrs = {
 36+	copy('$outdir/include/uuid', '$srcdir/libuuid/src', {'uuid.h'}),
 37+	copy('$outdir/include/blkid', '$outdir', {'blkid.h'}),
 38+}
 39+pkg.deps = {
 40+	'$outdir/config.h',
 41+	'$outdir/libsmartcols.h',
 42+	'$outdir/libfdisk.h',
 43+	'pkg/linux-headers/headers',
 44+}
 45+
 46+lib('libcommon.a', [[
 47+	lib/(
 48+		blkdev.c
 49+		buffer.c
 50+		canonicalize.c
 51+		crc32.c
 52+		crc32c.c
 53+		encode.c
 54+		env.c
 55+		fileutils.c
 56+		idcache.c
 57+		jsonwrt.c
 58+		mangle.c
 59+		match.c
 60+		mbsalign.c
 61+		md5.c
 62+		pager.c
 63+		pwdutils.c
 64+		randutils.c
 65+		sha1.c
 66+		signames.c
 67+		strutils.c
 68+		strv.c
 69+		timeutils.c
 70+		ttyutils.c
 71+
 72+		linux_version.c
 73+		procutils.c
 74+		loopdev.c
 75+
 76+		cpuset.c
 77+
 78+		path.c
 79+		sysfs.c
 80+	)
 81+]])
 82+
 83+lib('libblkid.a', [[
 84+	libblkid/src/(
 85+		init.c
 86+		cache.c
 87+		config.c
 88+		dev.c
 89+		devname.c
 90+		devno.c
 91+		encode.c
 92+		evaluate.c
 93+		getsize.c
 94+		probe.c
 95+		read.c
 96+		resolve.c
 97+		save.c
 98+		tag.c
 99+		verify.c
100+		version.c
101+		partitions/(
102+			aix.c
103+			atari.c
104+			bsd.c
105+			dos.c
106+			gpt.c
107+			mac.c
108+			minix.c
109+			partitions.c
110+			sgi.c
111+			solaris_x86.c
112+			sun.c
113+			ultrix.c
114+			unixware.c
115+		)
116+		superblocks/(
117+			adaptec_raid.c
118+			apfs.c
119+			bcache.c
120+			befs.c
121+			bfs.c
122+			bitlocker.c
123+			bluestore.c
124+			btrfs.c
125+			cramfs.c
126+			ddf_raid.c
127+			drbd.c
128+			drbdproxy_datalog.c
129+			drbdmanage.c
130+			exfat.c
131+			exfs.c
132+			ext.c
133+			f2fs.c
134+			gfs.c
135+			hfs.c
136+			highpoint_raid.c
137+			hpfs.c
138+			iso9660.c
139+			isw_raid.c
140+			jfs.c
141+			jmicron_raid.c
142+			linux_raid.c
143+			lsi_raid.c
144+			luks.c
145+			lvm.c
146+			minix.c
147+			mpool.c
148+			netware.c
149+			nilfs.c
150+			ntfs.c
151+			refs.c
152+			nvidia_raid.c
153+			ocfs.c
154+			promise_raid.c
155+			reiserfs.c
156+			romfs.c
157+			silicon_raid.c
158+			squashfs.c
159+			stratis.c
160+			superblocks.c
161+			swap.c
162+			sysv.c
163+			ubi.c
164+			ubifs.c
165+			udf.c
166+			ufs.c
167+			vdo.c
168+			vfat.c
169+			via_raid.c
170+			vmfs.c
171+			vxfs.c
172+			xfs.c
173+			zfs.c
174+			zonefs.c
175+			erofs.c
176+		)
177+		topology/(
178+			topology.c
179+			dm.c
180+			evms.c
181+			ioctl.c
182+			lvm.c
183+			md.c
184+			sysfs.c
185+		)
186+	)
187+	libcommon.a
188+]])
189+
190+lib('libfdisk.a', [[
191+	libfdisk/src/(
192+		init.c
193+		field.c
194+		item.c
195+		test.c
196+		ask.c
197+		alignment.c
198+		label.c
199+		utils.c
200+		context.c
201+		parttype.c
202+		partition.c
203+		table.c
204+		iter.c
205+		script.c
206+		version.c
207+		wipe.c
208+
209+		sun.c
210+		sgi.c
211+		dos.c
212+		bsd.c
213+		gpt.c
214+	)
215+	libuuid.a libblkid.a libcommon.a
216+]])
217+
218+lib('libsmartcols.a', [[
219+	libsmartcols/src/(
220+		iter.c
221+		symbols.c
222+		cell.c
223+		column.c
224+		line.c
225+		table.c
226+		print.c
227+		print-api.c
228+		version.c
229+		buffer.c
230+		calculate.c
231+		grouping.c
232+		walk.c
233+		init.c
234+	)
235+	libtcolors.a
236+	libcommon.a
237+]])
238+
239+lib('libtcolors.a', 'lib/(colors.c color-names.c)')
240+
241+lib('libuuid.a', [[
242+	libuuid/src/(
243+		clear.c
244+		compare.c
245+		copy.c
246+		gen_uuid.c
247+		isnull.c
248+		pack.c
249+		parse.c
250+		unpack.c
251+		unparse.c
252+		uuid_time.c
253+		predefined.c
254+	)
255+	libcommon.a
256+]])
257+
258+exe('fdisk', [[
259+	disk-utils/(fdisk.c fdisk-menu.c fdisk-list.c)
260+	libfdisk.a.d libsmartcols.a.d
261+]])
262+file('bin/fdisk', '755', '$outdir/fdisk')
263+man{'$dir/man/fdisk.8'}
264+
265+exe('losetup', [[
266+	sys-utils/losetup.c
267+	libsmartcols.a.d libcommon.a
268+]])
269+file('bin/losetup', '755', '$outdir/losetup')
270+man{'$dir/man/losetup.8'}
271+
272+fetch 'git'
+294, -0
  1@@ -0,0 +1,294 @@
  2+'\" t
  3+.\"     Title: fdisk
  4+.\"    Author: [see the "AUTHOR(S)" section]
  5+.\" Generator: Asciidoctor 2.0.15
  6+.\"      Date: 2021-06-01
  7+.\"    Manual: System Administration
  8+.\"    Source: util-linux {release-version}
  9+.\"  Language: English
 10+.\"
 11+.TH "FDISK" "8" "2021-06-01" "util\-linux {release\-version}" "System Administration"
 12+.ie \n(.g .ds Aq \(aq
 13+.el       .ds Aq '
 14+.ss \n[.ss] 0
 15+.nh
 16+.ad l
 17+.de URL
 18+\fI\\$2\fP <\\$1>\\$3
 19+..
 20+.als MTO URL
 21+.if \n[.g] \{\
 22+.  mso www.tmac
 23+.  am URL
 24+.    ad l
 25+.  .
 26+.  am MTO
 27+.    ad l
 28+.  .
 29+.  LINKSTYLE blue R < >
 30+.\}
 31+.SH "NAME"
 32+fdisk \- manipulate disk partition table
 33+.SH "SYNOPSIS"
 34+.sp
 35+\fBfdisk\fP [options] \fIdevice\fP
 36+.sp
 37+\fBfdisk\fP \fB\-l\fP [\fIdevice\fP...]
 38+.SH "DESCRIPTION"
 39+.sp
 40+\fBfdisk\fP is a dialog\-driven program for creation and manipulation of partition tables. It understands GPT, MBR, Sun, SGI and BSD partition tables.
 41+.sp
 42+Block devices can be divided into one or more logical disks called \fIpartitions\fP. This division is recorded in the \fIpartition table\fP, usually found in sector 0 of the disk. (In the BSD world one talks about `disk slices\(aq and a `disklabel\(aq.)
 43+.sp
 44+All partitioning is driven by device I/O limits (the topology) by default. \fBfdisk\fP is able to optimize the disk layout for a 4K\-sector size and use an alignment offset on modern devices for MBR and GPT. It is always a good idea to follow \fBfdisk\fP\(aqs defaults as the default values (e.g., first and last partition sectors) and partition sizes specified by the +/\-<size>{M,G,...} notation are always aligned according to the device properties.
 45+.sp
 46+CHS (Cylinder\-Head\-Sector) addressing is deprecated and not used by default. Please, do not follow old articles and recommendations with \fBfdisk \-S <n> \-H <n>\fP advices for SSD or 4K\-sector devices.
 47+.sp
 48+Note that \fBpartx\fP(8) provides a rich interface for scripts to print disk layouts, \fBfdisk\fP is mostly designed for humans. Backward compatibility in the output of \fBfdisk\fP is not guaranteed. The input (the commands) should always be backward compatible.
 49+.SH "OPTIONS"
 50+.sp
 51+\fB\-b\fP, \fB\-\-sector\-size\fP \fIsectorsize\fP
 52+.RS 4
 53+Specify the sector size of the disk. Valid values are 512, 1024, 2048, and 4096. (Recent kernels know the sector size. Use this option only on old kernels or to override the kernel\(cqs ideas.) Since util\-linux\-2.17, \fBfdisk\fP differentiates between logical and physical sector size. This option changes both sector sizes to \fIsectorsize\fP.
 54+.RE
 55+.sp
 56+\fB\-B\fP, \fB\-\-protect\-boot\fP
 57+.RS 4
 58+Don\(cqt erase the beginning of the first disk sector when creating a new disk label. This feature is supported for GPT and MBR.
 59+.RE
 60+.sp
 61+\fB\-c\fP, \fB\-\-compatibility\fP[=\fImode\fP]
 62+.RS 4
 63+Specify the compatibility mode, \(aqdos\(aq or \(aqnondos\(aq. The default is non\-DOS mode. For backward compatibility, it is possible to use the option without the \fImode\fP argument \(em then the default is used. Note that the optional \fImode\fP argument cannot be separated from the \fB\-c\fP option by a space, the correct form is for example \fB\-c\fP=\fIdos\fP.
 64+.RE
 65+.sp
 66+\fB\-h\fP, \fB\-\-help\fP
 67+.RS 4
 68+Display a help text and exit.
 69+.RE
 70+.sp
 71+\fB\-L\fP, \fB\-\-color\fP[=\fIwhen\fP]
 72+.RS 4
 73+Colorize the output. The optional argument \fIwhen\fP can be \fBauto\fP, \fBnever\fP or \fBalways\fP. If the \fIwhen\fP argument is omitted, it defaults to \fBauto\fP. The colors can be disabled; for the current built\-in default see the \fB\-\-help\fP output. See also the \fBCOLORS\fP section.
 74+.RE
 75+.sp
 76+\fB\-l\fP, \fB\-\-list\fP
 77+.RS 4
 78+List the partition tables for the specified devices and then exit.
 79+.sp
 80+If no devices are given, the devices mentioned in \fI/proc/partitions\fP (if this file exists) are used. Devices are always listed in the order in which they are specified on the command\-line, or by the kernel listed in \fI/proc/partitions\fP.
 81+.RE
 82+.sp
 83+\fB\-x\fP, \fB\-\-list\-details\fP
 84+.RS 4
 85+Like \fB\-\-list\fP, but provides more details.
 86+.RE
 87+.sp
 88+\fB\-\-lock\fP[=\fImode\fP]
 89+.RS 4
 90+Use exclusive BSD lock for device or file it operates. The optional argument \fImode\fP can be \fByes\fP, \fBno\fP (or 1 and 0) or \fBnonblock\fP. If the \fImode\fP argument is omitted, it defaults to \fB"yes"\fP. This option overwrites environment variable \fB$LOCK_BLOCK_DEVICE\fP. The default is not to use any lock at all, but it\(cqs recommended to avoid collisions with udevd or other tools.
 91+.RE
 92+.sp
 93+\fB\-n\fP, \fB\-\-noauto\-pt\fP
 94+.RS 4
 95+Don\(cqt automatically create a default partition table on empty device. The partition table has to be explicitly created by user (by command like \(aqo\(aq, \(aqg\(aq, etc.).
 96+.RE
 97+.sp
 98+\fB\-o\fP, \fB\-\-output\fP \fIlist\fP
 99+.RS 4
100+Specify which output columns to print. Use \fB\-\-help\fP to get a list of all supported columns.
101+.sp
102+The default list of columns may be extended if \fIlist\fP is specified in the format \fI+list\fP (e.g., \fB\-o +UUID\fP).
103+.RE
104+.sp
105+\fB\-s\fP, \fB\-\-getsz\fP
106+.RS 4
107+Print the size in 512\-byte sectors of each given block device. This option is DEPRECATED in favour of \fBblockdev\fP(8).
108+.RE
109+.sp
110+\fB\-t\fP, \fB\-\-type\fP \fItype\fP
111+.RS 4
112+Enable support only for disklabels of the specified \fItype\fP, and disable support for all other types.
113+.RE
114+.sp
115+\fB\-u\fP, \fB\-\-units\fP[=\fIunit\fP]
116+.RS 4
117+When listing partition tables, show sizes in \(aqsectors\(aq or in \(aqcylinders\(aq. The default is to show sizes in sectors. For backward compatibility, it is possible to use the option without the \fIunit\fP argument \(em then the default is used. Note that the optional \fIunit\fP argument cannot be separated from the \fB\-u\fP option by a space, the correct form is for example \(aq*\-u=*\fIcylinders\fP\(aq.
118+.RE
119+.sp
120+\fB\-C\fP, \fB\-\-cylinders\fP \fInumber\fP
121+.RS 4
122+Specify the number of cylinders of the disk. I have no idea why anybody would want to do so.
123+.RE
124+.sp
125+\fB\-H\fP, \fB\-\-heads\fP \fInumber\fP
126+.RS 4
127+Specify the number of heads of the disk. (Not the physical number, of course, but the number used for partition tables.) Reasonable values are 255 and 16.
128+.RE
129+.sp
130+\fB\-S\fP, \fB\-\-sectors\fP \fInumber\fP
131+.RS 4
132+Specify the number of sectors per track of the disk. (Not the physical number, of course, but the number used for partition tables.) A reasonable value is 63.
133+.RE
134+.sp
135+\fB\-w\fP, \fB\-\-wipe\fP \fIwhen\fP
136+.RS 4
137+Wipe filesystem, RAID and partition\-table signatures from the device, in order to avoid possible collisions. The argument \fIwhen\fP can be \fBauto\fP, \fBnever\fP or \fBalways\fP. When this option is not given, the default is \fBauto\fP, in which case signatures are wiped only when in interactive mode. In all cases detected signatures are reported by warning messages before a new partition table is created. See also \fBwipefs\fP(8) command.
138+.RE
139+.sp
140+\fB\-W\fP, \fB\-\-wipe\-partitions\fP \fIwhen\fP
141+.RS 4
142+Wipe filesystem, RAID and partition\-table signatures from a newly created partitions, in order to avoid possible collisions. The argument \fIwhen\fP can be \fBauto\fP, \fBnever\fP or \fBalways\fP. When this option is not given, the default is \fBauto\fP, in which case signatures are wiped only when in interactive mode and after confirmation by user. In all cases detected signatures are reported by warning messages before a new partition is created. See also \fBwipefs\fP(8) command.
143+.RE
144+.sp
145+\fB\-V\fP, \fB\-\-version\fP
146+.RS 4
147+Display version information and exit.
148+.RE
149+.SH "DEVICES"
150+.sp
151+The \fIdevice\fP is usually \fI/dev/sda\fP, \fI/dev/sdb\fP or so. A device name refers to the entire disk. Old systems without libata (a library used inside the Linux kernel to support ATA host controllers and devices) make a difference between IDE and SCSI disks. In such cases the device name will be \fI/dev/hd*\fP (IDE) or \fI/dev/sd*\fP (SCSI).
152+.sp
153+The \fIpartition\fP is a device name followed by a partition number. For example, \fI/dev/sda1\fP is the first partition on the first hard disk in the system. See also Linux kernel documentation (the \fIDocumentation/admin\-guide/devices.txt\fP file).
154+.SH "SIZES"
155+.sp
156+The "last sector" dialog accepts partition size specified by number of sectors or by +/\-<size>{K,B,M,G,...} notation.
157+.sp
158+If the size is prefixed by \(aq+\(aq then it is interpreted as relative to the partition first sector. If the size is prefixed by \(aq\-\(aq then it is interpreted as relative to the high limit (last available sector for the partition).
159+.sp
160+In the case the size is specified in bytes than the number may be followed by the multiplicative suffixes KiB=1024, MiB=1024*1024, and so on for GiB, TiB, PiB, EiB, ZiB and YiB. The "iB" is optional, e.g., "K" has the same meaning as "KiB".
161+.sp
162+The relative sizes are always aligned according to device I/O limits. The +/\-<size>{K,B,M,G,...} notation is recommended.
163+.sp
164+For backward compatibility fdisk also accepts the suffixes KB=1000, MB=1000*1000, and so on for GB, TB, PB, EB, ZB and YB. These 10^N suffixes are deprecated.
165+.SH "SCRIPT FILES"
166+.sp
167+\fBfdisk\fP allows reading (by \(aqI\(aq command) \fBsfdisk\fP(8) compatible script files. The script is applied to in\-memory partition table, and then it is possible to modify the partition table before you write it to the device.
168+.sp
169+And vice\-versa it is possible to write the current in\-memory disk layout to the script file by command \(aqO\(aq.
170+.sp
171+The script files are compatible between \fBcfdisk\fP(8), \fBsfdisk\fP(8), \fBfdisk\fP and other libfdisk applications. For more details see \fBsfdisk\fP(8).
172+.SH "DISK LABELS"
173+.sp
174+\fBGPT (GUID Partition Table)\fP
175+.RS 4
176+GPT is modern standard for the layout of the partition table. GPT uses 64\-bit logical block addresses, checksums, UUIDs and names for partitions and an unlimited number of partitions (although the number of partitions is usually restricted to 128 in many partitioning tools).
177+.sp
178+Note that the first sector is still reserved for a \fBprotective MBR\fP in the GPT specification. It prevents MBR\-only partitioning tools from mis\-recognizing and overwriting GPT disks.
179+.sp
180+GPT is always a better choice than MBR, especially on modern hardware with a UEFI boot loader.
181+.RE
182+.sp
183+\fBDOS\-type (MBR)\fP
184+.RS 4
185+A DOS\-type partition table can describe an unlimited number of partitions. In sector 0 there is room for the description of 4 partitions (called `primary\(aq). One of these may be an extended partition; this is a box holding logical partitions, with descriptors found in a linked list of sectors, each preceding the corresponding logical partitions. The four primary partitions, present or not, get numbers 1\-4. Logical partitions are numbered starting from 5.
186+.sp
187+In a DOS\-type partition table the starting offset and the size of each partition is stored in two ways: as an absolute number of sectors (given in 32 bits), and as a \fBCylinders/Heads/Sectors\fP triple (given in 10+8+6 bits). The former is OK \(em with 512\-byte sectors this will work up to 2 TB. The latter has two problems. First, these C/H/S fields can be filled only when the number of heads and the number of sectors per track are known. And second, even if we know what these numbers should be, the 24 bits that are available do not suffice. DOS uses C/H/S only, Windows uses both, Linux never uses C/H/S. The \fBC/H/S addressing is deprecated\fP and may be unsupported in some later \fBfdisk\fP version.
188+.sp
189+\fBPlease, read the DOS\-mode section if you want DOS\-compatible partitions.\fP \fBfdisk\fP does not care about cylinder boundaries by default.
190+.RE
191+.sp
192+\fBBSD/Sun\-type\fP
193+.RS 4
194+A BSD/Sun disklabel can describe 8 partitions, the third of which should be a `whole disk\(aq partition. Do not start a partition that actually uses its first sector (like a swap partition) at cylinder 0, since that will destroy the disklabel. Note that a \fBBSD label\fP is usually nested within a DOS partition.
195+.RE
196+.sp
197+\fBIRIX/SGI\-type\fP
198+.RS 4
199+An IRIX/SGI disklabel can describe 16 partitions, the eleventh of which should be an entire `volume\(aq partition, while the ninth should be labeled `volume header\(aq. The volume header will also cover the partition table, i.e., it starts at block zero and extends by default over five cylinders. The remaining space in the volume header may be used by header directory entries. No partitions may overlap with the volume header. Also do not change its type or make some filesystem on it, since you will lose the partition table. Use this type of label only when working with Linux on IRIX/SGI machines or IRIX/SGI disks under Linux.
200+.sp
201+A sync() and an ioctl(BLKRRPART) (rereading the partition table from disk) are performed before exiting when the partition table has been updated.
202+.RE
203+.SH "DOS MODE AND DOS 6.X WARNING"
204+.sp
205+\fBNote that all this is deprecated. You don\(cqt have to care about things like\fP \fBgeometry and cylinders on modern operating systems. If you really want\fP \fBDOS\-compatible partitioning then you have to enable DOS mode and cylinder\fP \fBunits by using the \(aq\-c=dos \-u=cylinders\(aq fdisk command\-line options.\fP
206+.sp
207+The DOS 6.x FORMAT command looks for some information in the first sector of the data area of the partition, and treats this information as more reliable than the information in the partition table. DOS FORMAT expects DOS FDISK to clear the first 512 bytes of the data area of a partition whenever a size change occurs. DOS FORMAT will look at this extra information even if the /U flag is given \(em we consider this a bug in DOS FORMAT and DOS FDISK.
208+.sp
209+The bottom line is that if you use \fBfdisk\fP or \fBcfdisk\fP to change the size of a DOS partition table entry, then you must also use \fBdd\fP(1) to \fBzero the first 512 bytes\fP of that partition before using DOS FORMAT to format the partition. For example, if you were using \fBfdisk\fP to make a DOS partition table entry for \fI/dev/sda1\fP, then (after exiting \fBfdisk\fP and rebooting Linux so that the partition table information is valid) you would use the command \fBdd if=/dev/zero of=/dev/sda1 bs=512 count=1\fP to zero the first 512 bytes of the partition.
210+.sp
211+\fBfdisk\fP usually obtains the disk geometry automatically. This is not necessarily the physical disk geometry (indeed, modern disks do not really have anything like a physical geometry, certainly not something that can be described in the simplistic Cylinders/Heads/Sectors form), but it is the disk geometry that MS\-DOS uses for the partition table.
212+.sp
213+Usually all goes well by default, and there are no problems if Linux is the only system on the disk. However, if the disk has to be shared with other operating systems, it is often a good idea to let an \fBfdisk\fP from another operating system make at least one partition. When Linux boots it looks at the partition table, and tries to deduce what (fake) geometry is required for good cooperation with other systems.
214+.sp
215+Whenever a partition table is printed out in DOS mode, a consistency check is performed on the partition table entries. This check verifies that the physical and logical start and end points are identical, and that each partition starts and ends on a cylinder boundary (except for the first partition).
216+.sp
217+Some versions of MS\-DOS create a first partition which does not begin on a cylinder boundary, but on sector 2 of the first cylinder. Partitions beginning in cylinder 1 cannot begin on a cylinder boundary, but this is unlikely to cause difficulty unless you have OS/2 on your machine.
218+.sp
219+For best results, you should always use an OS\-specific partition table program. For example, you should make DOS partitions with the DOS FDISK program and Linux partitions with the Linux \fBfdisk\fP or Linux \fBcfdisk\fP(8) programs.
220+.SH "COLORS"
221+.sp
222+Implicit coloring can be disabled by an empty file \fI/etc/terminal\-colors.d/fdisk.disable\fP.
223+.sp
224+See \fBterminal\-colors.d\fP(5) for more details about colorization configuration. The logical color names supported by \fBfdisk\fP are:
225+.sp
226+\fBheader\fP
227+.RS 4
228+The header of the output tables.
229+.RE
230+.sp
231+\fBhelp\-title\fP
232+.RS 4
233+The help section titles.
234+.RE
235+.sp
236+\fBwarn\fP
237+.RS 4
238+The warning messages.
239+.RE
240+.sp
241+\fBwelcome\fP
242+.RS 4
243+The welcome message.
244+.RE
245+.SH "ENVIRONMENT"
246+.sp
247+\fBFDISK_DEBUG\fP=all
248+.RS 4
249+enables fdisk debug output.
250+.RE
251+.sp
252+\fBLIBFDISK_DEBUG\fP=all
253+.RS 4
254+enables libfdisk debug output.
255+.RE
256+.sp
257+\fBLIBBLKID_DEBUG\fP=all
258+.RS 4
259+enables libblkid debug output.
260+.RE
261+.sp
262+\fBLIBSMARTCOLS_DEBUG\fP=all
263+.RS 4
264+enables libsmartcols debug output.
265+.RE
266+.sp
267+\fBLIBSMARTCOLS_DEBUG_PADDING\fP=on
268+.RS 4
269+use visible padding characters. Requires enabled \fBLIBSMARTCOLS_DEBUG\fP.
270+.RE
271+.sp
272+\fBLOCK_BLOCK_DEVICE\fP=<mode>
273+.RS 4
274+use exclusive BSD lock. The mode is "1" or "0". See \fB\-\-lock\fP for more details.
275+.RE
276+.SH "AUTHORS"
277+.sp
278+.MTO "kzak\(atredhat.com" "Karel Zak" ","
279+.MTO "dave\(atgnu.org" "Davidlohr Bueso" ""
280+.sp
281+The original version was written by Andries E. Brouwer, A. V. Le Blanc and others.
282+.SH "SEE ALSO"
283+.sp
284+\fBcfdisk\fP(8),
285+\fBmkfs\fP(8),
286+\fBpartx\fP(8),
287+\fBsfdisk\fP(8)
288+.SH "REPORTING BUGS"
289+.sp
290+For bug reports, use the issue tracker at \c
291+.URL "https://github.com/karelzak/util\-linux/issues" "" "."
292+.SH "AVAILABILITY"
293+.sp
294+The \fBfdisk\fP command is part of the util\-linux package which can be downloaded from \c
295+.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."
+240, -0
  1@@ -0,0 +1,240 @@
  2+'\" t
  3+.\"     Title: losetup
  4+.\"    Author: [see the "AUTHOR(S)" section]
  5+.\" Generator: Asciidoctor 2.0.15
  6+.\"      Date: 2021-06-01
  7+.\"    Manual: System Administration
  8+.\"    Source: util-linux {release-version}
  9+.\"  Language: English
 10+.\"
 11+.TH "LOSETUP" "8" "2021-06-01" "util\-linux {release\-version}" "System Administration"
 12+.ie \n(.g .ds Aq \(aq
 13+.el       .ds Aq '
 14+.ss \n[.ss] 0
 15+.nh
 16+.ad l
 17+.de URL
 18+\fI\\$2\fP <\\$1>\\$3
 19+..
 20+.als MTO URL
 21+.if \n[.g] \{\
 22+.  mso www.tmac
 23+.  am URL
 24+.    ad l
 25+.  .
 26+.  am MTO
 27+.    ad l
 28+.  .
 29+.  LINKSTYLE blue R < >
 30+.\}
 31+.SH "NAME"
 32+losetup \- set up and control loop devices
 33+.SH "SYNOPSIS"
 34+.sp
 35+Get info:
 36+.sp
 37+\fBlosetup\fP [\fIloopdev\fP]
 38+.sp
 39+\fBlosetup\fP \fB\-l\fP [\fB\-a\fP]
 40+.sp
 41+\fBlosetup\fP \fB\-j\fP \fIfile\fP [\fB\-o\fP \fIoffset\fP]
 42+.sp
 43+Detach a loop device:
 44+.sp
 45+\fBlosetup\fP \fB\-d\fP \fIloopdev\fP ...
 46+.sp
 47+Detach all associated loop devices:
 48+.sp
 49+\fBlosetup\fP \fB\-D\fP
 50+.sp
 51+Set up a loop device:
 52+.sp
 53+\fBlosetup\fP [\fB\-o\fP \fIoffset\fP] [\fB\-\-sizelimit\fP \fIsize\fP] [\fB\-\-sector\-size\fP \fIsize\fP] [\fB\-Pr\fP] [\fB\-\-show\fP] \fB\-f\fP \fIloopdev file\fP
 54+.sp
 55+Resize a loop device:
 56+.sp
 57+\fBlosetup\fP \fB\-c\fP \fIloopdev\fP
 58+.SH "DESCRIPTION"
 59+.sp
 60+\fBlosetup\fP is used to associate loop devices with regular files or block devices, to detach loop devices, and to query the status of a loop device. If only the \fIloopdev\fP argument is given, the status of the corresponding loop device is shown. If no option is given, all loop devices are shown.
 61+.sp
 62+Note that the old output format (i.e., \fBlosetup \-a\fP) with comma\-delimited strings is deprecated in favour of the \fB\-\-list\fP output format.
 63+.sp
 64+It\(cqs possible to create more independent loop devices for the same backing file. \fBThis setup may be dangerous, can cause data loss, corruption and overwrites.\fP Use \fB\-\-nooverlap\fP with \fB\-\-find\fP during setup to avoid this problem.
 65+.sp
 66+The loop device setup is not an atomic operation when used with \fB\-\-find\fP, and \fBlosetup\fP does not protect this operation by any lock. The number of attempts is internally restricted to a maximum of 16. It is recommended to use for example flock1 to avoid a collision in heavily parallel use cases.
 67+.SH "OPTIONS"
 68+.sp
 69+The \fIsize\fP and \fIoffset\fP arguments may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
 70+.sp
 71+\fB\-a\fP, \fB\-\-all\fP
 72+.RS 4
 73+Show the status of all loop devices. Note that not all information is accessible for non\-root users. See also \fB\-\-list\fP. The old output format (as printed without \fB\-\-list)\fP is deprecated.
 74+.RE
 75+.sp
 76+\fB\-d\fP, \fB\-\-detach\fP \fIloopdev\fP...
 77+.RS 4
 78+Detach the file or device associated with the specified loop device(s). Note that since Linux v3.7 kernel uses "lazy device destruction". The detach operation does not return \fBEBUSY\fP error anymore if device is actively used by system, but it is marked by autoclear flag and destroyed later.
 79+.RE
 80+.sp
 81+\fB\-D\fP, \fB\-\-detach\-all\fP
 82+.RS 4
 83+Detach all associated loop devices.
 84+.RE
 85+.sp
 86+\fB\-f\fP, \fB\-\-find\fP [\fIfile\fP]
 87+.RS 4
 88+Find the first unused loop device. If a \fIfile\fP argument is present, use the found device as loop device. Otherwise, just print its name.
 89+.RE
 90+.sp
 91+\fB\-\-show\fP
 92+.RS 4
 93+Display the name of the assigned loop device if the \fB\-f\fP option and a \fIfile\fP argument are present.
 94+.RE
 95+.sp
 96+\fB\-L\fP, \fB\-\-nooverlap\fP
 97+.RS 4
 98+Check for conflicts between loop devices to avoid situation when the same backing file is shared between more loop devices. If the file is already used by another device then re\-use the device rather than a new one. The option makes sense only with \fB\-\-find\fP.
 99+.RE
100+.sp
101+\fB\-j\fP, \fB\-\-associated\fP \fIfile\fP [\fB\-o\fP \fIoffset\fP]
102+.RS 4
103+Show the status of all loop devices associated with the given \fIfile\fP.
104+.RE
105+.sp
106+\fB\-o\fP, \fB\-\-offset\fP \fIoffset\fP
107+.RS 4
108+The data start is moved \fIoffset\fP bytes into the specified file or device. The \fIoffset\fP may be followed by the multiplicative suffixes; see above.
109+.RE
110+.sp
111+\fB\-\-sizelimit\fP \fIsize\fP
112+.RS 4
113+The data end is set to no more than \fIsize\fP bytes after the data start. The \fIsize\fP may be followed by the multiplicative suffixes; see above.
114+.RE
115+.sp
116+\fB\-b\fP, \fB\-\-sector\-size\fP \fIsize\fP
117+.RS 4
118+Set the logical sector size of the loop device in bytes (since Linux 4.14). The option may be used when create a new loop device as well as stand\-alone command to modify sector size of the already existing loop device.
119+.RE
120+.sp
121+\fB\-c\fP, \fB\-\-set\-capacity\fP \fIloopdev\fP
122+.RS 4
123+Force the loop driver to reread the size of the file associated with the specified loop device.
124+.RE
125+.sp
126+\fB\-P\fP, \fB\-\-partscan\fP
127+.RS 4
128+Force the kernel to scan the partition table on a newly created loop device. Note that the partition table parsing depends on sector sizes. The default is sector size is 512 bytes, otherwise you need to use the option \fB\-\-sector\-size\fP together with \fB\-\-partscan\fP.
129+.RE
130+.sp
131+\fB\-r\fP, \fB\-\-read\-only\fP
132+.RS 4
133+Set up a read\-only loop device.
134+.RE
135+.sp
136+\fB\-\-direct\-io\fP[\fB=on\fP|\fBoff\fP]
137+.RS 4
138+Enable or disable direct I/O for the backing file. The optional argument can be either \fBon\fP or \fBoff\fP. If the argument is omitted, it defaults to \fBoff\fP.
139+.RE
140+.sp
141+\fB\-v\fP, \fB\-\-verbose\fP
142+.RS 4
143+Verbose mode.
144+.RE
145+.sp
146+\fB\-l\fP, \fB\-\-list\fP
147+.RS 4
148+If a loop device or the \fB\-a\fP option is specified, print the default columns for either the specified loop device or all loop devices; the default is to print info about all devices. See also \fB\-\-output\fP, \fB\-\-noheadings\fP, \fB\-\-raw\fP, and \fB\-\-json\fP.
149+.RE
150+.sp
151+\fB\-O\fP, \fB\-\-output\fP \fIcolumn\fP[,\fIcolumn\fP]...
152+.RS 4
153+Specify the columns that are to be printed for the \fB\-\-list\fP output. Use \fB\-\-help\fP to get a list of all supported columns.
154+.RE
155+.sp
156+\fB\-\-output\-all\fP
157+.RS 4
158+Output all available columns.
159+.RE
160+.sp
161+\fB\-n\fP, \fB\-\-noheadings\fP
162+.RS 4
163+Don\(cqt print headings for \fB\-\-list\fP output format.
164+.RE
165+.sp
166+\fB\-\-raw\fP
167+.RS 4
168+Use the raw \fB\-\-list\fP output format.
169+.RE
170+.sp
171+\fB\-J\fP, \fB\-\-json\fP
172+.RS 4
173+Use JSON format for \fB\-\-list\fP output.
174+.RE
175+.sp
176+\fB\-V\fP, \fB\-\-version\fP
177+.RS 4
178+Display version information and exit.
179+.RE
180+.sp
181+\fB\-h\fP, \fB\-\-help\fP
182+.RS 4
183+Display help text and exit.
184+.RE
185+.SH "ENCRYPTION"
186+.sp
187+\fBCryptoloop is no longer supported in favor of dm\-crypt.\fP For more details see \fBcryptsetup\fP(8).
188+.SH "EXIT STATUS"
189+.sp
190+\fBlosetup\fP returns 0 on success, nonzero on failure. When \fBlosetup\fP displays the status of a loop device, it returns 1 if the device is not configured and 2 if an error occurred which prevented determining the status of the device.
191+.SH "NOTES"
192+.sp
193+Since version 2.37 \fBlosetup\fP uses \fBLOOP_CONFIGURE\fP ioctl to setup a new loop device by one ioctl call. The old versions use \fBLOOP_SET_FD\fP and \fBLOOP_SET_STATUS64\fP ioctls to do the same.
194+.SH "ENVIRONMENT"
195+.sp
196+LOOPDEV_DEBUG=all
197+.RS 4
198+enables debug output.
199+.RE
200+.SH "FILES"
201+.sp
202+\fI/dev/loop[0..N]\fP
203+.RS 4
204+loop block devices
205+.RE
206+.sp
207+\fI/dev/loop\-control\fP
208+.RS 4
209+loop control device
210+.RE
211+.SH "EXAMPLE"
212+.sp
213+The following commands can be used as an example of using the loop device.
214+.sp
215+.if n .RS 4
216+.nf
217+.fam C
218+# dd if=/dev/zero of=~/file.img bs=1024k count=10
219+# losetup \-\-find \-\-show ~/file.img
220+/dev/loop0
221+# mkfs \-t ext2 /dev/loop0
222+# mount /dev/loop0 /mnt
223+\&...
224+# umount /dev/loop0
225+# losetup \-\-detach /dev/loop0
226+.fam
227+.fi
228+.if n .RE
229+.SH "AUTHORS"
230+.sp
231+.MTO "kzak\(atredhat.com" "Karel Zak" ","
232+based on the original version from
233+.MTO "tytso\(atathena.mit.edu" "Theodore Ts\(cqo" "."
234+.SH "REPORTING BUGS"
235+.sp
236+For bug reports, use the issue tracker at \c
237+.URL "https://github.com/karelzak/util\-linux/issues" "" "."
238+.SH "AVAILABILITY"
239+.sp
240+The \fBlosetup\fP command is part of the util\-linux package which can be downloaded from \c
241+.URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."
+95, -0
 1@@ -0,0 +1,95 @@
 2+From 8dc30022b3a899eae7e323b99b5e4fb79518e216 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 18 Jun 2019 01:38:53 -0700
 5+Subject: [PATCH] Don't omit second operand to `?` operator
 6+
 7+---
 8+ libfdisk/src/bsd.c      | 2 +-
 9+ libfdisk/src/dos.c      | 2 +-
10+ libfdisk/src/gpt.c      | 2 +-
11+ libfdisk/src/parttype.c | 2 +-
12+ libfdisk/src/sgi.c      | 2 +-
13+ libfdisk/src/sun.c      | 2 +-
14+ 6 files changed, 6 insertions(+), 6 deletions(-)
15+
16+diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c
17+index 313ae5ae0..0883915f6 100644
18+--- a/libfdisk/src/bsd.c
19++++ b/libfdisk/src/bsd.c
20+@@ -116,7 +116,7 @@ static struct fdisk_parttype *bsd_partition_parttype(
21+ {
22+ 	struct fdisk_parttype *t
23+ 		= fdisk_label_get_parttype_from_code(cxt->label, p->p_fstype);
24+-	return t ? : fdisk_new_unknown_parttype(p->p_fstype, NULL);
25++	return t ? t : fdisk_new_unknown_parttype(p->p_fstype, NULL);
26+ }
27+ 
28+ 
29+diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
30+index 4368e5266..a8103ac72 100644
31+--- a/libfdisk/src/dos.c
32++++ b/libfdisk/src/dos.c
33+@@ -148,7 +148,7 @@ static struct fdisk_parttype *dos_partition_parttype(
34+ {
35+ 	struct fdisk_parttype *t
36+ 		= fdisk_label_get_parttype_from_code(cxt->label, p->sys_ind);
37+-	return t ? : fdisk_new_unknown_parttype(p->sys_ind, NULL);
38++	return t ? t : fdisk_new_unknown_parttype(p->sys_ind, NULL);
39+ }
40+ 
41+ /*
42+diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
43+index 97b161312..5fd9b4d73 100644
44+--- a/libfdisk/src/gpt.c
45++++ b/libfdisk/src/gpt.c
46+@@ -262,7 +262,7 @@ static struct fdisk_parttype *gpt_partition_parttype(
47+ 
48+ 	guid_to_string(&guid, str);
49+ 	t = fdisk_label_get_parttype_from_string(cxt->label, str);
50+-	return t ? : fdisk_new_unknown_parttype(0, str);
51++	return t ? t : fdisk_new_unknown_parttype(0, str);
52+ }
53+ 
54+ static void gpt_entry_set_type(struct gpt_entry *e, struct gpt_guid *uuid)
55+diff --git a/libfdisk/src/parttype.c b/libfdisk/src/parttype.c
56+index 3a5db9c28..b8d017a1d 100644
57+--- a/libfdisk/src/parttype.c
58++++ b/libfdisk/src/parttype.c
59+@@ -491,7 +491,7 @@ struct fdisk_parttype *fdisk_label_advparse_parttype(
60+ 
61+ 	if (res)
62+ 		DBG(PARTTYPE, ul_debugobj(res, "returns parsed '%s' [%s] partition type",
63+-				res->name, res->typestr ? : ""));
64++				res->name, res->typestr ? res->typestr : ""));
65+ 	return res;
66+ }
67+ 
68+diff --git a/libfdisk/src/sgi.c b/libfdisk/src/sgi.c
69+index 64adf3454..02fd59650 100644
70+--- a/libfdisk/src/sgi.c
71++++ b/libfdisk/src/sgi.c
72+@@ -351,7 +351,7 @@ static struct fdisk_parttype *sgi_get_parttype(struct fdisk_context *cxt, size_t
73+ 		return NULL;
74+ 
75+ 	t = fdisk_label_get_parttype_from_code(cxt->label, sgi_get_sysid(cxt, n));
76+-	return t ? : fdisk_new_unknown_parttype(sgi_get_sysid(cxt, n), NULL);
77++	return t ? t : fdisk_new_unknown_parttype(sgi_get_sysid(cxt, n), NULL);
78+ }
79+ 
80+ /* fdisk_get_partition() backend */
81+diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c
82+index 4c3b1d8cb..7a5c63b5b 100644
83+--- a/libfdisk/src/sun.c
84++++ b/libfdisk/src/sun.c
85+@@ -827,7 +827,7 @@ static struct fdisk_parttype *sun_get_parttype(
86+ 
87+ 	t = fdisk_label_get_parttype_from_code(cxt->label,
88+ 			be16_to_cpu(sunlabel->vtoc.infos[n].id));
89+-	return t ? : fdisk_new_unknown_parttype(be16_to_cpu(sunlabel->vtoc.infos[n].id), NULL);
90++	return t ? t : fdisk_new_unknown_parttype(be16_to_cpu(sunlabel->vtoc.infos[n].id), NULL);
91+ }
92+ 
93+ 
94+-- 
95+2.31.1
96+
+55, -0
 1@@ -0,0 +1,55 @@
 2+From edb05302e2c747253afd4698bc445e36c8726306 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 18 Jun 2019 02:29:07 -0700
 5+Subject: [PATCH] Avoid a few unnecessary statement expressions
 6+
 7+---
 8+ include/c.h | 13 ++++++-------
 9+ 1 file changed, 6 insertions(+), 7 deletions(-)
10+
11+diff --git a/include/c.h b/include/c.h
12+index b891ad480..b420b5187 100644
13+--- a/include/c.h
14++++ b/include/c.h
15+@@ -176,9 +176,8 @@
16+  * @member:	the name of the member within the struct.
17+  */
18+ #ifndef container_of
19+-#define container_of(ptr, type, member) __extension__ ({	\
20+-	const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
21+-	(type *)( (char *)__mptr - offsetof(type,member) );})
22++#define container_of(ptr, type, member)		\
23++	((type *)( (char *)ptr - offsetof(type,member) ))
24+ #endif
25+ 
26+ #ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
27+@@ -256,11 +255,11 @@ errmsg(char doexit, int excode, char adderr, const char *fmt, ...)
28+ 
29+ /* Don't use inline function to avoid '#include "nls.h"' in c.h
30+  */
31+-#define errtryhelp(eval) __extension__ ({ \
32++#define errtryhelp(eval) do { \
33+ 	fprintf(stderr, _("Try '%s --help' for more information.\n"), \
34+ 			program_invocation_short_name); \
35+ 	exit(eval); \
36+-})
37++} while (0)
38+ 
39+ /* After failed execvp() */
40+ #define EX_EXEC_FAILED		126	/* Program located, but not usable. */
41+@@ -387,10 +386,10 @@ static inline int xusleep(useconds_t usec)
42+ 
43+ #define UTIL_LINUX_VERSION _("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING
44+ 
45+-#define print_version(eval) __extension__ ({ \
46++#define print_version(eval) do { \
47+ 		printf(UTIL_LINUX_VERSION); \
48+ 		exit(eval); \
49+-})
50++} while (0)
51+ 
52+ /*
53+  * seek stuff
54+-- 
55+2.31.1
56+
+36, -0
 1@@ -0,0 +1,36 @@
 2+From 417ef5a41b19c9cc7ccdf3002453c0fec9caa960 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 18 Jun 2019 02:31:19 -0700
 5+Subject: [PATCH] Don't use min to determine if dflt is non-zero
 6+
 7+---
 8+ libfdisk/src/bsd.c | 6 ++----
 9+ 1 file changed, 2 insertions(+), 4 deletions(-)
10+
11+diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c
12+index 817f50c87..25e878c32 100644
13+--- a/libfdisk/src/bsd.c
14++++ b/libfdisk/src/bsd.c
15+@@ -576,8 +576,7 @@ static uint32_t ask_uint32(struct fdisk_context *cxt,
16+ {
17+ 	uintmax_t res;
18+ 
19+-	if (fdisk_ask_number(cxt, min(dflt, (uint32_t) 1), dflt,
20+-				UINT32_MAX, mesg, &res) == 0)
21++	if (fdisk_ask_number(cxt, !!dflt, dflt, UINT32_MAX, mesg, &res) == 0)
22+ 		return res;
23+ 	return dflt;
24+ }
25+@@ -587,8 +586,7 @@ static uint16_t ask_uint16(struct fdisk_context *cxt,
26+ {
27+ 	uintmax_t res;
28+ 
29+-	if (fdisk_ask_number(cxt, min(dflt, (uint16_t) 1),
30+-				dflt, UINT16_MAX, mesg, &res) == 0)
31++	if (fdisk_ask_number(cxt, !!dflt, dflt, UINT16_MAX, mesg, &res) == 0)
32+ 		return res;
33+ 	return dflt;
34+ }
35+-- 
36+2.20.1
37+
+83, -0
 1@@ -0,0 +1,83 @@
 2+From 1c563b2cc82ee2f7ec5daeba5747346250fcc2e2 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 18 Jun 2019 11:54:57 -0700
 5+Subject: [PATCH] Remove need for VLA for label name
 6+
 7+---
 8+ disk-utils/fdisk-list.c    | 10 +++-------
 9+ libfdisk/src/label.c       |  6 ++++--
10+ libfdisk/src/libfdisk.h.in |  2 +-
11+ 3 files changed, 8 insertions(+), 10 deletions(-)
12+
13+diff --git a/disk-utils/fdisk-list.c b/disk-utils/fdisk-list.c
14+index 62aa2b3f5..dafab3ca4 100644
15+--- a/disk-utils/fdisk-list.c
16++++ b/disk-utils/fdisk-list.c
17+@@ -469,19 +469,15 @@ void list_available_columns(FILE *out)
18+ static int fieldname_to_id(const char *name, size_t namesz)
19+ {
20+ 	const struct fdisk_field *fl;
21+-	char buf[namesz + 1];
22+ 
23+ 	assert(name);
24+ 	assert(namesz);
25+ 	assert(fields_label);
26+ 
27+-	memcpy(buf, name, namesz);
28+-	buf[namesz] = '\0';
29+-
30+-	fl = fdisk_label_get_field_by_name(fields_label, buf);
31++	fl = fdisk_label_get_field_by_name(fields_label, name, namesz);
32+ 	if (!fl) {
33+-		warnx(_("%s unknown column: %s"),
34+-				fdisk_label_get_name(fields_label), buf);
35++		warnx(_("%s unknown column: %.*s"),
36++				fdisk_label_get_name(fields_label), (int)namesz, name);
37+ 		return -1;
38+ 	}
39+ 	return fdisk_field_get_id(fl);
40+diff --git a/libfdisk/src/label.c b/libfdisk/src/label.c
41+index 524a2bfb4..e0ec7da43 100644
42+--- a/libfdisk/src/label.c
43++++ b/libfdisk/src/label.c
44+@@ -223,12 +223,14 @@ const struct fdisk_field *fdisk_label_get_field(const struct fdisk_label *lb, in
45+  * fdisk_label_get_field_by_name
46+  * @lb: label
47+  * @name: field name
48++ * @len: field name length
49+  *
50+  * Returns: pointer to static instance of the field.
51+  */
52+ const struct fdisk_field *fdisk_label_get_field_by_name(
53+ 				const struct fdisk_label *lb,
54+-				const char *name)
55++				const char *name,
56++				size_t len)
57+ {
58+ 	size_t i;
59+ 
60+@@ -236,7 +238,7 @@ const struct fdisk_field *fdisk_label_get_field_by_name(
61+ 	assert(name);
62+ 
63+ 	for (i = 0; i < lb->nfields; i++) {
64+-		if (lb->fields[i].name && strcasecmp(lb->fields[i].name, name) == 0)
65++		if (lb->fields[i].name && strncasecmp(lb->fields[i].name, name, len) == 0 && lb->fields[i].name[len] == '\0')
66+ 			return &lb->fields[i];
67+ 	}
68+ 
69+diff --git a/libfdisk/src/libfdisk.h.in b/libfdisk/src/libfdisk.h.in
70+index 6f2e77d04..a0e7aa4b2 100644
71+--- a/libfdisk/src/libfdisk.h.in
72++++ b/libfdisk/src/libfdisk.h.in
73+@@ -466,7 +466,7 @@ extern int fdisk_label_get_fields_ids_all(
74+ extern const struct fdisk_field *fdisk_label_get_field(const struct fdisk_label *lb, int id);
75+ extern const struct fdisk_field *fdisk_label_get_field_by_name(
76+ 			const struct fdisk_label *lb,
77+-			const char *name);
78++			const char *name, size_t len);
79+ 
80+ extern void fdisk_label_set_changed(struct fdisk_label *lb, int changed);
81+ extern int fdisk_label_is_changed(const struct fdisk_label *lb);
82+-- 
83+2.31.1
84+
+285, -0
  1@@ -0,0 +1,285 @@
  2+From ad5d729e363236dbdcf15b82d8575bd5d9db77ea Mon Sep 17 00:00:00 2001
  3+From: Michael Forney <mforney@mforney.org>
  4+Date: Tue, 12 Mar 2019 17:13:45 -0700
  5+Subject: [PATCH] Avoid statement expressions min/max
  6+
  7+---
  8+ include/c.h                        | 24 ++++++++++--------------
  9+ include/strutils.h                 |  3 ++-
 10+ lib/mbsalign.c                     |  2 +-
 11+ libblkid/src/superblocks/befs.c    |  6 +++---
 12+ libblkid/src/superblocks/exfat.c   |  2 +-
 13+ libblkid/src/superblocks/iso9660.c |  4 ++--
 14+ libblkid/src/superblocks/minix.c   |  4 ++--
 15+ libfdisk/src/alignment.c           |  8 ++++----
 16+ libfdisk/src/context.c             |  4 ++--
 17+ libfdisk/src/gpt.c                 |  4 ++--
 18+ libsmartcols/src/calculate.c       |  8 ++++----
 19+ libsmartcols/src/column.c          |  2 +-
 20+ 12 files changed, 34 insertions(+), 37 deletions(-)
 21+
 22+diff --git a/include/c.h b/include/c.h
 23+index b420b5187..fe82a8847 100644
 24+--- a/include/c.h
 25++++ b/include/c.h
 26+@@ -141,21 +141,17 @@
 27+ # define FALSE 0
 28+ #endif
 29+ 
 30+-#ifndef min
 31+-# define min(x, y) __extension__ ({		\
 32+-	__typeof__(x) _min1 = (x);		\
 33+-	__typeof__(y) _min2 = (y);		\
 34+-	(void) (&_min1 == &_min2);		\
 35+-	_min1 < _min2 ? _min1 : _min2; })
 36+-#endif
 37++static inline uintmax_t
 38++umax(uintmax_t x, uintmax_t y)
 39++{
 40++	return x > y ? x : y;
 41++}
 42+ 
 43+-#ifndef max
 44+-# define max(x, y) __extension__ ({		\
 45+-	__typeof__(x) _max1 = (x);		\
 46+-	__typeof__(y) _max2 = (y);		\
 47+-	(void) (&_max1 == &_max2);		\
 48+-	_max1 > _max2 ? _max1 : _max2; })
 49+-#endif
 50++static inline uintmax_t
 51++umin(uintmax_t x, uintmax_t y)
 52++{
 53++	return x < y ? x : y;
 54++}
 55+ 
 56+ #ifndef cmp_numbers
 57+ # define cmp_numbers(x, y) __extension__ ({	\
 58+diff --git a/include/strutils.h b/include/strutils.h
 59+index 7969a84d0..45c1768f0 100644
 60+--- a/include/strutils.h
 61++++ b/include/strutils.h
 62+@@ -70,7 +70,8 @@ static inline void xstrncpy(char *dest, const char *src, size_t n)
 63+ 
 64+ 	if (!len)
 65+ 		return;
 66+-	len = min(len, n - 1);
 67++	if (n - 1 < len)
 68++		len = n - 1;
 69+ 	memcpy(dest, src, len);
 70+ 	dest[len] = 0;
 71+ }
 72+diff --git a/lib/mbsalign.c b/lib/mbsalign.c
 73+index e251202af..f3ea1a2df 100644
 74+--- a/lib/mbsalign.c
 75++++ b/lib/mbsalign.c
 76+@@ -614,7 +614,7 @@ mbsalign_unibyte:
 77+ 
 78+       dest = mbs_align_pad (dest, dest_end, start_spaces, padchar);
 79+       space_left = dest_end - dest;
 80+-      dest = mempcpy (dest, str_to_print, min (n_used_bytes, space_left));
 81++      dest = mempcpy (dest, str_to_print, umin (n_used_bytes, space_left));
 82+       mbs_align_pad (dest, dest_end, end_spaces, padchar);
 83+     }
 84+ #ifdef HAVE_WIDECHAR
 85+diff --git a/libblkid/src/superblocks/befs.c b/libblkid/src/superblocks/befs.c
 86+index 211feae9f..35c2b19c4 100644
 87+--- a/libblkid/src/superblocks/befs.c
 88++++ b/libblkid/src/superblocks/befs.c
 89+@@ -257,7 +257,7 @@ static int32_t compare_keys(const char keys1[], uint16_t keylengths1[],
 90+ 
 91+ 	key1 = &keys1[keystart1];
 92+ 
 93+-	result = strncmp(key1, key2, min(keylength1, keylength2));
 94++	result = strncmp(key1, key2, umin(keylength1, keylength2));
 95+ 
 96+ 	if (result == 0)
 97+ 		return keylength1 - keylength2;
 98+@@ -386,8 +386,8 @@ static int get_uuid(blkid_probe pr, const struct befs_super_block *bs,
 99+ 
100+ 	bi_size = (uint64_t)FS16_TO_CPU(bs->root_dir.len, fs_le) <<
101+ 		FS32_TO_CPU(bs->block_shift, fs_le);
102+-	sd_total_size = min(bi_size - sizeof(struct befs_inode),
103+-			    (uint64_t)FS32_TO_CPU(bi->inode_size, fs_le));
104++	sd_total_size = umin(bi_size - sizeof(struct befs_inode),
105++			     (uint64_t)FS32_TO_CPU(bi->inode_size, fs_le));
106+ 
107+ 	offset = 0;
108+ 
109+diff --git a/libblkid/src/superblocks/exfat.c b/libblkid/src/superblocks/exfat.c
110+index f586ec786..3c0448027 100644
111+--- a/libblkid/src/superblocks/exfat.c
112++++ b/libblkid/src/superblocks/exfat.c
113+@@ -126,7 +126,7 @@ static int probe_exfat(blkid_probe pr, const struct blkid_idmag *mag)
114+ 	label = find_label(pr, sb);
115+ 	if (label)
116+ 		blkid_probe_set_utf8label(pr, label->name,
117+-				min((size_t) label->length * 2, sizeof(label->name)),
118++				umin((size_t) label->length * 2, sizeof(label->name)),
119+ 				UL_ENCODE_UTF16LE);
120+ 	else if (errno)
121+ 		return -errno;
122+diff --git a/libblkid/src/superblocks/iso9660.c b/libblkid/src/superblocks/iso9660.c
123+index 289a325c8..ac4cc274f 100644
124+--- a/libblkid/src/superblocks/iso9660.c
125++++ b/libblkid/src/superblocks/iso9660.c
126+@@ -228,8 +228,8 @@ static int probe_iso9660(blkid_probe pr, const struct blkid_idmag *mag)
127+ 		unsigned char *desc =
128+ 			blkid_probe_get_buffer(pr,
129+ 					off,
130+-					max(sizeof(struct boot_record),
131+-					    sizeof(struct iso_volume_descriptor)));
132++					umax(sizeof(struct boot_record),
133++					     sizeof(struct iso_volume_descriptor)));
134+ 
135+ 		if (desc == NULL || desc[0] == ISO_VD_END)
136+ 			break;
137+diff --git a/libblkid/src/superblocks/minix.c b/libblkid/src/superblocks/minix.c
138+index b521efb2b..d1fb64f64 100644
139+--- a/libblkid/src/superblocks/minix.c
140++++ b/libblkid/src/superblocks/minix.c
141+@@ -83,8 +83,8 @@ static int probe_minix(blkid_probe pr,
142+ 	unsigned block_size;
143+ 
144+ 	data = blkid_probe_get_buffer(pr, 1024,
145+-			max(sizeof(struct minix_super_block),
146+-			    sizeof(struct minix3_super_block)));
147++			umax(sizeof(struct minix_super_block),
148++			     sizeof(struct minix3_super_block)));
149+ 	if (!data)
150+ 		return errno ? -errno : 1;
151+ 	version = get_minix_version(data, &swabme);
152+diff --git a/libfdisk/src/alignment.c b/libfdisk/src/alignment.c
153+index 3ae721913..a1a05f48a 100644
154+--- a/libfdisk/src/alignment.c
155++++ b/libfdisk/src/alignment.c
156+@@ -38,7 +38,7 @@
157+  */
158+ static int lba_is_aligned(struct fdisk_context *cxt, uintmax_t lba)
159+ {
160+-	unsigned long granularity = max(cxt->phy_sector_size, cxt->min_io_size);
161++	unsigned long granularity = umax(cxt->phy_sector_size, cxt->min_io_size);
162+ 	uintmax_t offset;
163+ 
164+ 	if (cxt->grain > granularity)
165+@@ -54,7 +54,7 @@ static int lba_is_aligned(struct fdisk_context *cxt, uintmax_t lba)
166+  */
167+ static int lba_is_phy_aligned(struct fdisk_context *cxt, fdisk_sector_t lba)
168+ {
169+-	unsigned long granularity = max(cxt->phy_sector_size, cxt->min_io_size);
170++	unsigned long granularity = umax(cxt->phy_sector_size, cxt->min_io_size);
171+ 	uintmax_t offset = (lba * cxt->sector_size) % granularity;
172+ 
173+ 	return !((granularity + cxt->alignment_offset - offset) % granularity);
174+@@ -103,7 +103,7 @@ fdisk_sector_t fdisk_align_lba(struct fdisk_context *cxt, fdisk_sector_t lba, in
175+ 			 * according the offset to be on the physical boundary.
176+ 			 */
177+ 			/* fprintf(stderr, "LBA: %llu apply alignment_offset\n", res); */
178+-			res -= (max(cxt->phy_sector_size, cxt->min_io_size) -
179++			res -= (umax(cxt->phy_sector_size, cxt->min_io_size) -
180+ 					cxt->alignment_offset) / cxt->sector_size;
181+ 
182+ 			if (direction == FDISK_ALIGN_UP && res < lba)
183+@@ -398,7 +398,7 @@ int fdisk_apply_user_device_properties(struct fdisk_context *cxt)
184+ 	fdisk_reset_alignment(cxt);
185+ 
186+ 	if (cxt->user_grain) {
187+-		unsigned long granularity = max(cxt->phy_sector_size, cxt->min_io_size);
188++		unsigned long granularity = umax(cxt->phy_sector_size, cxt->min_io_size);
189+ 
190+ 		cxt->grain = cxt->user_grain < granularity ? granularity : cxt->user_grain;
191+ 		DBG(CXT, ul_debugobj(cxt, "new grain: %lu", cxt->grain));
192+diff --git a/libfdisk/src/context.c b/libfdisk/src/context.c
193+index 083b255d3..a3bfff993 100644
194+--- a/libfdisk/src/context.c
195++++ b/libfdisk/src/context.c
196+@@ -919,7 +919,7 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org)
197+ 	/* the current layout */
198+ 	fdisk_get_partitions(cxt, &tb);
199+ 	/* maximal number of partitions */
200+-	nparts = max(fdisk_table_get_nents(tb), fdisk_table_get_nents(org));
201++	nparts = umax(fdisk_table_get_nents(tb), fdisk_table_get_nents(org));
202+ 
203+ 	while (fdisk_diff_tables(org, tb, &itr, &pa, &change) == 0) {
204+ 		if (change == FDISK_DIFF_UNCHANGED)
205+@@ -976,7 +976,7 @@ int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org)
206+ 			/* Let's follow the Linux kernel and reduce
207+                          * DOS extended partition to 1 or 2 sectors.
208+ 			 */
209+-			sz = min(sz, (uint64_t) 2);
210++			sz = umin(sz, (uint64_t) 2);
211+ 
212+ 		if (partx_add_partition(cxt->dev_fd, pa->partno + 1,
213+ 					pa->start * ssf, sz) != 0) {
214+diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
215+index 5fd9b4d73..97e23767d 100644
216+--- a/libfdisk/src/gpt.c
217++++ b/libfdisk/src/gpt.c
218+@@ -504,7 +504,7 @@ static int gpt_mknew_pmbr(struct fdisk_context *cxt)
219+ 	pmbr->partition_record[0].end_track    = 0xFF;
220+ 	pmbr->partition_record[0].starting_lba = cpu_to_le32(1);
221+ 	pmbr->partition_record[0].size_in_lba  =
222+-		cpu_to_le32((uint32_t) min( cxt->total_sectors - 1ULL, 0xFFFFFFFFULL) );
223++		cpu_to_le32((uint32_t) umin(cxt->total_sectors - 1ULL, 0xFFFFFFFFULL));
224+ 
225+ 	return 0;
226+ }
227+@@ -956,7 +956,7 @@ static int valid_pmbr(struct fdisk_context *cxt)
228+ 			/* Note that gpt_write_pmbr() overwrites PMBR, but we want to keep it valid already
229+ 			 * in memory too to disable warnings when valid_pmbr() called next time */
230+ 			pmbr->partition_record[part].size_in_lba  =
231+-				cpu_to_le32((uint32_t) min( cxt->total_sectors - 1ULL, 0xFFFFFFFFULL) );
232++				cpu_to_le32((uint32_t) umin(cxt->total_sectors - 1ULL, 0xFFFFFFFFULL));
233+ 			fdisk_label_set_changed(cxt->label, 1);
234+ 		}
235+ 	}
236+diff --git a/libsmartcols/src/calculate.c b/libsmartcols/src/calculate.c
237+index 974fc340c..0c11627a7 100644
238+--- a/libsmartcols/src/calculate.c
239++++ b/libsmartcols/src/calculate.c
240+@@ -57,7 +57,7 @@ static int count_cell_width(struct libscols_table *tb,
241+ 
242+ 	if (len == (size_t) -1)		/* ignore broken multibyte strings */
243+ 		len = 0;
244+-	cl->width_max = max(len, cl->width_max);
245++	cl->width_max = umax(len, cl->width_max);
246+ 
247+ 	if (cl->is_extreme && cl->width_avg && len > cl->width_avg * 2)
248+ 		return 0;
249+@@ -66,10 +66,10 @@ static int count_cell_width(struct libscols_table *tb,
250+ 		cl->extreme_sum += len;
251+ 		cl->extreme_count++;
252+ 	}
253+-	cl->width = max(len, cl->width);
254++	cl->width = umax(len, cl->width);
255+ 	if (scols_column_is_tree(cl)) {
256+ 		size_t treewidth = buffer_get_safe_art_size(buf);
257+-		cl->width_treeart = max(cl->width_treeart, treewidth);
258++		cl->width_treeart = umax(cl->width_treeart, treewidth);
259+ 	}
260+ 	return 0;
261+ }
262+@@ -115,7 +115,7 @@ static int count_column_width(struct libscols_table *tb,
263+ 		if (data) {
264+ 			size_t len = scols_table_is_noencoding(tb) ?
265+ 					mbs_width(data) : mbs_safe_width(data);
266+-			cl->width_min = max(cl->width_min, len);
267++			cl->width_min = umax(cl->width_min, len);
268+ 		} else
269+ 			no_header = 1;
270+ 
271+diff --git a/libsmartcols/src/column.c b/libsmartcols/src/column.c
272+index c11df69f5..1285d42e6 100644
273+--- a/libsmartcols/src/column.c
274++++ b/libsmartcols/src/column.c
275+@@ -347,7 +347,7 @@ size_t scols_wrapnl_chunksize(const struct libscols_column *cl __attribute__((un
276+ 					mbs_width(data) :
277+ 					mbs_safe_width(data);
278+ 		}
279+-		sum = max(sum, sz);
280++		sum = umax(sum, sz);
281+ 		data = p;
282+ 	}
283+ 
284+-- 
285+2.37.3
286+
+97, -0
 1@@ -0,0 +1,97 @@
 2+From 56273e92326b26a326c73e47b3d5929bbce9ac03 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 24 Jun 2019 22:48:57 -0700
 5+Subject: [PATCH] Avoid initialization of flexible array in struct
 6+
 7+---
 8+ disk-utils/fdisk-menu.c | 18 +++++++++---------
 9+ 1 file changed, 9 insertions(+), 9 deletions(-)
10+
11+diff --git a/disk-utils/fdisk-menu.c b/disk-utils/fdisk-menu.c
12+index 71355f684..fb5b2e253 100644
13+--- a/disk-utils/fdisk-menu.c
14++++ b/disk-utils/fdisk-menu.c
15+@@ -37,7 +37,7 @@ struct menu {
16+ 			const struct menu *,
17+ 			const struct menu_entry *);
18+ 
19+-	struct menu_entry	entries[];	/* NULL terminated array */
20++	struct menu_entry	*entries;	/* NULL terminated array */
21+ };
22+ 
23+ struct menu_context {
24+@@ -92,7 +92,7 @@ DECLARE_MENU_CB(generic_menu_cb);
25+ /* Generic menu */
26+ static const struct menu menu_generic = {
27+ 	.callback	= generic_menu_cb,
28+-	.entries	= {
29++	.entries	= (struct menu_entry[]){
30+ 		MENU_BSEP(N_("Generic")),
31+ 		MENU_ENT  ('d', N_("delete a partition")),
32+ 		MENU_ENT  ('F', N_("list free unpartitioned space")),
33+@@ -134,7 +134,7 @@ static const struct menu menu_createlabel = {
34+ 	.callback = createlabel_menu_cb,
35+ 	.exclude = FDISK_DISKLABEL_BSD,
36+ 	.nonested = 1,
37+-	.entries = {
38++	.entries = (struct menu_entry[]){
39+ 		MENU_SEP(N_("Create a new label")),
40+ 		MENU_ENT('g', N_("create a new empty GPT partition table")),
41+ 		MENU_ENT('G', N_("create a new empty SGI (IRIX) partition table")),
42+@@ -151,7 +151,7 @@ static const struct menu menu_createlabel = {
43+ static const struct menu menu_geo = {
44+ 	.callback = geo_menu_cb,
45+ 	.exclude = FDISK_DISKLABEL_GPT | FDISK_DISKLABEL_BSD,
46+-	.entries = {
47++	.entries = (struct menu_entry[]){
48+ 		MENU_XSEP(N_("Geometry (for the current label)")),
49+ 		MENU_XENT('c', N_("change number of cylinders")),
50+ 		MENU_XENT('h', N_("change number of heads")),
51+@@ -163,7 +163,7 @@ static const struct menu menu_geo = {
52+ static const struct menu menu_gpt = {
53+ 	.callback = gpt_menu_cb,
54+ 	.label = FDISK_DISKLABEL_GPT,
55+-	.entries = {
56++	.entries = (struct menu_entry[]){
57+ 		MENU_BSEP(N_("GPT")),
58+ 		MENU_XENT('i', N_("change disk GUID")),
59+ 		MENU_XENT('n', N_("change partition name")),
60+@@ -184,7 +184,7 @@ static const struct menu menu_gpt = {
61+ static const struct menu menu_sun = {
62+ 	.callback = sun_menu_cb,
63+ 	.label = FDISK_DISKLABEL_SUN,
64+-	.entries = {
65++	.entries = (struct menu_entry[]){
66+ 		MENU_BSEP(N_("Sun")),
67+ 		MENU_ENT('a', N_("toggle the read-only flag")),
68+ 		MENU_ENT('c', N_("toggle the mountable flag")),
69+@@ -201,7 +201,7 @@ static const struct menu menu_sun = {
70+ static const struct menu menu_sgi = {
71+ 	.callback = sgi_menu_cb,
72+ 	.label = FDISK_DISKLABEL_SGI,
73+-	.entries = {
74++	.entries = (struct menu_entry[]){
75+ 		MENU_SEP(N_("SGI")),
76+ 		MENU_ENT('a', N_("select bootable partition")),
77+ 		MENU_ENT('b', N_("edit bootfile entry")),
78+@@ -214,7 +214,7 @@ static const struct menu menu_sgi = {
79+ static const struct menu menu_dos = {
80+ 	.callback = dos_menu_cb,
81+ 	.label = FDISK_DISKLABEL_DOS,
82+-	.entries = {
83++	.entries = (struct menu_entry[]){
84+ 		MENU_BSEP(N_("DOS (MBR)")),
85+ 		MENU_ENT('a', N_("toggle a bootable flag")),
86+ 		MENU_ENT('b', N_("edit nested BSD disklabel")),
87+@@ -232,7 +232,7 @@ static const struct menu menu_dos = {
88+ static const struct menu menu_bsd = {
89+ 	.callback = bsd_menu_cb,
90+ 	.label = FDISK_DISKLABEL_BSD,
91+-	.entries = {
92++	.entries = (struct menu_entry[]){
93+ 		MENU_SEP(N_("BSD")),
94+ 		MENU_ENT('e', N_("edit drive data")),
95+ 		MENU_ENT('i', N_("install bootstrap")),
96+-- 
97+2.25.0
98+
+28, -0
 1@@ -0,0 +1,28 @@
 2+From abcdd92972cc92840e8db22d7018c44dbb9ec2f4 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 24 Jun 2019 23:41:53 -0700
 5+Subject: [PATCH] Use MAXIMUM_PARTS instead of VLA
 6+
 7+This is the upper bound on the pte array, so just use it as the
 8+static array length.
 9+---
10+ libfdisk/src/dos.c | 3 +--
11+ 1 file changed, 1 insertion(+), 2 deletions(-)
12+
13+diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
14+index 7a1f6ea34..967b7bd19 100644
15+--- a/libfdisk/src/dos.c
16++++ b/libfdisk/src/dos.c
17+@@ -1624,8 +1624,7 @@ static int dos_verify_disklabel(struct fdisk_context *cxt)
18+ {
19+ 	size_t i, j;
20+ 	fdisk_sector_t total = 1, n_sectors = cxt->total_sectors;
21+-	fdisk_sector_t first[cxt->label->nparts_max],
22+-		       last[cxt->label->nparts_max];
23++	fdisk_sector_t first[MAXIMUM_PARTS], last[MAXIMUM_PARTS];
24+ 	struct dos_partition *p;
25+ 	struct fdisk_dos_label *l = self_label(cxt);
26+ 	int nerrors = 0;
27+-- 
28+2.28.0
29+
+28, -0
 1@@ -0,0 +1,28 @@
 2+From 7943a7c1c795a1ffe79b2898eb4860cec60dec23 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 24 Jun 2019 23:54:21 -0700
 5+Subject: [PATCH] Use alloca if VLAs aren't supported
 6+
 7+---
 8+ lib/path.c | 4 ++++
 9+ 1 file changed, 4 insertions(+)
10+
11+diff --git a/lib/path.c b/lib/path.c
12+index 75fa85305..af90261a6 100644
13+--- a/lib/path.c
14++++ b/lib/path.c
15+@@ -982,7 +982,11 @@ static int ul_path_cpuparse(struct path_cxt *pc, cpu_set_t **set, int maxcpus, i
16+ {
17+ 	FILE *f;
18+ 	size_t setsize, len = maxcpus * 7;
19++#ifndef __STDC_NO_VLA__
20+ 	char buf[len];
21++#else
22++	char *buf = alloca(len);
23++#endif
24+ 	int rc;
25+ 
26+ 	*set = NULL;
27+-- 
28+2.28.0
29+
+37, -0
 1@@ -0,0 +1,37 @@
 2+From f9e192ecdbfd369fe42da4c9b8a3ab90cfa6f10f Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Tue, 25 Jun 2019 00:13:43 -0700
 5+Subject: [PATCH] Use static inline function for cmp_numbers
 6+
 7+All callers use it with an unsigned type, so just specialize for
 8+uintmax_t.
 9+---
10+ include/c.h | 12 +++++-------
11+ 1 file changed, 5 insertions(+), 7 deletions(-)
12+
13+diff --git a/include/c.h b/include/c.h
14+index fe82a8847..eb48e7f77 100644
15+--- a/include/c.h
16++++ b/include/c.h
17+@@ -153,13 +153,11 @@ umin(uintmax_t x, uintmax_t y)
18+ 	return x < y ? x : y;
19+ }
20+ 
21+-#ifndef cmp_numbers
22+-# define cmp_numbers(x, y) __extension__ ({	\
23+-	__typeof__(x) _a = (x);			\
24+-	__typeof__(y) _b = (y);			\
25+-	(void) (&_a == &_b);			\
26+-	_a == _b ? 0 : _a > _b ? 1 : -1; })
27+-#endif
28++static inline uintmax_t
29++cmp_numbers(uintmax_t x, uintmax_t y)
30++{
31++	return x == y ? 0 : x > y ? 1 : -1;
32++}
33+ 
34+ #ifndef offsetof
35+ #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
36+-- 
37+2.31.1
38+
+44, -0
 1@@ -0,0 +1,44 @@
 2+From d9162eab76d43c1cbd289665c1b02a7e062a2017 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Mon, 6 Sep 2021 18:05:22 -0700
 5+Subject: [PATCH] Avoid use of long double
 6+
 7+---
 8+ lib/strutils.c | 6 ++++--
 9+ 1 file changed, 4 insertions(+), 2 deletions(-)
10+
11+diff --git a/lib/strutils.c b/lib/strutils.c
12+index 5b5e686aa..ac1a0f527 100644
13+--- a/lib/strutils.c
14++++ b/lib/strutils.c
15+@@ -459,6 +459,7 @@ err:
16+ 	errx(STRTOXX_EXIT_CODE, "%s: '%s'", errmesg, str);
17+ }
18+ 
19++#if 0
20+ long double strtold_or_err(const char *str, const char *errmesg)
21+ {
22+ 	double num;
23+@@ -479,6 +480,7 @@ err:
24+ 
25+ 	errx(STRTOXX_EXIT_CODE, "%s: '%s'", errmesg, str);
26+ }
27++#endif
28+ 
29+ long strtol_or_err(const char *str, const char *errmesg)
30+ {
31+@@ -538,9 +540,9 @@ uintmax_t strtosize_or_err(const char *str, const char *errmesg)
32+ 
33+ void strtotimeval_or_err(const char *str, struct timeval *tv, const char *errmesg)
34+ {
35+-	long double user_input;
36++	double user_input;
37+ 
38+-	user_input = strtold_or_err(str, errmesg);
39++	user_input = strtod_or_err(str, errmesg);
40+ 	tv->tv_sec = (time_t) user_input;
41+ 	tv->tv_usec = (suseconds_t)((user_input - tv->tv_sec) * 1000000);
42+ }
43+-- 
44+2.32.0
45+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 50736e4998fde0fff9b7876476137a21b85bd5a6
+1, -0
1@@ -0,0 +1 @@
2+2.37 r2
+84, -0
 1@@ -0,0 +1,84 @@
 2+set('version', 'v0.7')
 3+cflags{
 4+	'-std=c99',
 5+	'-D CONFIG_HELP=1',
 6+	'-D CONFIG_CURSES=1',
 7+	'-D CONFIG_LUA=1',
 8+	'-D CONFIG_LPEG=1',
 9+	'-D CONFIG_TRE=0',
10+	'-D CONFIG_SELINUX=0',
11+	'-D CONFIG_ACL=0',
12+	'-D HAVE_MEMRCHR=1',
13+	'-D _XOPEN_SOURCE=700',
14+	[[-D 'VERSION="$version"']],
15+	string.format([[-D 'VIS_PATH="%s/share/vis"']], config.prefix),
16+	'-D NDEBUG',
17+	'-I $outdir',
18+	'-isystem $builddir/pkg/libtermkey/include',
19+	'-isystem $builddir/pkg/lua/include',
20+	'-isystem $builddir/pkg/netbsd-curses/include',
21+}
22+
23+build('copy', '$outdir/config.h', '$srcdir/config.def.h')
24+
25+pkg.deps = {
26+	'$outdir/config.h',
27+	'pkg/libtermkey/headers',
28+	'pkg/lua/headers',
29+	'pkg/netbsd-curses/headers',
30+}
31+
32+exe('vis', [[
33+	array.c
34+	buffer.c
35+	libutf.c
36+	main.c
37+	map.c
38+	sam.c
39+	text.c
40+	text-common.c
41+	text-io.c
42+	text-iterator.c
43+	text-motions.c
44+	text-objects.c
45+	text-util.c
46+	ui-terminal.c
47+	view.c
48+	vis.c
49+	vis-lua.c
50+	vis-marks.c
51+	vis-modes.c
52+	vis-motions.c
53+	vis-operators.c
54+	vis-prompt.c
55+	vis-registers.c
56+	vis-text-objects.c
57+	text-regex.c
58+	$builddir/pkg/libtermkey/libtermkey.a.d
59+	$builddir/pkg/lpeg/liblpeg.a
60+	$builddir/pkg/lua/liblua.a
61+	$builddir/pkg/netbsd-curses/libcurses.a.d
62+]])
63+file('bin/vis', '755', '$outdir/vis')
64+
65+exe('vis-digraph', {'vis-digraph.c'})
66+file('bin/vis-digraph', '755', '$outdir/vis-digraph')
67+
68+exe('vis-menu', {'vis-menu.c'})
69+file('bin/vis-menu', '755', '$outdir/vis-menu')
70+
71+file('bin/vis-open', '755', '$srcdir/vis-open')
72+
73+for _, f in ipairs{'vis.1', 'vis-digraph.1', 'vis-menu.1', 'vis-open.1'} do
74+	build('sed', '$outdir/'..f, '$srcdir/man/'..f, {expr='s,VERSION,$version,'})
75+	man{'$outdir/'..f}
76+end
77+
78+for f in iterlines('lua.txt') do
79+	file('share/vis/'..f, '644', '$srcdir/lua/'..f)
80+end
81+sym('share/vis/lexer.lua', 'lexers/lexer.lua')
82+sym('share/vis/themes/default-16.lua', 'dark-16.lua')
83+sym('share/vis/themes/default-256.lua', 'dark-16.lua')
84+
85+fetch 'git'
+158, -0
  1@@ -0,0 +1,158 @@
  2+# 2,<cd src/lua && find * -type f -name '*.lua' | LC_COLLATE=C sort
  3+lexers/actionscript.lua
  4+lexers/ada.lua
  5+lexers/ansi_c.lua
  6+lexers/antlr.lua
  7+lexers/apdl.lua
  8+lexers/apl.lua
  9+lexers/applescript.lua
 10+lexers/asm.lua
 11+lexers/asp.lua
 12+lexers/autoit.lua
 13+lexers/awk.lua
 14+lexers/bash.lua
 15+lexers/batch.lua
 16+lexers/bibtex.lua
 17+lexers/boo.lua
 18+lexers/caml.lua
 19+lexers/chuck.lua
 20+lexers/clojure.lua
 21+lexers/cmake.lua
 22+lexers/coffeescript.lua
 23+lexers/container.lua
 24+lexers/context.lua
 25+lexers/cpp.lua
 26+lexers/crystal.lua
 27+lexers/csharp.lua
 28+lexers/css.lua
 29+lexers/cuda.lua
 30+lexers/dart.lua
 31+lexers/desktop.lua
 32+lexers/diff.lua
 33+lexers/django.lua
 34+lexers/dmd.lua
 35+lexers/dockerfile.lua
 36+lexers/dot.lua
 37+lexers/dsv.lua
 38+lexers/eiffel.lua
 39+lexers/elixir.lua
 40+lexers/elm.lua
 41+lexers/erlang.lua
 42+lexers/fantom.lua
 43+lexers/faust.lua
 44+lexers/fennel.lua
 45+lexers/fish.lua
 46+lexers/forth.lua
 47+lexers/fortran.lua
 48+lexers/fsharp.lua
 49+lexers/fstab.lua
 50+lexers/gap.lua
 51+lexers/gemini.lua
 52+lexers/gettext.lua
 53+lexers/gherkin.lua
 54+lexers/git-rebase.lua
 55+lexers/glsl.lua
 56+lexers/gnuplot.lua
 57+lexers/go.lua
 58+lexers/groovy.lua
 59+lexers/gtkrc.lua
 60+lexers/haskell.lua
 61+lexers/html.lua
 62+lexers/icon.lua
 63+lexers/idl.lua
 64+lexers/inform.lua
 65+lexers/ini.lua
 66+lexers/io_lang.lua
 67+lexers/java.lua
 68+lexers/javascript.lua
 69+lexers/json.lua
 70+lexers/jsp.lua
 71+lexers/julia.lua
 72+lexers/latex.lua
 73+lexers/ledger.lua
 74+lexers/less.lua
 75+lexers/lexer.lua
 76+lexers/lilypond.lua
 77+lexers/lisp.lua
 78+lexers/litcoffee.lua
 79+lexers/logtalk.lua
 80+lexers/lua.lua
 81+lexers/makefile.lua
 82+lexers/man.lua
 83+lexers/markdown.lua
 84+lexers/matlab.lua
 85+lexers/meson.lua
 86+lexers/moonscript.lua
 87+lexers/myrddin.lua
 88+lexers/nemerle.lua
 89+lexers/networkd.lua
 90+lexers/nim.lua
 91+lexers/nsis.lua
 92+lexers/null.lua
 93+lexers/objective_c.lua
 94+lexers/pascal.lua
 95+lexers/perl.lua
 96+lexers/php.lua
 97+lexers/pico8.lua
 98+lexers/pike.lua
 99+lexers/pkgbuild.lua
100+lexers/pony.lua
101+lexers/powershell.lua
102+lexers/prolog.lua
103+lexers/props.lua
104+lexers/protobuf.lua
105+lexers/ps.lua
106+lexers/pure.lua
107+lexers/python.lua
108+lexers/rails.lua
109+lexers/rc.lua
110+lexers/reason.lua
111+lexers/rebol.lua
112+lexers/rest.lua
113+lexers/rexx.lua
114+lexers/rhtml.lua
115+lexers/routeros.lua
116+lexers/rstats.lua
117+lexers/ruby.lua
118+lexers/rust.lua
119+lexers/sass.lua
120+lexers/scala.lua
121+lexers/scheme.lua
122+lexers/smalltalk.lua
123+lexers/sml.lua
124+lexers/snobol4.lua
125+lexers/spin.lua
126+lexers/sql.lua
127+lexers/strace.lua
128+lexers/systemd.lua
129+lexers/taskpaper.lua
130+lexers/tcl.lua
131+lexers/tex.lua
132+lexers/texinfo.lua
133+lexers/text.lua
134+lexers/toml.lua
135+lexers/vala.lua
136+lexers/vb.lua
137+lexers/vbscript.lua
138+lexers/vcard.lua
139+lexers/verilog.lua
140+lexers/vhdl.lua
141+lexers/wsf.lua
142+lexers/xml.lua
143+lexers/xs.lua
144+lexers/xtend.lua
145+lexers/yaml.lua
146+lexers/zig.lua
147+plugins/complete-filename.lua
148+plugins/complete-word.lua
149+plugins/digraph.lua
150+plugins/filetype.lua
151+plugins/number-inc-dec.lua
152+plugins/textobject-lexer.lua
153+themes/dark-16.lua
154+themes/light-16.lua
155+themes/solarized.lua
156+themes/zenburn.lua
157+vis-std.lua
158+vis.lua
159+visrc.lua
+27, -0
 1@@ -0,0 +1,27 @@
 2+From 358e4526a4ed8c5780d4fa43403c5c6e3d92f8bb Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 31 Jan 2020 23:34:52 -0800
 5+Subject: [PATCH] [HACK] Avoid wide string literals for now
 6+
 7+---
 8+ vis-digraph.c | 3 ++-
 9+ 1 file changed, 2 insertions(+), 1 deletion(-)
10+
11+diff --git a/vis-digraph.c b/vis-digraph.c
12+index 35a5a17..0c23387 100644
13+--- a/vis-digraph.c
14++++ b/vis-digraph.c
15+@@ -1962,8 +1962,9 @@ int main(int argc, char *argv[]) {
16+ 	setlocale(LC_ALL, "");
17+ 
18+ 	if (argc == 1) {
19++		static const wchar_t fmt[] = {'%', 's', ' ', '%', 'l', 'c', ' ', '%', 's', '\n', '\0'};
20+ 		for (const Digraph *d = digraphs; d->name[0]; d++)
21+-			wprintf(L"%s %lc %s\n", d->name, d->rune, d->description);
22++			wprintf(fmt, d->name, d->rune, d->description);
23+ 		return 0;
24+ 	}
25+ 
26+-- 
27+2.25.0
28+
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 979f3d905ab8910de4fb57f91b31d76e3e218aa5
+1, -0
1@@ -0,0 +1 @@
2+0.7 r0
+2, -0
1@@ -0,0 +1,2 @@
2+/src
3+/wpa_supplicant-2.9.tar.gz
+16, -0
 1@@ -0,0 +1,16 @@
 2+#define CONFIG_BACKEND_FILE
 3+#define CONFIG_CTRL_IFACE
 4+#define CONFIG_CTRL_IFACE_DIR "/run/wpa_supplicant"
 5+#define CONFIG_CTRL_IFACE_UNIX
 6+#define CONFIG_DRIVER_NL80211
 7+#define CONFIG_ELOOP_POLL
 8+#define CONFIG_GETRANDOM
 9+#define CONFIG_IBSS_RSN
10+#define CONFIG_LIBNL20
11+#define CONFIG_NO_CONFIG_BLOBS
12+#define CONFIG_NO_CONFIG_WRITE
13+#define CONFIG_NO_RADIUS
14+#define CONFIG_NO_VLAN
15+#define CONFIG_SHA256
16+#define CONFIG_SME
17+#define TLS_DEFAULT_CIPHERS "DEFAULT:!EXP:!LOW"
+100, -0
  1@@ -0,0 +1,100 @@
  2+cflags{
  3+	'-include $dir/config.h',
  4+	'-I $srcdir/src/utils',
  5+	'-I $srcdir/src',
  6+	'-isystem $builddir/pkg/bearssl/include',
  7+	'-isystem $builddir/pkg/libnl/include',
  8+	'-isystem $builddir/pkg/linux-headers/include',
  9+}
 10+
 11+pkg.deps = {
 12+	'pkg/bearssl/headers',
 13+	'pkg/libnl/headers',
 14+	'pkg/linux-headers/headers',
 15+}
 16+
 17+lib('libcommon.a', 'src/utils/(common.c eloop.c os_unix.c wpabuf.c wpa_debug.c)')
 18+
 19+exe('bin/wpa_supplicant', [[
 20+	src/ap/(
 21+		wpa_auth.c
 22+		wpa_auth_ie.c
 23+		pmksa_cache_auth.c
 24+	)
 25+	src/common/(
 26+		ctrl_iface_common.c
 27+		hw_features_common.c
 28+		ieee802_11_common.c
 29+		wpa_common.c
 30+	)
 31+	src/crypto/(
 32+		aes-internal-dec.c
 33+		aes-internal-enc.c
 34+		aes-internal.c
 35+		aes-unwrap.c
 36+		aes-wrap.c
 37+		crypto_bearssl.c
 38+		random.c
 39+		rc4.c
 40+		sha1-pbkdf2.c
 41+		sha1-prf.c
 42+		sha256-prf.c
 43+		tls_none.c
 44+	)
 45+	src/drivers/(
 46+		driver_common.c
 47+		driver_nl80211.c
 48+		driver_nl80211_capa.c
 49+		driver_nl80211_event.c
 50+		driver_nl80211_monitor.c
 51+		driver_nl80211_scan.c
 52+		drivers.c
 53+		linux_ioctl.c
 54+		netlink.c
 55+		rfkill.c
 56+	)
 57+	src/l2_packet/l2_packet_linux.c
 58+	src/rsn_supp/(
 59+		pmksa_cache.c
 60+		preauth.c
 61+		wpa.c
 62+		wpa_ie.c
 63+	)
 64+	src/utils/(bitfield.c radiotap.c)
 65+	wpa_supplicant/(
 66+		blacklist.c
 67+		bss.c
 68+		config.c
 69+		config_file.c
 70+		ctrl_iface.c
 71+		ctrl_iface_unix.c
 72+		eap_register.c
 73+		events.c
 74+		ibss_rsn.c
 75+		main.c
 76+		notify.c
 77+		op_classes.c
 78+		rrm.c
 79+		scan.c
 80+		sme.c
 81+		wmm_ac.c
 82+		wpa_supplicant.c
 83+		wpas_glue.c
 84+	)
 85+	libcommon.a
 86+	$builddir/pkg/bearssl/libbearssl.a
 87+	$builddir/pkg/libnl/(libnl-3.a libnl-genl-3.a)
 88+]])
 89+file('bin/wpa_supplicant', '755', '$outdir/bin/wpa_supplicant')
 90+
 91+exe('bin/wpa_cli', [[
 92+	src/common/(cli.c wpa_ctrl.c)
 93+	src/utils/edit_simple.c
 94+	wpa_supplicant/wpa_cli.c
 95+	libcommon.a
 96+]])
 97+file('bin/wpa_cli', '755', '$outdir/bin/wpa_cli')
 98+
 99+man(paths[[wpa_supplicant/doc/docbook/(wpa_cli.8 wpa_supplicant.8 wpa_supplicant.conf.5)]])
100+
101+fetch 'curl'
+52, -0
 1@@ -0,0 +1,52 @@
 2+From f36da3297eeb6b2363bcede62a72f567cd971617 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 11 Aug 2019 03:18:22 +0000
 5+Subject: [PATCH] eloop: Prevent stray semicolons in struct specifier
 6+
 7+---
 8+ src/utils/eloop.c | 8 ++++----
 9+ src/utils/trace.h | 2 +-
10+ 2 files changed, 5 insertions(+), 5 deletions(-)
11+
12+diff --git a/src/utils/eloop.c b/src/utils/eloop.c
13+index bb375be10..b82853308 100644
14+--- a/src/utils/eloop.c
15++++ b/src/utils/eloop.c
16+@@ -44,8 +44,8 @@ struct eloop_sock {
17+ 	void *eloop_data;
18+ 	void *user_data;
19+ 	eloop_sock_handler handler;
20+-	WPA_TRACE_REF(eloop);
21+-	WPA_TRACE_REF(user);
22++	WPA_TRACE_REF(eloop)
23++	WPA_TRACE_REF(user)
24+ 	WPA_TRACE_INFO
25+ };
26+ 
27+@@ -55,8 +55,8 @@ struct eloop_timeout {
28+ 	void *eloop_data;
29+ 	void *user_data;
30+ 	eloop_timeout_handler handler;
31+-	WPA_TRACE_REF(eloop);
32+-	WPA_TRACE_REF(user);
33++	WPA_TRACE_REF(eloop)
34++	WPA_TRACE_REF(user)
35+ 	WPA_TRACE_INFO
36+ };
37+ 
38+diff --git a/src/utils/trace.h b/src/utils/trace.h
39+index d1636de07..43bc03f1e 100644
40+--- a/src/utils/trace.h
41++++ b/src/utils/trace.h
42+@@ -23,7 +23,7 @@ struct wpa_trace_ref {
43+ 	const void *addr;
44+ 	WPA_TRACE_INFO
45+ };
46+-#define WPA_TRACE_REF(name) struct wpa_trace_ref wpa_trace_ref_##name
47++#define WPA_TRACE_REF(name) struct wpa_trace_ref wpa_trace_ref_##name;
48+ 
49+ #define wpa_trace_dump(title, ptr) \
50+ 	wpa_trace_dump_func((title), (ptr)->btrace, (ptr)->btrace_num)
51+-- 
52+2.22.0
53+
+47, -0
 1@@ -0,0 +1,47 @@
 2+From 9698f90ccec779f7812a9aa550a6b77feefb52e3 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 11 Aug 2019 03:41:23 +0000
 5+Subject: [PATCH] Avoid statement expressions for get_aligned_le*
 6+
 7+---
 8+ src/utils/platform.h | 24 ++++++++++++------------
 9+ 1 file changed, 12 insertions(+), 12 deletions(-)
10+
11+diff --git a/src/utils/platform.h b/src/utils/platform.h
12+index 813987eb6..1aa9dc069 100644
13+--- a/src/utils/platform.h
14++++ b/src/utils/platform.h
15+@@ -4,18 +4,18 @@
16+ #include "includes.h"
17+ #include "common.h"
18+ 
19+-#define le16_to_cpu		le_to_host16
20+-#define le32_to_cpu		le_to_host32
21++static inline u16 get_unaligned_le16(void *p)
22++{
23++	u16 v;
24++	memcpy(&v, p, sizeof(v));
25++	return le_to_host16(v);
26++}
27+ 
28+-#define get_unaligned(p)					\
29+-({								\
30+-	struct packed_dummy_struct {				\
31+-		typeof(*(p)) __val;				\
32+-	} __attribute__((packed)) *__ptr = (void *) (p);	\
33+-								\
34+-	__ptr->__val;						\
35+-})
36+-#define get_unaligned_le16(p)	le16_to_cpu(get_unaligned((le16 *)(p)))
37+-#define get_unaligned_le32(p)	le32_to_cpu(get_unaligned((le32 *)(p)))
38++static inline u32 get_unaligned_le32(void *p)
39++{
40++	u32 v;
41++	memcpy(&v, p, sizeof(v));
42++	return le_to_host32(v);
43++}
44+ 
45+ #endif /* PLATFORM_H */
46+-- 
47+2.22.0
48+
+25, -0
 1@@ -0,0 +1,25 @@
 2+From 936dcefafa77e985a9e8dd2b6f5ef96df16d4c03 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 11 Aug 2019 03:44:24 +0000
 5+Subject: [PATCH] Avoid unnecessary VLA
 6+
 7+---
 8+ src/utils/os_unix.c | 2 +-
 9+ 1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+diff --git a/src/utils/os_unix.c b/src/utils/os_unix.c
12+index 800c50772..447dae31b 100644
13+--- a/src/utils/os_unix.c
14++++ b/src/utils/os_unix.c
15+@@ -801,7 +801,7 @@ int os_exec(const char *program, const char *arg, int wait_completion)
16+ 
17+ 	if (pid == 0) {
18+ 		/* run the external command in the child process */
19+-		const int MAX_ARG = 30;
20++		enum { MAX_ARG = 30 };
21+ 		char *_program, *_arg, *pos;
22+ 		char *argv[MAX_ARG + 1];
23+ 		int i;
24+-- 
25+2.22.0
26+
+33, -0
 1@@ -0,0 +1,33 @@
 2+From 5fba603af060a3fd3f0436213527b4b2b74cbd0d Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Sun, 11 Aug 2019 04:00:13 +0000
 5+Subject: [PATCH] Prevent reference to undefined symbol with CONFIG_NO_RADIUS
 6+
 7+---
 8+ src/radius/radius.h | 3 +++
 9+ 1 file changed, 3 insertions(+)
10+
11+diff --git a/src/radius/radius.h b/src/radius/radius.h
12+index 630c0f9d0..dd013c415 100644
13+--- a/src/radius/radius.h
14++++ b/src/radius/radius.h
15+@@ -296,6 +296,7 @@ char * radius_msg_get_tunnel_password(struct radius_msg *msg, int *keylen,
16+ 				      const u8 *secret, size_t secret_len,
17+ 				      struct radius_msg *sent_msg, size_t n);
18+ 
19++#ifndef CONFIG_NO_RADIUS
20+ static inline int radius_msg_add_attr_int32(struct radius_msg *msg, u8 type,
21+ 					    u32 value)
22+ {
23+@@ -315,6 +316,8 @@ static inline int radius_msg_get_attr_int32(struct radius_msg *msg, u8 type,
24+ 	*value = ntohl(val);
25+ 	return 0;
26+ }
27++#endif /* CONFIG_NO_RADIUS */
28++
29+ int radius_msg_get_attr_ptr(struct radius_msg *msg, u8 type, u8 **buf,
30+ 			    size_t *len, const u8 *start);
31+ int radius_msg_count_attr(struct radius_msg *msg, u8 type, int min_len);
32+-- 
33+2.22.0
34+
+98, -0
 1@@ -0,0 +1,98 @@
 2+From f7dc64ef991c146a491d0ed0a92d2a5890383143 Mon Sep 17 00:00:00 2001
 3+From: Michael Forney <mforney@mforney.org>
 4+Date: Fri, 15 Nov 2019 20:19:37 -0800
 5+Subject: [PATCH] Add support for some BearSSL crypo primitives
 6+
 7+---
 8+ src/crypto/crypto_bearssl.c | 79 +++++++++++++++++++++++++++++++++++++
 9+ 1 file changed, 79 insertions(+)
10+ create mode 100644 src/crypto/crypto_bearssl.c
11+
12+diff --git a/src/crypto/crypto_bearssl.c b/src/crypto/crypto_bearssl.c
13+new file mode 100644
14+index 000000000..bc29f9693
15+--- /dev/null
16++++ b/src/crypto/crypto_bearssl.c
17+@@ -0,0 +1,79 @@
18++/*
19++ * Wrapper functions for BearSSL crypto
20++ * Copyright (c) 2019, Michael Forney <mforney@mforney.org>
21++ *
22++ * This software may be distributed under the terms of the BSD license.
23++ * See README for more details.
24++ */
25++
26++#include "includes.h"
27++#include <bearssl.h>
28++
29++#include "common.h"
30++#include "md5.h"
31++#include "crypto.h"
32++
33++int digest_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *out,
34++                  const br_hash_class *hash)
35++{
36++	br_hash_compat_context ctx;
37++	size_t i;
38++
39++	hash->init(&ctx.vtable);
40++	for (i = 0; i < num_elem; ++i)
41++		hash->update(&ctx.vtable, addr[i], len[i]);
42++	hash->out(&ctx.vtable, out);
43++
44++	return 0;
45++}
46++
47++int sha1_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *out)
48++{
49++	return digest_vector(num_elem, addr, len, out, &br_sha1_vtable);
50++}
51++
52++int sha256_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *out)
53++{
54++	return digest_vector(num_elem, addr, len, out, &br_sha256_vtable);
55++}
56++
57++static int hmac_vector(const u8 *key, size_t key_len, size_t num_elem,
58++                       const u8 *addr[], const size_t *len, u8 *mac,
59++                       const br_hash_class *type)
60++{
61++	br_hmac_key_context kc;
62++	br_hmac_context ctx;
63++	size_t i;
64++
65++	br_hmac_key_init(&kc, type, key, key_len);
66++	br_hmac_init(&ctx, &kc, 0);
67++	for (i = 0; i < num_elem; ++i)
68++		br_hmac_update(&ctx, addr[i], len[i]);
69++	br_hmac_out(&ctx, mac);
70++
71++	return 0;
72++}
73++
74++int hmac_sha256_vector(const u8 *key, size_t key_len, size_t num_elem,
75++                       const u8 *addr[], const size_t *len, u8 *mac)
76++{
77++	return hmac_vector(key, key_len, num_elem, addr, len, mac, &br_sha256_vtable);
78++}
79++
80++int hmac_sha1_vector(const u8 *key, size_t key_len, size_t num_elem,
81++                     const u8 *addr[], const size_t *len, u8 *mac)
82++{
83++	return hmac_vector(key, key_len, num_elem, addr, len, mac, &br_sha1_vtable);
84++}
85++
86++int hmac_sha1(const u8 *key, size_t key_len, const u8 *data, size_t data_len,
87++	       u8 *mac)
88++{
89++	return hmac_sha1_vector(key, key_len, 1, &data, &data_len, mac);
90++}
91++
92++int hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len,
93++             u8 *mac)
94++{
95++	return hmac_vector(key, key_len, 1, &data, &data_len, mac, &br_md5_vtable);
96++}
97+-- 
98+2.24.0
99+
+1, -0
1@@ -0,0 +1 @@
2+fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17  wpa_supplicant-2.9.tar.gz
+1, -0
1@@ -0,0 +1 @@
2+url = "http://w1.fi/releases/wpa_supplicant-2.9.tar.gz"
+1, -0
1@@ -0,0 +1 @@
2+2.9 r0
+172, -0
  1@@ -0,0 +1,172 @@
  2+/* #undef AC_APPLE_UNIVERSAL_BUILD */
  3+#define ASSUME_RAM 128
  4+/* #undef ENABLE_NLS */
  5+#define HAVE_BSWAP_16 1
  6+#define HAVE_BSWAP_32 1
  7+#define HAVE_BSWAP_64 1
  8+#define HAVE_BYTESWAP_H 1
  9+/* #undef HAVE_CAPSICUM */
 10+/* #undef HAVE_CC_SHA256_CTX */
 11+/* #undef HAVE_CC_SHA256_INIT */
 12+/* #undef HAVE_CFLOCALECOPYCURRENT */
 13+/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */
 14+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
 15+#define HAVE_CHECK_CRC32 1
 16+#define HAVE_CHECK_CRC64 1
 17+#define HAVE_CHECK_SHA256 1
 18+#define HAVE_CLOCK_GETTIME 1
 19+/* #undef HAVE_COMMONCRYPTO_COMMONDIGEST_H */
 20+/* #undef HAVE_DCGETTEXT */
 21+#define HAVE_DECL_CLOCK_MONOTONIC 1
 22+#define HAVE_DECL_PROGRAM_INVOCATION_NAME 1
 23+#define HAVE_DECODERS 1
 24+#define HAVE_DECODER_ARM 1
 25+#define HAVE_DECODER_ARMTHUMB 1
 26+#define HAVE_DECODER_DELTA 1
 27+#define HAVE_DECODER_IA64 1
 28+#define HAVE_DECODER_LZMA1 1
 29+#define HAVE_DECODER_LZMA2 1
 30+#define HAVE_DECODER_POWERPC 1
 31+#define HAVE_DECODER_SPARC 1
 32+#define HAVE_DECODER_X86 1
 33+#define HAVE_DLFCN_H 1
 34+#define HAVE_ENCODERS 1
 35+#define HAVE_ENCODER_ARM 1
 36+#define HAVE_ENCODER_ARMTHUMB 1
 37+#define HAVE_ENCODER_DELTA 1
 38+#define HAVE_ENCODER_IA64 1
 39+#define HAVE_ENCODER_LZMA1 1
 40+#define HAVE_ENCODER_LZMA2 1
 41+#define HAVE_ENCODER_POWERPC 1
 42+#define HAVE_ENCODER_SPARC 1
 43+#define HAVE_ENCODER_X86 1
 44+#define HAVE_FCNTL_H 1
 45+#define HAVE_FUTIMENS 1
 46+/* #undef HAVE_FUTIMES */
 47+/* #undef HAVE_FUTIMESAT */
 48+#define HAVE_GETOPT_H 1
 49+#define HAVE_GETOPT_LONG 1
 50+/* #undef HAVE_GETTEXT */
 51+/* #undef HAVE_ICONV */
 52+/* probe HAVE_IMMINTRIN_H */
 53+#define HAVE_INTTYPES_H 1
 54+#define HAVE_LIMITS_H 1
 55+#define HAVE_MBRTOWC 1
 56+#define HAVE_MEMORY_H 1
 57+#define HAVE_MF_BT2 1
 58+#define HAVE_MF_BT3 1
 59+#define HAVE_MF_BT4 1
 60+#define HAVE_MF_HC3 1
 61+#define HAVE_MF_HC4 1
 62+#define HAVE_OPTRESET 1
 63+#define HAVE_POSIX_FADVISE 1
 64+#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
 65+#define HAVE_PTHREAD_PRIO_INHERIT 1
 66+/* #undef HAVE_SHA256INIT */
 67+/* #undef HAVE_SHA256_CTX */
 68+/* #undef HAVE_SHA256_H */
 69+/* #undef HAVE_SHA256_INIT */
 70+/* #undef HAVE_SHA2_CTX */
 71+/* #undef HAVE_SHA2_H */
 72+/* #undef HAVE_SMALL */
 73+#define HAVE_STDBOOL_H 1
 74+#define HAVE_STDINT_H 1
 75+#define HAVE_STDLIB_H 1
 76+#define HAVE_STRINGS_H 1
 77+#define HAVE_STRING_H 1
 78+/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */
 79+/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */
 80+/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */
 81+#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
 82+/* #undef HAVE_STRUCT_STAT_ST_UATIME */
 83+/* #undef HAVE_SYS_BYTEORDER_H */
 84+/* #undef HAVE_SYS_CAPSICUM_H */
 85+/* #undef HAVE_SYS_ENDIAN_H */
 86+#define HAVE_SYS_PARAM_H 1
 87+#define HAVE_SYS_STAT_H 1
 88+#define HAVE_SYS_TIME_H 1
 89+#define HAVE_SYS_TYPES_H 1
 90+#define HAVE_UINTPTR_T 1
 91+#define HAVE_UNISTD_H 1
 92+/* #undef HAVE_UTIME */
 93+/* #undef HAVE_UTIMES */
 94+#define HAVE_VISIBILITY 1
 95+#define HAVE_WCWIDTH 1
 96+#define HAVE__BOOL 1
 97+/* #undef HAVE__FUTIME */
 98+/* probe HAVE__MM_MOVEMASK_EPI8 */
 99+/* probe HAVE___BUILTIN_ASSUME_ALIGNED */
100+/* #undef HAVE___BUILTIN_BSWAPXX */
101+#define LT_OBJDIR ".libs/"
102+#define MYTHREAD_POSIX 1
103+/* #undef MYTHREAD_VISTA */
104+/* #undef MYTHREAD_WIN95 */
105+#define NDEBUG 1
106+#define PACKAGE "xz"
107+#define PACKAGE_BUGREPORT "lasse.collin@tukaani.org"
108+#define PACKAGE_NAME "XZ Utils"
109+#define PACKAGE_STRING "XZ Utils 5.2.5"
110+#define PACKAGE_TARNAME "xz"
111+#define PACKAGE_URL "https://tukaani.org/xz/"
112+#define PACKAGE_VERSION "5.2.5"
113+/* #undef PTHREAD_CREATE_JOINABLE */
114+/* probe SIZEOF_SIZE_T */
115+#define STDC_HEADERS 1
116+/* #undef TUKLIB_CPUCORES_CPUSET */
117+/* #undef TUKLIB_CPUCORES_PSTAT_GETDYNAMIC */
118+#define TUKLIB_CPUCORES_SCHED_GETAFFINITY 1
119+/* #undef TUKLIB_CPUCORES_SYSCONF */
120+/* #undef TUKLIB_CPUCORES_SYSCTL */
121+/* #undef TUKLIB_FAST_UNALIGNED_ACCESS */
122+/* #undef TUKLIB_PHYSMEM_AIX */
123+/* #undef TUKLIB_PHYSMEM_GETINVENT_R */
124+/* #undef TUKLIB_PHYSMEM_GETSYSINFO */
125+/* #undef TUKLIB_PHYSMEM_PSTAT_GETSTATIC */
126+#define TUKLIB_PHYSMEM_SYSCONF 1
127+/* #undef TUKLIB_PHYSMEM_SYSCTL */
128+/* #undef TUKLIB_PHYSMEM_SYSINFO */
129+/* #undef TUKLIB_USE_UNSAFE_TYPE_PUNNING */
130+#ifndef _ALL_SOURCE
131+# define _ALL_SOURCE 1
132+#endif
133+#ifndef _GNU_SOURCE
134+# define _GNU_SOURCE 1
135+#endif
136+#ifndef _POSIX_PTHREAD_SEMANTICS
137+# define _POSIX_PTHREAD_SEMANTICS 1
138+#endif
139+#ifndef _TANDEM_SOURCE
140+# define _TANDEM_SOURCE 1
141+#endif
142+#ifndef __EXTENSIONS__
143+# define __EXTENSIONS__ 1
144+#endif
145+#define VERSION "5.2.5"
146+#if defined AC_APPLE_UNIVERSAL_BUILD
147+# if defined __BIG_ENDIAN__
148+#  define WORDS_BIGENDIAN 1
149+# endif
150+#else
151+# ifndef WORDS_BIGENDIAN
152+/* #  undef WORDS_BIGENDIAN */
153+# endif
154+#endif
155+#ifndef _DARWIN_USE_64_BIT_INODE
156+# define _DARWIN_USE_64_BIT_INODE 1
157+#endif
158+/* #undef _FILE_OFFSET_BITS */
159+/* #undef _LARGE_FILES */
160+/* #undef _MINIX */
161+/* #undef _POSIX_1_SOURCE */
162+/* #undef _POSIX_SOURCE */
163+/* #undef _UINT32_T */
164+/* #undef _UINT64_T */
165+/* #undef _UINT8_T */
166+/* #undef __GETOPT_PREFIX */
167+/* #undef int32_t */
168+/* #undef int64_t */
169+/* #undef uint16_t */
170+/* #undef uint32_t */
171+/* #undef uint64_t */
172+/* #undef uint8_t */
173+/* #undef uintptr_t */
+149, -0
  1@@ -0,0 +1,149 @@
  2+cflags{
  3+	'-D HAVE_CONFIG_H',
  4+	'-I $outdir',
  5+	'-I $srcdir/src/common',
  6+	'-I $srcdir/src/liblzma/api',
  7+	'-I $srcdir/src/liblzma/check',
  8+	'-I $srcdir/src/liblzma/common',
  9+	'-I $srcdir/src/liblzma/delta',
 10+	'-I $srcdir/src/liblzma/lz',
 11+	'-I $srcdir/src/liblzma/lzma',
 12+	'-I $srcdir/src/liblzma/rangecoder',
 13+	'-I $srcdir/src/liblzma/simple',
 14+}
 15+
 16+build('cat', '$outdir/config.h', {
 17+	'$dir/config.h',
 18+	'$builddir/probe/HAVE_IMMINTRIN_H',
 19+	'$builddir/probe/HAVE__MM_MOVEMASK_EPI8',
 20+	'$builddir/probe/HAVE___BUILTIN_ASSUME_ALIGNED',
 21+	'$builddir/probe/SIZEOF_SIZE_T',
 22+})
 23+pkg.deps = {'$outdir/config.h'}
 24+
 25+lib('liblzma.a', [[src/(
 26+	common/(
 27+		tuklib_physmem.c
 28+		tuklib_cpucores.c
 29+	)
 30+	liblzma/(
 31+		check/(
 32+			check.c
 33+			crc32_table.c
 34+			crc32_fast.c
 35+			crc64_table.c
 36+			crc64_fast.c
 37+			sha256.c
 38+		)
 39+		common/(
 40+			common.c
 41+			block_util.c
 42+			easy_preset.c
 43+			filter_common.c
 44+			hardware_physmem.c
 45+			index.c
 46+			stream_flags_common.c
 47+			vli_size.c
 48+
 49+			hardware_cputhreads.c
 50+
 51+			alone_encoder.c
 52+			block_buffer_encoder.c
 53+			block_encoder.c
 54+			block_header_encoder.c
 55+			easy_buffer_encoder.c
 56+			easy_encoder.c
 57+			easy_encoder_memusage.c
 58+			filter_buffer_encoder.c
 59+			filter_encoder.c
 60+			filter_flags_encoder.c
 61+			index_encoder.c
 62+			stream_buffer_encoder.c
 63+			stream_encoder.c
 64+			stream_flags_encoder.c
 65+			vli_encoder.c
 66+
 67+			outqueue.c
 68+			stream_encoder_mt.c
 69+
 70+			alone_decoder.c
 71+			auto_decoder.c
 72+			block_buffer_decoder.c
 73+			block_decoder.c
 74+			block_header_decoder.c
 75+			easy_decoder_memusage.c
 76+			filter_buffer_decoder.c
 77+			filter_decoder.c
 78+			filter_flags_decoder.c
 79+			index_decoder.c
 80+			index_hash.c
 81+			stream_buffer_decoder.c
 82+			stream_decoder.c
 83+			stream_flags_decoder.c
 84+			vli_decoder.c
 85+		)
 86+		delta/(
 87+			delta_common.c
 88+			delta_encoder.c
 89+			delta_decoder.c
 90+		)
 91+		lz/(
 92+			lz_encoder.c
 93+			lz_encoder_mf.c
 94+			lz_decoder.c
 95+		)
 96+		lzma/(
 97+			lzma_encoder_presets.c
 98+			lzma_encoder.c
 99+			lzma_encoder_optimum_fast.c
100+			lzma_encoder_optimum_normal.c
101+			fastpos_table.c
102+			lzma_decoder.c
103+			lzma2_encoder.c
104+			lzma2_decoder.c
105+		)
106+		rangecoder/price_table.c
107+		simple/(
108+			simple_coder.c
109+			simple_encoder.c
110+			simple_decoder.c
111+			x86.c
112+			powerpc.c
113+			ia64.c
114+			arm.c
115+			armthumb.c
116+			sparc.c
117+		)
118+	)
119+)]])
120+
121+exe('xz', [[src/(
122+	xz/(
123+		args.c
124+		coder.c
125+		file_io.c
126+		hardware.c
127+		main.c
128+		message.c
129+		mytime.c
130+		options.c
131+		signals.c
132+		suffix.c
133+		util.c
134+		list.c
135+	)
136+	common/(
137+		tuklib_open_stdxxx.c
138+		tuklib_progname.c
139+		tuklib_exit.c
140+		tuklib_mbstr_width.c
141+		tuklib_mbstr_fw.c
142+	)
143+) liblzma.a]])
144+
145+file('bin/xz', '755', '$outdir/xz')
146+man{'src/xz/xz.1'}
147+sym('bin/unxz', 'xz')
148+sym('bin/xzcat', 'xz')
149+
150+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 2327a461e1afce862c22269b80d3517801103c1b
+1, -0
1@@ -0,0 +1 @@
2+5.2.5 r0
+31, -0
 1@@ -0,0 +1,31 @@
 2+cflags{
 3+	'-D HAVE_HIDDEN',
 4+	'-D HAVE_STDARG_H',
 5+	'-D HAVE_UNISTD_H',
 6+	'-D _LARGEFILE64_SOURCE',
 7+}
 8+
 9+lib('libz.a', {
10+	'adler32.c',
11+	'crc32.c',
12+	'deflate.c',
13+	'infback.c',
14+	'inffast.c',
15+	'inflate.c',
16+	'inftrees.c',
17+	'trees.c',
18+	'zutil.c',
19+
20+	'compress.c',
21+	'uncompr.c',
22+	'gzclose.c',
23+	'gzlib.c',
24+	'gzread.c',
25+	'gzwrite.c',
26+})
27+file('lib/libz.a', '644', '$outdir/libz.a')
28+
29+pkg.hdrs = copy('$outdir/include', '$srcdir', {'zlib.h', 'zconf.h'})
30+pkg.hdrs.install = true
31+
32+fetch 'git'
+1, -0
1@@ -0,0 +1 @@
2+Subproject commit 09155eaa2f9270dc4ed1fa13e2b4b2613e6e4851
+1, -0
1@@ -0,0 +1 @@
2+1.3 r0
+4, -0
1@@ -0,0 +1,4 @@
2+#include <emmintrin.h>
3+int main(void) {
4+	return 0;
5+}
+4, -0
1@@ -0,0 +1,4 @@
2+#include <immintrin.h>
3+int main(void) {
4+	return 0;
5+}
+4, -0
1@@ -0,0 +1,4 @@
2+int main(void) {
3+	__asm__("");
4+	return 0;
5+}
+4, -0
1@@ -0,0 +1,4 @@
2+#include <mmintrin.h>
3+int main(void) {
4+	return 0;
5+}
+6, -0
1@@ -0,0 +1,6 @@
2+#include <immintrin.h>
3+static __m128i x;
4+int main(void) {
5+	_mm_movemask_epi8(x);
6+	return 0;
7+}
+4, -0
1@@ -0,0 +1,4 @@
2+_Thread_local int x;
3+int main(void) {
4+	return x;
5+}
+4, -0
1@@ -0,0 +1,4 @@
2+void *x;
3+int main(void) {
4+	return __builtin_assume_aligned(x, 8) == x;
5+}
+3, -0
1@@ -0,0 +1,3 @@
2+int main(void) {
3+	return __builtin_choose_expr(123, 1, 0);
4+}
+4, -0
1@@ -0,0 +1,4 @@
2+unsigned x = -1;
3+int main(void) {
4+	return __builtin_clz(x);
5+}
+4, -0
1@@ -0,0 +1,4 @@
2+unsigned long x = -1;
3+int main(void) {
4+	return __builtin_ctzl(x);
5+}
+4, -0
1@@ -0,0 +1,4 @@
2+unsigned x = 0;
3+int main(void) {
4+	return __builtin_popcount(x);
5+}
+3, -0
1@@ -0,0 +1,3 @@
2+int main(void) {
3+	return __PIC__ == 0;
4+}
+1, -0
1@@ -0,0 +1 @@
2+_Static_assert(SIZEOF_LONG == sizeof(long), "incorrect size");
+2, -0
1@@ -0,0 +1,2 @@
2+#include <stddef.h>
3+_Static_assert(SIZEOF_SIZE_T == sizeof(size_t), "incorrect size");
+2, -0
1@@ -0,0 +1,2 @@
2+#include <sys/types.h>
3+_Static_assert(SIZEOF_TIME_T == sizeof(time_t), "incorrect size");
+24, -0
 1@@ -0,0 +1,24 @@
 2+local function probe(var)
 3+	build('probe', '$outdir/'..var, {'$dir/'..var, '|', '$basedir/scripts/probe.sh'}, {var=var})
 4+end
 5+
 6+probe('HAVE_EMMINTRIN_H')
 7+probe('HAVE_IMMINTRIN_H')
 8+probe('HAVE_INLINE_ASM')
 9+probe('HAVE_MMINTRIN_H')
10+probe('HAVE__MM_MOVEMASK_EPI8')
11+probe('HAVE__THREAD_LOCAL')
12+probe('HAVE___BUILTIN_ASSUME_ALIGNED')
13+probe('HAVE___BUILTIN_CHOOSE_EXPR')
14+probe('HAVE___BUILTIN_CLZ')
15+probe('HAVE___BUILTIN_CTZL')
16+probe('HAVE___BUILTIN_POPCOUNT')
17+probe('PIC')
18+
19+local function probesize(var)
20+	build('probe-size', '$outdir/'..var, {'$dir/'..var, '|', '$basedir/scripts/probe-size.sh'}, {var=var})
21+end
22+
23+probesize('SIZEOF_LONG')
24+probesize('SIZEOF_SIZE_T')
25+probesize('SIZEOF_TIME_T')
+132, -0
  1@@ -0,0 +1,132 @@
  2+rule gen
  3+  command = lua $basedir/setup.lua $gendir
  4+  generator = 1
  5+
  6+# toolchain
  7+rule cc
  8+  command = $cc -MD -MF $out.d $cflags -c -o $out $in
  9+  depfile = $out.d
 10+  deps = gcc
 11+  description = 	CC	$out
 12+
 13+rule cpp
 14+  command = $cc -MD -MF $out.d $cflags -E -P -o $out $in
 15+  depfile = $out.d
 16+  deps = gcc
 17+  description = 	CPP	$out
 18+
 19+rule as
 20+  command = $as $asflags -o $out $in
 21+  description = 	AS	$out
 22+
 23+rule link
 24+  command = $cc $ldflags -o $out $in $ldlibs
 25+  description = 	LINK	$out
 26+
 27+rule ar
 28+  command = rm -f $out && $ar crs $out $in
 29+  description = 	AR	$out
 30+
 31+rule ld
 32+  command = $ld -o $out $in
 33+  description = 	LD	$out
 34+
 35+rule objcopy
 36+  command = $objcopy $objcopyflags $in $out
 37+
 38+rule rsp
 39+  command = ln -f $rspfile $out
 40+  description = 	RSP	$out
 41+  rspfile = $out.tmp
 42+  rspfile_content = $in_newline
 43+
 44+# TODO: Enable dependency-tracking for nasm when
 45+# https://bugzilla.nasm.us/show_bug.cgi?id=3392280#c6 is fixed.
 46+rule nasm
 47+  command = nasm $nasmflags -o $out $in
 48+
 49+rule mc
 50+  command = $mc $mcflags -o $out $in
 51+
 52+rule muse
 53+  command = muse $museflags -o $out $in
 54+
 55+rule probe
 56+  command = sh $basedir/scripts/probe.sh $var $out $cc $cflags $ldflags -o /dev/null -x c $in
 57+
 58+rule probe-size
 59+  command = sh $basedir/scripts/probe-size.sh $var $out $cc $cflags -c -o /dev/null -x c $in
 60+
 61+# misc tools
 62+rule touch
 63+  command = touch $out
 64+
 65+rule empty
 66+  command = >$out
 67+  description = 	EMPTY	$out
 68+
 69+rule copy
 70+  command = ln -f $in $out
 71+  description = 	COPY	$out
 72+
 73+rule cat
 74+  command = cat $in >$out
 75+
 76+rule gzip
 77+  command = gzip -c -9 -n <$in >$out
 78+  description = 	GZIP	$out
 79+
 80+rule yacc
 81+  command = yacc $yaccflags $in
 82+  description = 	YACC	$out
 83+
 84+rule sed
 85+  command = sed $expr $in >$out
 86+  description = 	SED	$out
 87+
 88+rule awk
 89+  command = awk $expr $in >$out
 90+  description = 	AWK	$out
 91+
 92+rule grep
 93+  command = grep $expr $in >$out
 94+
 95+rule printf
 96+  command = printf $args >$out
 97+
 98+rule tic
 99+  command = tic $ticflags $in
100+
101+rule wayland-proto
102+  command = wayland-scanner $type <$in >$out
103+
104+rule git-hash
105+  command = sh $basedir/scripts/hash.sh $repo $args $in >$out
106+  description = 	HASH	$args
107+
108+rule git-tree
109+  command = sh $basedir/scripts/tree.sh $repo $repo_tag $in $out
110+  description = 	TREE	$out
111+  restat = 1
112+
113+rule git-commit
114+  command = sh $basedir/scripts/commit.sh $repo $repo_branch $repo_tag $out
115+
116+rule git-init
117+  command = git init $repo_flags $repo && touch $out
118+
119+rule fspec-hash
120+  command = $builddir/pkg/fspec-sync/host/fspec-hash <$in >$out
121+
122+rule fspec-sort
123+  command = $builddir/pkg/fspec-sync/host/fspec-sort -p <$in >$out
124+
125+rule fspec-tar
126+  command = $builddir/pkg/fspec-sync/host/fspec-tar <$in | zstd >$out
127+
128+rule fetch
129+  command = cd $basedir && sh $$OLDPWD/$script $gendir && touch $$OLDPWD/$out
130+  description = 	FETCH	$gendir
131+  restat = 1
132+  generator = 1
133+  pool = console
+10, -0
 1@@ -0,0 +1,10 @@
 2+if command -v sha256sum >/dev/null; then
 3+	exec sha256sum "$@"
 4+elif command -v sha256 >/dev/null; then
 5+	exec sha256 "$@"
 6+elif command -v shasum >/dev/null; then
 7+	exec shasum -a 256 "$@"
 8+else
 9+	printf '%s: sha256sum, sha256, or shasum required\n' "$0" >&2
10+	exit 1
11+fi
+29, -0
 1@@ -0,0 +1,29 @@
 2+set -e
 3+
 4+if [ "$#" != 4 ] ; then
 5+	echo 'usage: commit.sh repo branch tag out' >&2
 6+	exit 2
 7+fi
 8+
 9+repo=$1
10+branch=$2
11+tag=$3
12+out=$4
13+
14+if commit=$(git -C "$repo" show-ref -s --verify "refs/heads/$branch" 2>/dev/null) ; then
15+	oldtree=$(git -C "$repo" rev-parse --verify "$branch^{tree}")
16+	newtree=$(git -C "$repo" rev-parse --verify "$tag^{tree}")
17+	if [ "$oldtree" != "$newtree" ] ; then
18+		set -- -p "$branch"
19+		unset commit
20+	fi
21+else
22+	set --
23+	unset commit
24+fi
25+
26+if [ -z "${commit+set}" ] ; then
27+	commit=$(git -C "$repo" commit-tree -m "oasis $(git rev-parse --short=10 HEAD)" "$@" "$tag")
28+	git -C "$repo" update-ref "refs/heads/$branch" "$commit"
29+fi
30+echo "$commit" >"$out"
+18, -0
 1@@ -0,0 +1,18 @@
 2+file=$1
 3+shift
 4+
 5+case $file in
 6+*.tar.gz|*.tgz) tool=gzip  ;;
 7+*.tar.bz2)      tool=bzip2 ;;
 8+*.tar.xz)       tool=xz    ;;
 9+*) exit 0
10+esac
11+
12+if command -v bsdtar >/dev/null; then
13+	exec bsdtar -xf "$file" "$@"
14+elif command -v pax >/dev/null; then
15+	"$tool" -d -c "$file" | pax -r "$@"
16+else
17+	printf '%s: bsdtar or pax is required' "$0" >&2
18+	exit 1
19+fi
+28, -0
 1@@ -0,0 +1,28 @@
 2+set -e
 3+
 4+if [ "$#" != 1 ] ; then
 5+	echo 'usage: fetch-curl.sh dir' >&2
 6+	exit 2
 7+fi
 8+
 9+dir=$1
10+shift
11+
12+cd "$dir"
13+
14+if [ -e src ] ; then
15+	rm -rf src
16+fi
17+
18+if ! sh "$OLDPWD/scripts/checksum.sh" -c sha256 2>/dev/null ; then
19+	curl -L -K url -O
20+	sh "$OLDPWD/scripts/checksum.sh" -c sha256
21+fi
22+
23+while read -r _ archive ; do
24+	sh "$OLDPWD/scripts/extract.sh" "$archive" -s ',^[^/]*,src,' '*/*'
25+done <sha256
26+
27+if [ -d patch ] ; then
28+	git apply -v --whitespace=nowarn --directory "$dir/src" patch/*.patch
29+fi
+13, -0
 1@@ -0,0 +1,13 @@
 2+set -e
 3+
 4+if [ "$#" != 1 ] ; then
 5+	echo 'usage: fetch-git.sh dir' >&2
 6+	exit 2
 7+fi
 8+
 9+cd "$1"
10+
11+git submodule update --init --checkout src
12+if [ -d patch ] ; then
13+	git -C src am --keep-non-patch --whitespace=nowarn "$PWD"/patch/*.patch
14+fi
+23, -0
 1@@ -0,0 +1,23 @@
 2+set -e
 3+
 4+if [ "$#" != 4 ] ; then
 5+	echo 'usage: hash.sh repo mode name file' >&2
 6+	exit 2
 7+fi
 8+
 9+repo=$1
10+mode=$2
11+name=$3
12+shift 3
13+
14+case "$mode" in
15+12????)
16+	hash=$(printf %s "$1" | git -C "$repo" hash-object -w --stdin) ;;
17+10????)
18+	hash=$(git -C "$repo" hash-object -w --stdin <"$1") ;;
19+*)
20+	echo "invalid mode: $mode"
21+	exit 1
22+esac
23+
24+printf '%s %s\t%s\n' "$mode" "$hash" "$name"
+60, -0
 1@@ -0,0 +1,60 @@
 2+import collections
 3+import json
 4+import os
 5+import subprocess
 6+import sys
 7+import urllib.request
 8+
 9+names = {
10+	'awk': 'nawk',
11+	'lpeg': 'lua:lpeg',
12+	'sshfs': 'fusefs:sshfs',
13+	'st': 'st-term',
14+	'terminus-font': 'fonts:terminus',
15+	'the_silver_searcher': 'the-silver-searcher',
16+	'tz': 'tzdata',
17+	'wpa_supplicant': 'wpa-supplicant',
18+}
19+skip = set([
20+	'adobe-source-fonts',
21+	'cproc',
22+	'libutp',
23+	'mc',
24+	'openbsd',
25+	'qbe',
26+	'sbase',
27+	'sdhcp',
28+	'skeleton',
29+	'st',
30+	'swc',
31+	'ubase',
32+	'velox',
33+	'wld',
34+])
35+
36+p = subprocess.Popen(['git', '-C', 'pkg', 'ls-tree', 'HEAD'], stdout=subprocess.PIPE)
37+for line in p.stdout:
38+	fields = line.decode().split()
39+	if fields[1] != 'tree' or fields[3] in skip:
40+		continue
41+	name = fields[3]
42+	try:
43+		with open('pkg/{}/ver'.format(name), 'r') as f:
44+			oldver = f.read().rsplit(maxsplit=1)[0]
45+	except FileNotFoundError:
46+		continue
47+	proj = names.get(name, name)
48+	with urllib.request.urlopen('https://repology.org/api/v1/project/{}'.format(proj)) as response:
49+		pkgs = json.loads(response.read())
50+	newest = collections.Counter()
51+	for pkg in pkgs:
52+		if pkg['status'] in ('newest', 'unique'):
53+			newest[pkg['version']] += 1
54+	if not newest:
55+		print('could not find newest version of {}'.format(proj), file=sys.stderr)
56+		continue
57+	newver = newest.most_common(1)[0][0]
58+	if oldver != newver:
59+		print('{:20} {:16} => {:16}'.format(name, oldver, newver))
60+if p.wait():
61+	raise CalledProcessError(p.retcode, p.args)
+23, -0
 1@@ -0,0 +1,23 @@
 2+BEGIN {
 3+	RS = ""
 4+	sort = "sort -k 2"
 5+}
 6+
 7+function mode() {
 8+	for (i = 2; i <= NF; ++i) {
 9+		if ($i ~ /^mode=/)
10+			return substr($i, 6)
11+	}
12+	printf "file '%s' is missing mode attribute\n", $1 >"/proc/self/fd/2"
13+	exit(1)
14+}
15+
16+/type=dir/ {
17+	printf "04%s %s\n", mode(), substr($1, 2) |sort
18+}
19+
20+/type=reg/ {
21+	m = mode()
22+	if (m != "0644" && m != "0755")
23+		printf "10%s %s\n", m, substr($1, 2) |sort
24+}
+22, -0
 1@@ -0,0 +1,22 @@
 2+set -e
 3+
 4+if [ "$#" -lt 3 ] ; then
 5+	printf 'usage: %s var out command...\n' "$0" >&2
 6+	exit 2
 7+fi
 8+
 9+var=$1
10+out=$2
11+shift 2
12+for size in 8 4 2 1 ; do
13+	echo "==> trying $var=$size..." >&2
14+	if "$@" -D "$var=$size" ; then
15+		echo '==> success' >&2
16+		echo "#define $var $size" >"$out"
17+		exit 0
18+	fi
19+done 2>"$out.log"
20+
21+cat "$out.log"
22+printf "%s: could not determine %s\n" "$0" "$var" >&2
23+exit 1
+13, -0
 1@@ -0,0 +1,13 @@
 2+set -e
 3+
 4+if [ "$#" -lt 3 ] ; then
 5+	printf 'usage: %s var out command...\n' "$0" >&2
 6+	exit 2
 7+fi
 8+
 9+var=$1
10+out=$2
11+shift 2
12+if "$@" 2>"$out.log" ; then
13+	echo "#define $var 1"
14+fi >"$out"
+9, -0
 1@@ -0,0 +1,9 @@
 2+#n
 3+
 4+:next
 5+/\\$/ {
 6+	N
 7+	b next
 8+}
 9+
10+/#/p
+34, -0
 1@@ -0,0 +1,34 @@
 2+function line() {
 3+	if (match($0, /\.d$/))
 4+		read($0)
 5+	else
 6+		libs[++n] = $0
 7+}
 8+
 9+function read(name) {
10+	for (;;) {
11+		ret = getline < name
12+		if (ret < 0) {
13+			print "failed to read line from " name > "/proc/self/fd/2"
14+			exit(1)
15+		}
16+		if (ret == 0)
17+			break
18+		line()
19+	}
20+	close(name)
21+}
22+
23+{line()}
24+
25+END {
26+	for (i = n; i > 0; --i) {
27+		lib = libs[i]
28+		if (lib in seen)
29+			continue
30+		seen[lib] = 1
31+		uniq[++m] = lib
32+	}
33+	for (i = m; i > 0; --i)
34+		print uniq[i]
35+}
+24, -0
 1@@ -0,0 +1,24 @@
 2+set -e
 3+
 4+if [ "$#" != 4 ] ; then
 5+	echo 'usage: commit.sh repo tag index out' >&2
 6+	exit 2
 7+fi
 8+
 9+repo=$1
10+tag=$2
11+index=$3
12+out=$4
13+
14+export GIT_INDEX_FILE="$PWD/$out.index"
15+git -C "$repo" read-tree --empty
16+git -C "$repo" update-index --index-info <"$index"
17+tree=$(git -C "$repo" write-tree)
18+git -C "$repo" update-ref "refs/tags/$tag" "$tree"
19+
20+printf '%s\n' "$tree" >"$out.tmp"
21+if cmp -s "$out" "$out.tmp" ; then
22+	rm "$out.tmp"
23+else
24+	mv "$out.tmp" "$out"
25+fi
+49, -0
 1@@ -0,0 +1,49 @@
 2+return {
 3+	core={
 4+		'awk',
 5+		'bc',
 6+		'byacc',
 7+		'bzip2',
 8+		'cacert',
 9+		'curl',
10+		'git',
11+		'lua',
12+		'oksh',
13+		'openbsd',
14+		'pigz',
15+		'rc',
16+		'samurai',
17+		'sbase',
18+		'skeleton',
19+		'ubase',
20+		'xz',
21+	},
22+	extra={
23+		'e2fsprogs',
24+		'dosfstools',
25+		'util-linux',
26+		'file',
27+		'less',
28+		'mandoc',
29+		'netbsd-curses',
30+		'openssh',
31+		'vis',
32+		'tz',
33+	},
34+	devel={
35+		'binutils',
36+		'flex',
37+		'linux-headers',
38+		'make',
39+		'man-pages-posix',
40+		'musl',
41+		'strace',
42+	},
43+	net={
44+		'iproute2',
45+		'catgirl',
46+		'sdhcp',
47+		'transmission',
48+		'wpa_supplicant',
49+	},
50+}
+145, -0
  1@@ -0,0 +1,145 @@
  2+#!/bin/lua
  3+
  4+-- Lua 5.1 compatibility
  5+do
  6+	local os_execute = os.execute
  7+	os.execute = function(cmd)
  8+		local ret = os_execute(cmd)
  9+		return ret == true or ret == 0
 10+	end
 11+end
 12+
 13+basedir = arg[0]:match('(.*)/') or '.'
 14+
 15+if not os.execute('exec test -f config.lua') then
 16+	os.execute('exec cp '..basedir..'/config.def.lua config.lua')
 17+end
 18+
 19+dofile(basedir..'/ninja.lua')
 20+config = dofile 'config.lua'
 21+if not config.prefix then
 22+	config.prefix = ''
 23+end
 24+
 25+local recurse = not arg[1]
 26+
 27+local function gen(gendir)
 28+	local dir = basedir..'/'..gendir
 29+	local outdir = config.builddir..'/'..gendir
 30+	pkg={
 31+		name=gendir:match('[^/]*$'),
 32+		dir=dir,
 33+		gendir=gendir,
 34+		srcdir=dir..'/src',
 35+		outdir=outdir,
 36+		inputs={
 37+			index={},
 38+			fspec={},
 39+			gen={
 40+				'$basedir/ninja.lua',
 41+				'$basedir/sets.lua',
 42+				'$basedir/setup.lua',
 43+				'config.lua',
 44+			},
 45+			ninja={'$gendir/local.ninja'},
 46+			fetch={},
 47+		},
 48+		fspec={},
 49+	}
 50+	assert(os.execute(('exec mkdir -p %s %s'):format(gendir, outdir)))
 51+	io.output(gendir..'/local.ninja.tmp')
 52+	set('gendir', gendir)
 53+	if gendir ~= '.' then
 54+		set('dir', '$basedir/$gendir')
 55+		set('outdir', '$builddir/$gendir')
 56+		set('srcdir', '$dir/src')
 57+	end
 58+	load('gen.lua')
 59+
 60+	build('gen', '$gendir/local.ninja', {'|', pkg.inputs.gen})
 61+	phony('ninja', pkg.inputs.ninja)
 62+
 63+	if pkg.hdrs then
 64+		phony('headers', pkg.hdrs)
 65+		if pkg.hdrs.install then
 66+			for hdr in iterstrings(pkg.hdrs) do
 67+				if not hdr:hasprefix('$outdir/include/') then
 68+					error('header is not in $outdir/include: '..hdr)
 69+				end
 70+				file(hdr:sub(9), '644', hdr)
 71+			end
 72+		end
 73+	end
 74+	if pkg.deps then
 75+		phony('deps', pkg.deps)
 76+	end
 77+
 78+	if next(pkg.fspec) then
 79+		local out = outdir..'/local.fspec'
 80+		local tmp = out..'.tmp'
 81+		local f = assert(io.open(tmp, 'w'))
 82+		local srcs = {}
 83+		for _, path, fspec in sortedpairs(pkg.fspec) do
 84+			f:write(('/%s\n'):format(path))
 85+			for _, k in ipairs{'type', 'mode', 'source', 'target'} do
 86+				local v = fspec[k]
 87+				if v then
 88+					f:write(('%s=%s\n'):format(k, v))
 89+				end
 90+			end
 91+			f:write('\n')
 92+			local src = fspec.source
 93+			if src then
 94+				srcs[#srcs + 1] = src
 95+			end
 96+		end
 97+		f:close()
 98+		if os.execute(('exec cmp -s %s %s'):format(tmp, out)) then
 99+			os.remove(tmp)
100+		else
101+			os.rename(tmp, out)
102+		end
103+		build('fspec-hash', '$outdir/local-hashed.fspec', {'$outdir/local.fspec', '|', '$builddir/pkg/fspec-sync/host/fspec-hash', srcs})
104+		table.insert(pkg.inputs.fspec, '$outdir/local-hashed.fspec')
105+	end
106+	if next(pkg.inputs.index) then
107+		build('cat', '$outdir/root.index', pkg.inputs.index, {
108+			description='	INDEX	$outdir/root.index',
109+		})
110+	else
111+		build('empty', '$outdir/root.index')
112+	end
113+	if next(pkg.inputs.fspec) then
114+		build('cat', '$outdir/tree.fspec', pkg.inputs.fspec, {
115+			description = '	FSPEC	$outdir/tree.fspec',
116+		})
117+	else
118+		build('empty', '$outdir/tree.fspec')
119+	end
120+	build('phony', '$dir/root', pkg.inputs.root)
121+	io.close()
122+	os.rename(gendir..'/local.ninja.tmp', gendir..'/local.ninja')
123+	if gendir == '.' then
124+		os.execute('exec ln -sf local.ninja build.ninja')
125+	end
126+end
127+
128+function subgen(dir)
129+	local file = '$gendir/'..dir..'/local.ninja'
130+	subninja(file)
131+	table.insert(pkg.inputs.ninja, '$gendir/'..dir..'/ninja')
132+	table.insert(pkg.inputs.index, '$outdir/'..dir..'/root.index')
133+	table.insert(pkg.inputs.fspec, '$outdir/'..dir..'/tree.fspec')
134+	local cmd = ('exec test -f %s/%s/local.ninja'):format(pkg.gendir, dir)
135+	if recurse or not os.execute(cmd) then
136+		local oldpkg, oldout = pkg, io.output()
137+		if pkg.gendir ~= '.' then
138+			dir = pkg.gendir..'/'..dir
139+		end
140+		gen(dir)
141+		pkg = oldpkg
142+		io.output(oldout)
143+	end
144+end
145+
146+gen(arg[1] or '.')
+8, -0
1@@ -0,0 +1,8 @@
2+[core]
3+	sharedRepository = 0664
4+	sparseCheckout = true
5+[oasis]
6+	root = .
7+[merge "perms"]
8+	name = .perms merge driver
9+	driver = ./libexec/mergeperms %O %A %B
+15, -0
 1@@ -0,0 +1,15 @@
 2+#!/bin/sh
 3+
 4+old=$1
 5+new=$2
 6+flag=$3
 7+
 8+# If HEAD didn't change or if this is just a file checkout, do a complete
 9+# permissions fix.
10+if [ "$old" = 0000000000000000000000000000000000000000 ] || [ "$old" = "$new" ] || [ "$flag" = 0 ] ; then
11+	set "$new"
12+else
13+	set "$old" "$new"
14+fi
15+
16+exec "$(git config oasis.root)"/libexec/applyperms "$@"
+3, -0
1@@ -0,0 +1,3 @@
2+#!/bin/sh
3+
4+exec "$(git config oasis.root)"/libexec/applyperms ORIG_HEAD HEAD
+2, -0
1@@ -0,0 +1,2 @@
2+* merge=binary
3+/.perms merge=perms
+1, -0
1@@ -0,0 +1 @@
2+/lost+found
+4, -0
1@@ -0,0 +1,4 @@
2+*
3+!/.gitattributes
4+!/.perms
5+!/LICENSE