From 4585c30b40122b7bfe299eac532b8a712607237b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Aug 2021 00:32:40 +0200 Subject: [PATCH] rawmemchr: Fix use in relocatable-prog-wrapper (regression 2021-08-20). * lib/rawmemchr.c: Restore test of HAVE_RAWMEMCHR. * modules/relocatable-prog-wrapper (Depends-on): Add stdalign. --- ChangeLog | 6 ++++++ lib/rawmemchr.c | 13 +++++++++---- modules/relocatable-prog-wrapper | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index bf6c9d66bd..a0a20e496f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-08-21 Bruno Haible + + rawmemchr: Fix use in relocatable-prog-wrapper (regression 2021-08-20). + * lib/rawmemchr.c: Restore test of HAVE_RAWMEMCHR. + * modules/relocatable-prog-wrapper (Depends-on): Add stdalign. + 2021-08-20 Paul Eggert rawmemchr: modernize and simplify diff --git a/lib/rawmemchr.c b/lib/rawmemchr.c index 469bfa3cd6..e7a00b8030 100644 --- a/lib/rawmemchr.c +++ b/lib/rawmemchr.c @@ -19,11 +19,14 @@ /* Specification. */ #include -#include -#include -#include +/* A function definition is only needed if HAVE_RAWMEMCHR is not defined. */ +#if !HAVE_RAWMEMCHR -#include "verify.h" +# include +# include +# include + +# include "verify.h" /* Find the first occurrence of C in S. */ void * @@ -118,3 +121,5 @@ rawmemchr (const void *s, int c_in) char_ptr++; return (void *) char_ptr; } + +#endif diff --git a/modules/relocatable-prog-wrapper b/modules/relocatable-prog-wrapper index d816033ee4..fa56916217 100644 --- a/modules/relocatable-prog-wrapper +++ b/modules/relocatable-prog-wrapper @@ -64,6 +64,7 @@ largefile libc-config pathmax ssize_t +stdalign stdbool stddef stdint -- 2.39.5