summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/exec.34
-rw-r--r--lib/libc/net/getaddrinfo.c5
-rw-r--r--lib/libc/regex/grot/Makefile2
-rw-r--r--lib/libc/riscv/Makefile.inc1
4 files changed, 7 insertions, 5 deletions
diff --git a/lib/libc/gen/exec.3 b/lib/libc/gen/exec.3
index daeccd1..c9d32b4 100644
--- a/lib/libc/gen/exec.3
+++ b/lib/libc/gen/exec.3
@@ -28,7 +28,7 @@
.\" @(#)exec.3 8.3 (Berkeley) 1/24/94
.\" $FreeBSD$
.\"
-.Dd January 24, 1994
+.Dd December 12, 2015
.Dt EXEC 3
.Os
.Sh NAME
@@ -223,7 +223,7 @@ and
.Fn execvp
functions was
.Dq Pa :/bin:/usr/bin .
-This was changed to place the current directory last to enhance system
+This was changed to remove the current directory to enhance system
security.
.Pp
The behavior of
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c
index 95c588b..ab6b65f 100644
--- a/lib/libc/net/getaddrinfo.c
+++ b/lib/libc/net/getaddrinfo.c
@@ -1563,7 +1563,7 @@ addrconfig(struct addrinfo *pai)
if (seen_inet)
continue;
sin = (struct sockaddr_in *)(ifa->ifa_addr);
- if (IN_LOOPBACK(htonl(sin->sin_addr.s_addr)))
+ if (htonl(sin->sin_addr.s_addr) == INADDR_LOOPBACK)
continue;
seen_inet = 1;
break;
@@ -2208,6 +2208,8 @@ _dns_getaddrinfo(void *rv, void *cb_data, va_list ap)
memset(&sentinel, 0, sizeof(sentinel));
cur = &sentinel;
+ res = __res_state();
+
buf = malloc(sizeof(*buf));
if (!buf) {
RES_SET_H_ERRNO(res, NETDB_INTERNAL);
@@ -2254,7 +2256,6 @@ _dns_getaddrinfo(void *rv, void *cb_data, va_list ap)
return NS_UNAVAIL;
}
- res = __res_state();
if ((res->options & RES_INIT) == 0 && res_ninit(res) == -1) {
RES_SET_H_ERRNO(res, NETDB_INTERNAL);
free(buf);
diff --git a/lib/libc/regex/grot/Makefile b/lib/libc/regex/grot/Makefile
index e715dd8..056b55e 100644
--- a/lib/libc/regex/grot/Makefile
+++ b/lib/libc/regex/grot/Makefile
@@ -8,7 +8,7 @@
PATHS= ${.CURDIR}/.. ${.CURDIR}/../../locale ${.CURDIR}/../../../../include
.PATH: ${PATHS}
-CFLAGS+= -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS)
+CFLAGS+= -static -DPOSIX_MISTAKE -DREDEBUG $(REGCFLAGS)
.for incpath in ${PATHS}
CFLAGS+= -I${incpath}
.endfor
diff --git a/lib/libc/riscv/Makefile.inc b/lib/libc/riscv/Makefile.inc
new file mode 100644
index 0000000..e8c0da7
--- /dev/null
+++ b/lib/libc/riscv/Makefile.inc
@@ -0,0 +1 @@
+# $FreeBSD$
OpenPOWER on IntegriCloud