Package: apt-cacher-ng
Severity: normal
Tags: patch

Dear Maintainer,

While trying to compile apt-cacher-ng with GCC 5.4.0 from the LEDE
compiled toolchain, I get the following errors:

/store/rah/proj/ash/lede-source/build_dir/target-mips_24kc_musl-1.1.15/apt-cacher-ng-0.9.1/include/acbuf.h:55:58:
 error: 'uint' was not declared in this scope
         int syswrite(int fd, unsigned int maxlen=MAX_VAL(uint));
                                                          ^
...
/store/rah/proj/ash/lede-source/build_dir/target-mips_24kc_musl-1.1.15/apt-cacher-ng-0.9.1/include/acbuf.h:62:57:
 error: 'uint' was not declared in this scope
         int sysread(int fd, unsigned int maxlen=MAX_VAL(uint));
                                                         ^

Plainly GCC 5.4 has removed the `uint' syntactic sugar.  Replacing it
with `unsigned int' fixes the error, as in the attached patch.

Note that this error comes from compiling version 0.9.1 of the
package, as with #843410, but the problem still seems to be present in
the latest source for version 1-2, which the attached patch is
against.

-- System Information:
Debian Release: 8.5
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (70, 'unstable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: armhf

Kernel: Linux 4.8.0-linux-latest-104 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)
>From b157e8e7569bbb467530d57271e8fe8dc5c4387f Mon Sep 17 00:00:00 2001
From: Bob Ham <[email protected]>
Date: Sun, 6 Nov 2016 14:33:42 +0000
Subject: [PATCH] include/acbuf.h: Fix undeclared `uint' with GCC 5.4

GCC 5.4 complains that `uint' is unknown.  Plainly this syntactic
sugar has been removed.  Replacing with `unsigned int' fixes the
error.

Signed-off-by: Bob Ham <[email protected]>
---
 include/acbuf.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/acbuf.h b/include/acbuf.h
index 33dbde8..231297e 100644
--- a/include/acbuf.h
+++ b/include/acbuf.h
@@ -55,14 +55,14 @@ class acbuf
          * \param maxlen Maximum amount of data to write
          * \return Number of written bytes, negative on failures, see write(2)
          */
-        int syswrite(int fd, unsigned int maxlen=MAX_VAL(uint));
+        int syswrite(int fd, unsigned int maxlen=MAX_VAL(unsigned int));
 
         /*
          * Reads from a file descriptor and append to buffered data, update position indexes.
          * \param fd File descriptor
          * \return Number of read bytes, negative on failures, see read(2)
          */
-        int sysread(int fd, unsigned int maxlen=MAX_VAL(uint));
+        int sysread(int fd, unsigned int maxlen=MAX_VAL(unsigned int));
 
 
     protected:
-- 
2.1.4

Reply via email to