diff options
author | ngie <ngie@FreeBSD.org> | 2015-10-06 21:43:37 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2015-10-06 21:43:37 +0000 |
commit | a6c3db22355401f279babb79f255d1e95c89dac3 (patch) | |
tree | da0fc986b90b658b73bc7c489013391543e8ff44 /lib | |
parent | 8cad7e1c527746c00149bc4b9faabc41bfa22295 (diff) | |
download | FreeBSD-src-a6c3db22355401f279babb79f255d1e95c89dac3.zip FreeBSD-src-a6c3db22355401f279babb79f255d1e95c89dac3.tar.gz |
MFhead @ r288954
Diffstat (limited to 'lib')
-rw-r--r-- | lib/clang/clang.build.mk | 8 | ||||
-rw-r--r-- | lib/libarchive/Makefile | 9 | ||||
-rw-r--r-- | lib/libarchive/tests/Makefile (renamed from lib/libarchive/test/Makefile) | 2 | ||||
-rw-r--r-- | lib/libc++/Makefile | 1 | ||||
-rw-r--r-- | lib/libprocstat/libprocstat.c | 4 | ||||
-rw-r--r-- | lib/libutil/kinfo_getvmmap.c | 4 |
6 files changed, 17 insertions, 11 deletions
diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk index 1610a90..acb09f5 100644 --- a/lib/clang/clang.build.mk +++ b/lib/clang/clang.build.mk @@ -247,9 +247,11 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td -I ${CLANG_SRCS}/include -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ ${CLANG_SRCS}/lib/StaticAnalyzer/Checkers/Checkers.td -.for dep in ${TGHDRS:C/$/.inc.d/} -. sinclude "${dep}" -.endfor +.if !make(depend) +. for dep in ${TGHDRS:C/$/.inc.d/} +. sinclude "${dep}" +. endfor +.endif SRCS+= ${TGHDRS:C/$/.inc.h/} DPSRCS+= ${TGHDRS:C/$/.inc.h/} diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile index 3870de2..23675eb 100644 --- a/lib/libarchive/Makefile +++ b/lib/libarchive/Makefile @@ -398,11 +398,8 @@ MLINKS+= archive_write_set_options.3 archive_write_set_format_option.3 MLINKS+= archive_write_set_options.3 archive_write_set_option.3 MLINKS+= libarchive.3 archive.3 -.PHONY: check test clean-test -check test: - cd ${.CURDIR}/test && make obj && make test - -clean-test: - cd ${.CURDIR}/test && make clean +.if ${MK_TESTS} != "no" +#SUBDIR+= tests +.endif .include <bsd.lib.mk> diff --git a/lib/libarchive/test/Makefile b/lib/libarchive/tests/Makefile index e57c5ff..fa710e3 100644 --- a/lib/libarchive/test/Makefile +++ b/lib/libarchive/tests/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -LIBARCHIVEDIR= ${.CURDIR}/../../../contrib/libarchive +LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive MAN= diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile index f9bbf7e..baa6faf 100644 --- a/lib/libc++/Makefile +++ b/lib/libc++/Makefile @@ -63,7 +63,6 @@ CXXFLAGS+= -std=c++11 .endif LIBADD+= cxxrt -LDFLAGS+= --verbose INCSGROUPS= STD EXP EXT STD_HEADERS= __bit_reference\ diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 932b5a0..3de64aa 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -1867,6 +1867,8 @@ kinfo_getvmmap_core(struct procstat_core *core, int *cntp) eb = buf + len; while (bp < eb) { kv = (struct kinfo_vmentry *)(uintptr_t)bp; + if (kv->kve_structsize == 0) + break; bp += kv->kve_structsize; cnt++; } @@ -1882,6 +1884,8 @@ kinfo_getvmmap_core(struct procstat_core *core, int *cntp) /* Pass 2: unpack */ while (bp < eb) { kv = (struct kinfo_vmentry *)(uintptr_t)bp; + if (kv->kve_structsize == 0) + break; /* Copy/expand into pre-zeroed buffer */ memcpy(kp, kv, kv->kve_structsize); /* Advance to next packed record */ diff --git a/lib/libutil/kinfo_getvmmap.c b/lib/libutil/kinfo_getvmmap.c index 129aa03..9d9e427 100644 --- a/lib/libutil/kinfo_getvmmap.c +++ b/lib/libutil/kinfo_getvmmap.c @@ -44,6 +44,8 @@ kinfo_getvmmap(pid_t pid, int *cntp) eb = buf + len; while (bp < eb) { kv = (struct kinfo_vmentry *)(uintptr_t)bp; + if (kv->kve_structsize == 0) + break; bp += kv->kve_structsize; cnt++; } @@ -59,6 +61,8 @@ kinfo_getvmmap(pid_t pid, int *cntp) /* Pass 2: unpack */ while (bp < eb) { kv = (struct kinfo_vmentry *)(uintptr_t)bp; + if (kv->kve_structsize == 0) + break; /* Copy/expand into pre-zeroed buffer */ memcpy(kp, kv, kv->kve_structsize); /* Advance to next packed record */ |