summaryrefslogtreecommitdiffstats
path: root/libelf/elf32_getphdr.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2005-08-25 01:49:35 +0000
committerRoland McGrath <[email protected]>2005-08-25 01:49:35 +0000
commit4c305da9de0ecfe9af64cb6787b2b4b8a6aa8dd5 (patch)
treeaeba7918420be8f6c080f902529a482993388e5f /libelf/elf32_getphdr.c
parent6830bc40bb6a38dee917bebc856c7c1ba5126e24 (diff)
2005-08-24 Roland McGrath <[email protected]>
* line2addr.c (print_address): Omit () for DSOs.
Diffstat (limited to 'libelf/elf32_getphdr.c')
-rw-r--r--libelf/elf32_getphdr.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libelf/elf32_getphdr.c b/libelf/elf32_getphdr.c
index 341acf09..25693687 100644
--- a/libelf/elf32_getphdr.c
+++ b/libelf/elf32_getphdr.c
@@ -19,11 +19,9 @@
# include <config.h>
#endif
-#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
-#include <system.h>
#include "libelfP.h"
#include "common.h"
@@ -150,10 +148,9 @@ elfw2(LIBELFBITS,getphdr) (elf)
elf->state.ELFW(elf,LIBELFBITS).phdr_flags |= ELF_F_MALLOCED;
/* Read the header. */
- ssize_t n = pread_retry (elf->fildes,
- elf->state.ELFW(elf,LIBELFBITS).phdr, size,
- elf->start_offset + ehdr->e_phoff);
- if (unlikely ((size_t) n != size))
+ if ((size_t) pread (elf->fildes,
+ elf->state.ELFW(elf,LIBELFBITS).phdr, size,
+ (elf->start_offset + ehdr->e_phoff)) != size)
{
/* Severe problems. We cannot read the data. */
__libelf_seterrno (ELF_E_READ_ERROR);