diff options
author | marcel <marcel@FreeBSD.org> | 2002-12-30 01:41:14 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2002-12-30 01:41:14 +0000 |
commit | 078bc225e1fe79aa05cd7b91cf1ce9395d760401 (patch) | |
tree | 19d4fb8597304ce7f10c1ab7f8522976b0fbb524 /lib/libc/gen | |
parent | bc746e81d26e2998dcade4f9b9be21cdf5f1ab48 (diff) | |
download | FreeBSD-src-078bc225e1fe79aa05cd7b91cf1ce9395d760401.zip FreeBSD-src-078bc225e1fe79aa05cd7b91cf1ce9395d760401.tar.gz |
Fix LP64 architectures and especially ia64. Functions that return
a pointer and lack a prototype will have the return value (assumed
to be an integer) zero-extended to a pointer. On ia64 this is
unconditionally fatal as it zeroes-out the region bits, forming an
invalid pointer. Fix the sigsegv by including <stdlib.h>.
Pointy hat: bbraun
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/basename.c | 1 | ||||
-rw-r--r-- | lib/libc/gen/dirname.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/gen/basename.c b/lib/libc/gen/basename.c index 9bd2dc2..9552ab3 100644 --- a/lib/libc/gen/basename.c +++ b/lib/libc/gen/basename.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include <errno.h> #include <libgen.h> +#include <stdlib.h> #include <string.h> #include <sys/param.h> diff --git a/lib/libc/gen/dirname.c b/lib/libc/gen/dirname.c index 4e5ecb4..56b75f6 100644 --- a/lib/libc/gen/dirname.c +++ b/lib/libc/gen/dirname.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include <errno.h> #include <libgen.h> +#include <stdlib.h> #include <string.h> #include <sys/param.h> |