summaryrefslogtreecommitdiff
path: root/elf/dl-misc.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-15 08:06:15 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-15 08:06:15 +0000
commitfc7f617d300f075fe28567391b10b4c5d64be46f (patch)
treeb0a8765937d52ccdb09a796e4e0c322dae9b804b /elf/dl-misc.c
parent07a3d63e524f13dd09e14adb0ac2623f6600401d (diff)
Update.
* include/link.h: Include sysd-link.h. * sysdeps/generic/sysd-link.h: New file. * sysdeps/unix/sysv/linux/sysd-link.h: New file. * elf/Makefile (distribute): Add sysd-link.h. * elf/dl-load.c: Use definitions from sysd-link.h instead of stat types and functions directly. * elf/dl-misc.c: Likewise. * elf/dl-profile.c: Likewise. * elf/loadfail.c (main): Close all successfully loaded objects.
Diffstat (limited to 'elf/dl-misc.c')
-rw-r--r--elf/dl-misc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/elf/dl-misc.c b/elf/dl-misc.c
index 63f9266422..5261007822 100644
--- a/elf/dl-misc.c
+++ b/elf/dl-misc.c
@@ -1,5 +1,5 @@
/* Miscellaneous support functions for dynamic linker
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@
#include <assert.h>
#include <fcntl.h>
-#include <unistd.h>
+#include <link.h>
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
@@ -45,11 +45,11 @@ void *
_dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot)
{
void *result;
- struct stat st;
+ struct elf_stat st;
int fd = __open (file, O_RDONLY);
if (fd < 0)
return NULL;
- if (__fxstat (_STAT_VER, fd, &st) < 0
+ if (elf_fxstat (_STAT_VER, fd, &st) < 0
/* No need to map the file if it is empty. */
|| st.st_size == 0)
result = NULL;