mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
android-tools: Use local strlcpy implementation on glibc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
6d1ac90f34
commit
b70b98781c
@ -0,0 +1,35 @@
|
||||
From db3a3714be07c8ab51b9ae7b035e4afe9f39c645 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 7 Sep 2022 13:20:22 -0700
|
||||
Subject: [PATCH] memory.h: Always define strlcpy for glibc based systems
|
||||
|
||||
android-config.h file includes on compiler cmdline sets HAVE_STRLCPY
|
||||
unconditionally, since bionic supports it, its no big deal on android
|
||||
and also no problem when using musl since implementation exists for musl
|
||||
too, but glibc does not provide this. So either we include libbsd or use
|
||||
the implementation provided by android-tools here. We are currently
|
||||
using the in tree implementation for systems which do not provide it
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
include/cutils/memory.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/cutils/memory.h b/include/cutils/memory.h
|
||||
index e725cdd032..9e99353c58 100644
|
||||
--- a/include/cutils/memory.h
|
||||
+++ b/include/cutils/memory.h
|
||||
@@ -30,7 +30,7 @@ void android_memset16(uint16_t* dst, uint16_t value, size_t size);
|
||||
/* size is given in bytes and must be multiple of 4 */
|
||||
void android_memset32(uint32_t* dst, uint32_t value, size_t size);
|
||||
|
||||
-#if !HAVE_STRLCPY
|
||||
+#if !HAVE_STRLCPY || defined(__GLIBC__)
|
||||
/* Declaration of strlcpy() for platforms that don't already have it. */
|
||||
size_t strlcpy(char *dst, const char *src, size_t size);
|
||||
#endif
|
||||
--
|
||||
2.37.3
|
||||
|
||||
@ -45,6 +45,7 @@ SRC_URI = " \
|
||||
file://core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch;patchdir=system/core \
|
||||
file://core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch;patchdir=system/core \
|
||||
file://core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch;patchdir=system/core \
|
||||
file://core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch;patchdir=system/core \
|
||||
file://extras/0001-ext4_utils-remove-selinux-extensions.patch;patchdir=system/extras \
|
||||
file://extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch;patchdir=system/extras \
|
||||
file://libselinux/0001-Remove-bionic-specific-calls.patch;patchdir=external/libselinux \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user