summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/stdlib')
-rw-r--r--src/lib/libc/stdlib/malloc.c4
-rw-r--r--src/lib/libc/stdlib/random.c5
-rw-r--r--src/lib/libc/stdlib/realpath.c6
3 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c
index 57d35b80b6..69ae877aba 100644
--- a/src/lib/libc/stdlib/malloc.c
+++ b/src/lib/libc/stdlib/malloc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: malloc.c,v 1.172 2015/01/05 21:04:04 tedu Exp $ */ 1/* $OpenBSD: malloc.c,v 1.173 2015/01/16 16:48:51 deraadt Exp $ */
2/* 2/*
3 * Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net> 3 * Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net>
4 * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> 4 * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org>
@@ -26,7 +26,7 @@
26/* #define MALLOC_STATS */ 26/* #define MALLOC_STATS */
27 27
28#include <sys/types.h> 28#include <sys/types.h>
29#include <sys/param.h> 29#include <sys/param.h> /* PAGE_SHIFT ALIGN */
30#include <sys/queue.h> 30#include <sys/queue.h>
31#include <sys/mman.h> 31#include <sys/mman.h>
32#include <sys/uio.h> 32#include <sys/uio.h>
diff --git a/src/lib/libc/stdlib/random.c b/src/lib/libc/stdlib/random.c
index 96cced9a20..e293648ecd 100644
--- a/src/lib/libc/stdlib/random.c
+++ b/src/lib/libc/stdlib/random.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: random.c,v 1.28 2014/12/16 20:51:32 sthen Exp $ */ 1/* $OpenBSD: random.c,v 1.29 2015/01/16 16:48:51 deraadt Exp $ */
2/* 2/*
3 * Copyright (c) 1983 Regents of the University of California. 3 * Copyright (c) 1983 Regents of the University of California.
4 * All rights reserved. 4 * All rights reserved.
@@ -28,9 +28,6 @@
28 * SUCH DAMAGE. 28 * SUCH DAMAGE.
29 */ 29 */
30 30
31#include <sys/param.h>
32#include <sys/sysctl.h>
33#include <sys/time.h>
34#include <fcntl.h> 31#include <fcntl.h>
35#include <stdio.h> 32#include <stdio.h>
36#include <stdlib.h> 33#include <stdlib.h>
diff --git a/src/lib/libc/stdlib/realpath.c b/src/lib/libc/stdlib/realpath.c
index e06db59088..7b70b9ddfb 100644
--- a/src/lib/libc/stdlib/realpath.c
+++ b/src/lib/libc/stdlib/realpath.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: realpath.c,v 1.18 2014/10/19 03:56:28 doug Exp $ */ 1/* $OpenBSD: realpath.c,v 1.19 2015/01/16 16:48:51 deraadt Exp $ */
2/* 2/*
3 * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru> 3 * Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru>
4 * 4 *
@@ -27,13 +27,13 @@
27 * SUCH DAMAGE. 27 * SUCH DAMAGE.
28 */ 28 */
29 29
30#include <sys/param.h>
31#include <sys/stat.h> 30#include <sys/stat.h>
32 31
33#include <errno.h> 32#include <errno.h>
34#include <stdlib.h> 33#include <stdlib.h>
35#include <string.h> 34#include <string.h>
36#include <unistd.h> 35#include <unistd.h>
36#include <limits.h>
37 37
38/* A slightly modified copy of this file exists in libexec/ld.so */ 38/* A slightly modified copy of this file exists in libexec/ld.so */
39 39
@@ -156,7 +156,7 @@ realpath(const char *path, char *resolved)
156 goto err; 156 goto err;
157 } 157 }
158 if (S_ISLNK(sb.st_mode)) { 158 if (S_ISLNK(sb.st_mode)) {
159 if (symlinks++ > MAXSYMLINKS) { 159 if (symlinks++ > SYMLOOP_MAX) {
160 errno = ELOOP; 160 errno = ELOOP;
161 goto err; 161 goto err;
162 } 162 }