summaryrefslogtreecommitdiffstats
path: root/rtemstoolkit/elftoolchain/libelf/elf_rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'rtemstoolkit/elftoolchain/libelf/elf_rand.c')
-rw-r--r--rtemstoolkit/elftoolchain/libelf/elf_rand.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_rand.c b/rtemstoolkit/elftoolchain/libelf/elf_rand.c
index 2e7328a..eb2c9ea 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_rand.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_rand.c
@@ -24,14 +24,12 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
-
#include <ar.h>
#include <libelf.h>
#include "_libelf.h"
-LIBELF_VCSID("$Id: elf_rand.c 189 2008-07-20 10:38:08Z jkoshy $");
+ELFTC_VCSID("$Id: elf_rand.c 3174 2015-03-27 17:13:41Z emaste $");
off_t
elf_rand(Elf *ar, off_t offset)
@@ -40,7 +38,7 @@ elf_rand(Elf *ar, off_t offset)
if (ar == NULL || ar->e_kind != ELF_K_AR ||
(offset & 1) || offset < SARMAG ||
- offset + sizeof(struct ar_hdr) >= ar->e_rawsize) {
+ (size_t) offset + sizeof(struct ar_hdr) >= ar->e_rawsize) {
LIBELF_SET_ERROR(ARGUMENT, 0);
return 0;
}