Source: gopacket Version: 1.1.19-6 Severity: important Tags: patch ftbfs User: debian-gl...@lists.debian.org Usertags: glibc2.39 Control: affects -1 bettercap
Dear maintainer, gopacket fail to build from source when built against glibc 2.39: | src/github.com/google/gopacket/pcap/pcap_unix.go:349:18: could not determine kind of name for C.gopacket_time_secs_t Packages depending on golang-github-google-gopacket-dev are also affected. It appears that the issue has been introduced in version 1.1.19-5 by 0002-fix-time-type-with-__USE_TIME_BITS64.patch. It uses __time64_t when __USE_TIME_BITS64 is defined, but __time64_t is an internal type which must never used by user code. Among other things it is not defined in when it equals __time_t. glibc 2.39 changed the cases where __USE_TIME_BITS64 is defined. The easiest way to fix that is to just drop the glibc specific part and use the generic definition, which relies on correct definition of time_t and suseconds_t, and avoid logic duplication between gopacket and glibc. The following patch does that and could be used as a replacement for 0002-fix-time-type-with-__USE_TIME_BITS64.patch: --- a/pcap/pcap_unix.go +++ b/pcap/pcap_unix.go @@ -111,9 +111,6 @@ #elif __ANDROID__ #define gopacket_time_secs_t __kernel_time_t #define gopacket_time_usecs_t __kernel_suseconds_t -#elif __GLIBC__ -#define gopacket_time_secs_t __time_t -#define gopacket_time_usecs_t __suseconds_t #else // Some form of linux/bsd/etc... #include <sys/param.h> #ifdef __OpenBSD__ Regards Aurelien