build2/build2-0.16.0-glibc-2.38-1.patch

46 lines
1.5 KiB
Diff
Raw Normal View History

From c89789432983bcb2413065fd251b4ba4ae96481e Mon Sep 17 00:00:00 2001
From: Boris Kolpackov <boris@codesynthesis.com>
Date: Wed, 23 Aug 2023 14:04:14 +0200
Subject: [PATCH] Release version 0.1.1+1
Deal with glibc 2.38 providing strlcpy() and strlcat().
---
libpkg-config/libpkg-config/config.h.in | 8 +++++++-
libpkg-config/manifest | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/libpkg-config/libpkg-config/config.h.in b/libpkg-config/libpkg-config/config.h.in
index f48b68a..bc0cf79 100644
--- a/libpkg-config/libpkg-config/config.h.in
+++ b/libpkg-config/libpkg-config/config.h.in
@@ -13,10 +13,16 @@
# define HAVE_STRNDUP 1
#endif
+// GNU libc added strlcpy() and strlcat() in version 2.38 (in anticipation
+// of their addition to POSIX).
+//
#if defined(__FreeBSD__) || \
defined(__OpenBSD__) || \
defined(__NetBSD__) || \
- defined(__APPLE__)
+ defined(__APPLE__) || \
+ (defined(__GLIBC__) && \
+ defined(__GLIBC_MINOR__) && \
+ (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 38))
# define HAVE_STRLCPY 1
# define HAVE_STRLCAT 1
#endif
diff --git a/libpkg-config/manifest b/libpkg-config/manifest
index 49e8396..d2616a9 100644
--- a/libpkg-config/manifest
+++ b/libpkg-config/manifest
@@ -1,6 +1,6 @@
: 1
name: libpkg-config
-version: 0.1.1
+version: 0.1.1+1
summary: C library for retrieving compiler/linker flags and other metadata
license: ISC
topics: pkg-config, library, build system