@@ -25,7 +25,7 @@ headers = mach_init.h mach.h mach_error.h mach-shortcuts.h mach/mach_traps.h \
lock = spin-solid spin-lock mutex-init mutex-solid
lock-headers = lock-intern.h spin-lock.h
routines = $(mach-syscalls) $(mach-shortcuts) \
- mach_init mig_strncpy mig_memcpy msg \
+ mach_init mig_strncpy mig_strlen mig_memcpy msg \
mig-alloc mig-dealloc mig-reply \
msg-destroy msgserver \
mach_error errstring error_compat errsystems \
@@ -61,6 +61,9 @@ libc {
GLIBC_2.32 {
mach_print;
}
+ GLIBC_2.38 {
+ mig_strlen;
+ }
HURD_CTHREADS_0.3 {
__mutex_init; __mutex_lock; __mutex_lock_solid; __mutex_trylock;
@@ -71,5 +74,6 @@ libc {
GLIBC_PRIVATE {
# functions used by RPC stubs
__mig_memcpy;
+ __mig_strlen;
}
}
@@ -53,6 +53,8 @@ extern void mig_reply_setup (const mach_msg_header_t *__request,
/* Idiocy support function. */
extern vm_size_t mig_strncpy (char *__dst, const char *__src, vm_size_t __len);
extern vm_size_t __mig_strncpy (char *__dst, const char *__src, vm_size_t);
+extern vm_size_t mig_strlen (const char *__src);
+extern vm_size_t __mig_strlen (const char *__src);
extern void *__mig_memcpy (void *__dst, const void *__src, vm_size_t __len);
new file mode 100644
@@ -0,0 +1,27 @@
+/* strlen stub for mig stubs in libmachuser and libhurduser.
+ Copyright (C) 2023 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <mach.h>
+#include <string.h>
+
+vm_size_t
+__mig_strlen (const char *src)
+{
+ return strlen (src);
+}
+weak_alias (__mig_strlen, mig_strlen)
@@ -2326,6 +2326,7 @@ GLIBC_2.38 __isoc23_wcstoull F
GLIBC_2.38 __isoc23_wcstoull_l F
GLIBC_2.38 __isoc23_wcstoumax F
GLIBC_2.38 __isoc23_wscanf F
+GLIBC_2.38 mig_strlen F
GLIBC_2.4 __confstr_chk F
GLIBC_2.4 __fgets_chk F
GLIBC_2.4 __fgets_unlocked_chk F