• [PATCH] cleanup: Pull in for memchr

    From Simon Richter@21:1/5 to All on Tue Mar 19 15:50:01 2024
    This needs further inspection on more systems
    ---
    lib/compat/strnlen.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/lib/compat/strnlen.c b/lib/compat/strnlen.c
    index d02bb4bbd..6a7eb0454 100644
    --- a/lib/compat/strnlen.c
    +++ b/lib/compat/strnlen.c
    @@ -22,6 +22,10 @@

    #include "compat.h"

    +#ifdef HAVE_STRING_H
    +# include <string.h>
    +#endif
    +
    /* Find the length of STRING, but scan at most MAXLEN characters.
    If no '\0' terminator is found in that many characters, return MAXLEN. */

    --
    2.39.2

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Guillem Jover@21:1/5 to Simon Richter on Wed Mar 20 01:00:01 2024
    Hi!

    On Tue, 2024-03-19 at 23:48:00 +0900, Simon Richter wrote:
    diff --git a/lib/compat/strnlen.c b/lib/compat/strnlen.c
    index d02bb4bbd..6a7eb0454 100644
    --- a/lib/compat/strnlen.c
    +++ b/lib/compat/strnlen.c
    @@ -22,6 +22,10 @@

    #include "compat.h"

    +#ifdef HAVE_STRING_H
    +# include <string.h>
    +#endif
    +

    Thanks! I ended up including this unconditionally (also because we are
    not explicitly checking for this header which should always be there,
    and if something else is checking for it, that would be an internal implementation detail that might change in the future), and before
    "compat.h". Now in git main.

    Regards,
    Guillem

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Simon Richter@21:1/5 to Guillem Jover on Wed Mar 20 05:10:01 2024
    Hi Guillem,

    On 3/20/24 08:59, Guillem Jover wrote:

    Thanks! I ended up including this unconditionally (also because we are
    not explicitly checking for this header which should always be there,
    and if something else is checking for it, that would be an internal implementation detail that might change in the future), and before "compat.h". Now in git main.

    strnlen() should also always be there. :>

    Simon

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)