Package: acedb Severity: important Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu noble ubuntu-patch
Dear Maintainer, Trying to build with glibc 2.38 fails with the following error: ../wh/utils.h:34:7: error: conflicting types for ‘strcasestr’; have ‘char *(char *, char *)’ 34 | char *strcasestr (char *str1, char *str2); | ^~~~~~~~~~ In file included from ../wh/mystdlib.h:227, from ../wh/regular.h:51, from utils.c:37: /usr/include/string.h:380:14: note: previous declaration of ‘strcasestr’ with type ‘char *(const char *, const char *)’ Before glibc 2.38, the strcasestr function was only made available when building with _GNU_SOURCE. Starting with glibc 2.38, the function is available by default. In Ubuntu, the attached patch was applied to achieve the following: * Fix build against glibc 2.38 (LP: #2044385) Thanks for considering the patch. -- System Information: Debian Release: trixie/sid APT prefers mantic-updates APT policy: (500, 'mantic-updates'), (500, 'mantic-security'), (500, 'mantic') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.1.0-16-generic (SMP w/8 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru acedb-4.9.39+dfsg.02/debian/patches/glibc-2.38.patch acedb-4.9.39+dfsg.02/debian/patches/glibc-2.38.patch --- acedb-4.9.39+dfsg.02/debian/patches/glibc-2.38.patch 1970-01-01 01:00:00.000000000 +0100 +++ acedb-4.9.39+dfsg.02/debian/patches/glibc-2.38.patch 2023-11-23 16:07:13.000000000 +0100 @@ -0,0 +1,47 @@ +Description: Fix build against glibc 2.38 + In previous glibc versions, strcasestr would only be available if building + with _GNU_SOURCE. + Starting with glibc 2.38, strcasestr is now available by default. + Ensure that acedb does not redefine the function if we're building with a modern glibc. +Author: Olivier Gayot <olivier.ga...@canonical.com> +Bug: <URL to the upstream bug report if any, implies patch has been forwarded, optional> +Bug-Ubuntu: https://launchpad.net/bugs/2044385 +Forwarded: no +Last-Update: 2023-11-23 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: acedb-4.9.39+dfsg.02/w1/utils.c +=================================================================== +--- acedb-4.9.39+dfsg.02.orig/w1/utils.c 2005-10-04 15:15:00.000000000 +0200 ++++ acedb-4.9.39+dfsg.02/w1/utils.c 2023-11-23 16:48:20.118800952 +0100 +@@ -774,7 +774,7 @@ + /************************************************************/ + /* case-insensitive version of strstr */ + +-#ifndef DARWIN ++#ifndef HAS_STRCASESTR + char *strcasestr(char *str1, char *str2) + { + g_strup(str1); +Index: acedb-4.9.39+dfsg.02/wh/utils.h +=================================================================== +--- acedb-4.9.39+dfsg.02.orig/wh/utils.h 2023-11-23 16:19:02.454527757 +0100 ++++ acedb-4.9.39+dfsg.02/wh/utils.h 2023-11-23 16:47:40.099066905 +0100 +@@ -29,7 +29,16 @@ + *------------------------------------------------------------------- + */ + +-#ifndef DARWIN ++/* Ensure that features.h or an equivalent is included. */ ++#include <stdlib.h> ++ ++#if defined(DARWIN) || defined(_GNU_SOURCE) ++# define HAS_STRCASESTR ++#elif __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 38 ++# define HAS_STRCASESTR ++#endif ++ ++#ifndef HAS_STRCASESTR + /* case-insensitive version of strstr */ + char *strcasestr (char *str1, char *str2); + #endif diff -Nru acedb-4.9.39+dfsg.02/debian/patches/series acedb-4.9.39+dfsg.02/debian/patches/series --- acedb-4.9.39+dfsg.02/debian/patches/series 2023-08-15 16:23:13.000000000 +0200 +++ acedb-4.9.39+dfsg.02/debian/patches/series 2023-11-23 16:07:13.000000000 +0100 @@ -13,3 +13,4 @@ glibc2.32.patch # drop_gtk2.patch just_build_efetch.patch +glibc-2.38.patch