Skip to content

Commit

Permalink
Eliminate unnecessary dependency on bfd.h from sepdebugcrcfix
Browse files Browse the repository at this point in the history
I think the reliance on bfd.h was a mistake. The code was lifted from
bfd, but should be totally independent (it just calculates a CRC).
Fix the type to be a normal size_t and include sys/stat.h (which was
included through bfd.h) to get the definitions of stat and chmod.
  • Loading branch information
Mark Wielaard authored and pmatilai committed Dec 9, 2016
1 parent e825e07 commit 245b5a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/sepdebugcrcfix.c
Expand Up @@ -20,6 +20,7 @@
#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/mman.h>
#include <endian.h>
Expand All @@ -28,7 +29,6 @@
#include <error.h>
#include <libelf.h>
#include <gelf.h>
#include <bfd.h>

#define _(x) x
#define static_assert(expr) \
Expand All @@ -46,7 +46,7 @@ static const bool false = 0, true = 1;
static unsigned long
calc_gnu_debuglink_crc32 (unsigned long crc,
const unsigned char *buf,
bfd_size_type len)
size_t len)
{
static const unsigned long crc32_table[256] =
{
Expand Down

0 comments on commit 245b5a3

Please sign in to comment.