summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2016-12-09 10:31:23 +0200
committerPanu Matilainen <pmatilai@redhat.com>2016-12-09 10:31:23 +0200
commit245b5a3b4b6d616adf47361137987e90f8dab22c (patch)
tree091bc919666cdf653055be442f407d5ef7865143
parente825e071bb9c7de171650ba1bce4823264904956 (diff)
downloadrpm-245b5a3b4b6d616adf47361137987e90f8dab22c.tar.gz
Eliminate unnecessary dependency on bfd.h from sepdebugcrcfix
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.
-rw-r--r--tools/sepdebugcrcfix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/sepdebugcrcfix.c b/tools/sepdebugcrcfix.c
index cd7fa02a0..1ce4f612f 100644
--- a/tools/sepdebugcrcfix.c
+++ b/tools/sepdebugcrcfix.c
@@ -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>
@@ -28,7 +29,6 @@
#include <error.h>
#include <libelf.h>
#include <gelf.h>
-#include <bfd.h>
#define _(x) x
#define static_assert(expr) \
@@ -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] =
{