lkml.org 
[lkml]   [2023]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC kvm-unit-tests 01/27] lib/string: include stddef.h for size_t
    Date
    Don't implicitly rely on this header being included.

    Signed-off-by: Joey Gouly <joey.gouly@arm.com>
    ---
    lib/string.h | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/lib/string.h b/lib/string.h
    index b07763ea..758dca8a 100644
    --- a/lib/string.h
    +++ b/lib/string.h
    @@ -7,6 +7,8 @@
    #ifndef _STRING_H_
    #define _STRING_H_

    +#include <stddef.h> /* For size_t */
    +
    extern size_t strlen(const char *buf);
    extern size_t strnlen(const char *buf, size_t maxlen);
    extern char *strcat(char *dest, const char *src);
    --
    2.17.1
    \
     
     \ /
      Last update: 2023-03-26 23:58    [W:2.076 / U:1.200 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site