Source: apt-cacher-ng
Version: 3.7.4-1
Severity: normal
Tags: patch

Hi,

Ubuntu Mantic (current development version) already has glibc 2.38 which
provides its own version of strlcpy.  This makes cmake define
HAVE_STRLCPY with an empty value, which in turn causes apt-cacher-ng to
FTBFS due to:

--8<---------------cut here---------------start------------->8---
 /<<PKGBUILDDIR>>/src/meta.h:326:44: error: operator '!' has no right operand
   326 | #if !defined(HAVE_STRLCPY) || !HAVE_STRLCPY
       |                                            ^
--8<---------------cut here---------------end--------------->8---

I opted to fix this problem by using the idiom "+ 0" when checking for
the macro value:

  #if !defined(HAVE_STRLCPY) || !(HAVE_STRLCPY + 0)

This makes the package build again.

This issue doesn't currently affect Debian, but it will when glibc 2.38
is uploaded.

Thanks,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/

Attachment: signature.asc
Description: PGP signature

Reply via email to