1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Convert DDB_CTF to use newer version of ZLIB.

PR:		229763
Submitted by:	Yoshihiro Ota <ota j email ne jp>
Differential Revision:	https://reviews.freebsd.org/D21176
This commit is contained in:
Xin LI 2019-08-08 07:27:49 +00:00
parent 92e9c0608b
commit 22bbc4b242
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350744
3 changed files with 2 additions and 22 deletions

View File

@ -40,21 +40,7 @@
#define CTF_HDR_STRLEN_U32 8
#ifdef DDB_CTF
static void *
z_alloc(void *nil, u_int items, u_int size)
{
void *ptr;
ptr = malloc(items * size, M_TEMP, M_NOWAIT);
return ptr;
}
static void
z_free(void *nil, void *ptr)
{
free(ptr, M_TEMP);
}
#include <contrib/zlib/zlib.h>
#endif
static int
@ -269,8 +255,6 @@ link_elf_ctf_get(linker_file_t lf, linker_ctf_t *lc)
/* Initialise the zlib structure. */
bzero(&zs, sizeof(zs));
zs.zalloc = z_alloc;
zs.zfree = z_free;
if (inflateInit(&zs) != Z_OK) {
error = EIO;

View File

@ -67,10 +67,6 @@ __FBSDID("$FreeBSD$");
#include <sys/link_elf.h>
#ifdef DDB_CTF
#include <sys/zlib.h>
#endif
#include "linker_if.h"
#define MAXSEGS 4

View File

@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$");
#include <sys/link_elf.h>
#ifdef DDB_CTF
#include <sys/zlib.h>
#include <contrib/zlib/zlib.h>
#endif
#include "linker_if.h"