summaryrefslogtreecommitdiff
path: root/libctf/ctf_lib.c
diff options
context:
space:
mode:
authorWez Furlong <wez@netevil.org>2011-04-03 15:19:34 -0400
committerWez Furlong <wez@netevil.org>2011-04-03 15:19:34 -0400
commitee2b74dbc88c21f3e6c53d6d4f09a69b271755e4 (patch)
tree635825833d7a4679d30cd2e0260b91a51b1831cd /libctf/ctf_lib.c
parent253acb864d82ab0406d6a6bcecd09e502c64b140 (diff)
downloadctf-ee2b74dbc88c21f3e6c53d6d4f09a69b271755e4.tar.gz
fix memory.h include; was pulling in the system memory.h, leaving xmalloc
undefined and implictly returning an int rather than a void*.
Diffstat (limited to 'libctf/ctf_lib.c')
-rw-r--r--libctf/ctf_lib.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libctf/ctf_lib.c b/libctf/ctf_lib.c
index 571f2da..543e009 100644
--- a/libctf/ctf_lib.c
+++ b/libctf/ctf_lib.c
@@ -134,7 +134,7 @@ ctf_sect_mmap(ctf_sect_t *sp, int fd)
{
size_t pageoff = sp->cts_offset & ~_PAGEMASK;
- caddr_t base = mmap64(NULL, sp->cts_size + pageoff, PROT_READ,
+ caddr_t base = mmap(NULL, sp->cts_size + pageoff, PROT_READ,
MAP_PRIVATE, fd, sp->cts_offset & _PAGEMASK);
if (base != MAP_FAILED)
@@ -181,10 +181,10 @@ ctf_fdopen(int fd, int *errp)
bzero(&strsect, sizeof (ctf_sect_t));
bzero(&hdr.ctf, sizeof (hdr));
- if (fstat64(fd, &st) == -1)
+ if (fstat(fd, &st) == -1)
return (ctf_set_open_errno(errp, errno));
- if ((nbytes = pread64(fd, &hdr.ctf, sizeof (hdr), 0)) <= 0)
+ if ((nbytes = pread(fd, &hdr.ctf, sizeof (hdr), 0)) <= 0)
return (ctf_set_open_errno(errp, nbytes < 0? errno : ECTF_FMT));
/*
@@ -196,7 +196,7 @@ ctf_fdopen(int fd, int *errp)
if (hdr.ctf.ctp_version > CTF_VERSION)
return (ctf_set_open_errno(errp, ECTF_CTFVERS));
- ctfsect.cts_data = mmap64(NULL, st.st_size, PROT_READ,
+ ctfsect.cts_data = mmap(NULL, st.st_size, PROT_READ,
MAP_PRIVATE, fd, 0);
if (ctfsect.cts_data == MAP_FAILED)
@@ -266,7 +266,7 @@ ctf_fdopen(int fd, int *errp)
nbytes = sizeof (Elf32_Shdr) * n;
- if ((sp32 = malloc(nbytes)) == NULL || pread64(fd,
+ if ((sp32 = malloc(nbytes)) == NULL || pread(fd,
sp32, nbytes, hdr.e64.e_shoff) != nbytes) {
free(sp);
return (ctf_set_open_errno(errp, errno));
@@ -277,7 +277,7 @@ ctf_fdopen(int fd, int *errp)
free(sp32);
- } else if (pread64(fd, sp, nbytes, hdr.e64.e_shoff) != nbytes) {
+ } else if (pread(fd, sp, nbytes, hdr.e64.e_shoff) != nbytes) {
free(sp);
return (ctf_set_open_errno(errp, errno));
}
@@ -289,7 +289,7 @@ ctf_fdopen(int fd, int *errp)
strs_mapsz = sp[hdr.e64.e_shstrndx].sh_size +
(sp[hdr.e64.e_shstrndx].sh_offset & ~_PAGEMASK);
- strs_map = mmap64(NULL, strs_mapsz, PROT_READ, MAP_PRIVATE,
+ strs_map = mmap(NULL, strs_mapsz, PROT_READ, MAP_PRIVATE,
fd, sp[hdr.e64.e_shstrndx].sh_offset & _PAGEMASK);
strs = (char *)strs_map +
@@ -393,7 +393,7 @@ ctf_open(const char *filename, int *errp)
ctf_file_t *fp;
int fd;
- if ((fd = open64(filename, O_RDONLY)) == -1) {
+ if ((fd = open(filename, O_RDONLY)) == -1) {
if (errp != NULL)
*errp = errno;
return (NULL);