13aa0bc89SMark Johnston /*-
23aa0bc89SMark Johnston  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
33aa0bc89SMark Johnston  *
43aa0bc89SMark Johnston  * Copyright (c) 2021 The FreeBSD Foundation
53aa0bc89SMark Johnston  *
63aa0bc89SMark Johnston  * This software was developed by Mark Johnston under sponsorship from
73aa0bc89SMark Johnston  * the FreeBSD Foundation.
83aa0bc89SMark Johnston  */
93aa0bc89SMark Johnston 
103aa0bc89SMark Johnston #include <sys/cdefs.h>
113aa0bc89SMark Johnston 
123aa0bc89SMark Johnston /*
133aa0bc89SMark Johnston  * A hack to allow libdwarf.a to be statically linked without zlib.  This is
143aa0bc89SMark Johnston  * unfortunately required for FreeBSD <= 13.0 to bootstrap build tools
153aa0bc89SMark Johnston  * such as nm(1), as they use metadata from the source tree to generate the
163aa0bc89SMark Johnston  * dependency list but then link with the build host's libraries.
173aa0bc89SMark Johnston  */
183aa0bc89SMark Johnston 
193aa0bc89SMark Johnston extern int uncompress(void *, unsigned long *, const void *,
203aa0bc89SMark Johnston     unsigned long);
213aa0bc89SMark Johnston 
223aa0bc89SMark Johnston int __weak_symbol
uncompress(void * dst __unused,unsigned long * dstsz __unused,const void * src __unused,unsigned long srcsz __unused)233aa0bc89SMark Johnston uncompress(void *dst __unused, unsigned long *dstsz __unused,
243aa0bc89SMark Johnston     const void *src __unused, unsigned long srcsz __unused)
253aa0bc89SMark Johnston {
263aa0bc89SMark Johnston 	return (-6); /* Z_VERSION_ERROR */
273aa0bc89SMark Johnston }
28