benchtests: Fix bench-build after cd748a63ab

The benchtests does not define _LIBC.
This commit is contained in:
Adhemerval Zanella 2025-11-21 13:21:25 -03:00
parent 907089ba36
commit aa6066087f
3 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@
void * void *
generic_memccpy (void *dst, const void *src, int c, size_t n) generic_memccpy (void *dst, const void *src, int c, size_t n)
{ {
void *p = memchr (src, c, n); const void *p = memchr (src, c, n);
if (p != NULL) if (p != NULL)
return mempcpy (dst, src, p - src + 1); return mempcpy (dst, src, p - src + 1);

View File

@ -31,7 +31,7 @@ char *
generic_rawmemchr (const char *s, int c) generic_rawmemchr (const char *s, int c)
{ {
if ((unsigned char) c != 0) if ((unsigned char) c != 0)
return memchr (s, c, PTRDIFF_MAX); return (char*) memchr (s, c, PTRDIFF_MAX);
return (char *)s + strlen (s); return (char *)s + strlen (s);
} }

View File

@ -245,7 +245,7 @@ main (void)
result_t result = OK; result_t result = OK;
for (i = 0; i < (sizeof (input_files) / sizeof (input_files[0])); i++) for (i = 0; i < (sizeof (input_files) / sizeof (input_files[0])); i++)
{ {
char *locale = strchr (input_files[i], '#'); const char *locale = strchr (input_files[i], '#');
if (locale == NULL) if (locale == NULL)
{ {
printf ("Failed to get locale from filename %s, aborting!\n", printf ("Failed to get locale from filename %s, aborting!\n",