diff options
Diffstat (limited to 'libelf/elf_begin.c')
| -rw-r--r-- | libelf/elf_begin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c index 5e9099c2..6f850382 100644 --- a/libelf/elf_begin.c +++ b/libelf/elf_begin.c @@ -1075,7 +1075,7 @@ elf_begin (int fildes, Elf_Cmd cmd, Elf *ref) if (ref != NULL) /* Make sure the descriptor is not suddenly going away. */ rwlock_rdlock (ref->lock); - else if (unlikely (fcntl (fildes, F_GETFL) == -1 && errno == EBADF)) + else if (unlikely (fcntl (fildes, F_GETFD) == -1 && errno == EBADF)) { /* We cannot do anything productive without a file descriptor. */ __libelf_seterrno (ELF_E_INVALID_FILE); |
