kconfig: use memcmp instead of deprecated bcmp
PATCH 1/1 kconfig: use memcmp instead of deprecated bcmp
Make build succeed on systems whose c library doesn't provided the deprecated bcmp function.
--- scripts/kconfig/confdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/kconfig/confdata.c +1 -1
@@ -76,7 +76,7 @@ static bool is_same(const char *file1, const char *file2)if (map2 ==MAP_FAILED ) goto close2; -if (bcmp (map1, map2, st1.st_size)) +if (memcmp (map1, map2, st1.st_size)) goto close2; ret = true;
Signature · 3 lines
2.46.1 ============================================================
Quoted 2 lines · Thomas Meyer
Make build succeed on systems whose c library doesn't provided the deprecated bcmp function.
It would be good to mention which systems are those. Other than that, it looks good to me:
Cheers,
Miguel
Quoted 5 lines · Miguel Ojeda
Quoted 2 lines · Thomas Meyer
Make build succeed on systems whose c library doesn't provided the deprecated bcmp function.
Quoted 7 lines
It would be good to mention which systems are those. Other than that, it looks good to me:
Reviewed-by Miguel Ojeda <[email protected]>Cheers,
Miguel
Agree.
If there is a known system that does not provide bcmp, that information is appreciated.
It might be useful to add a link that mentions that this function is LEGACY.
https://pubs.opengroup.org/onlinepubs/007904875/functions/bcmp.html
Signature · 2 lines
Best Regards Masahiro Yamada
Am 26. September 2024 17:33:20 MESZ schrieb Masahiro Yamada <[email protected]>:
Quoted 12 lines
Quoted 10 lines · Miguel Ojeda
Quoted 2 lines · Thomas Meyer
Make build succeed on systems whose c library doesn't provided the deprecated bcmp function.
It would be good to mention which systems are those. Other than that, it looks good to me:
Reviewed-by Miguel Ojeda <[email protected]>
Quoted 8 lines
Quoted 2 lines
Cheers,
MiguelAgree.
If there is a known system that does not provide bcmp, that information is appreciated.
This fix is needed when I try to build Linux kernel on my Android phone under Termux with bionic libc, which only seems to implement memcmp.
Quoted 6 lines
It might be useful to add a link that mentions that this function is LEGACY.
https://pubs.opengroup.org/onlinepubs/007904875/functions/bcmp.html
Signature · 1 line
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
Quoted 20 lines · Thomas Meyer
Am 26. September 2024 17:33:20 MESZ schrieb Masahiro Yamada <[email protected]>:
Quoted 16 lines
Quoted 12 lines · Miguel Ojeda
Quoted 2 lines · Thomas Meyer
Make build succeed on systems whose c library doesn't provided the deprecated bcmp function.
It would be good to mention which systems are those. Other than that, it looks good to me:
Reviewed-by Miguel Ojeda <[email protected]>Cheers,
Miguel
Quoted 6 lines
Quoted 4 lines
Agree.
If there is a known system that does not provide bcmp, that information is appreciated.
This fix is needed when I try to build Linux kernel on my Android phone under Termux with bionic libc, which only seems to implement memcmp.
OK, thanks.
Please add a little more description in v2.
For example,
bcmp() was removed in POSIX.1-2008.
This commit replaces bcmp() with memcmp(). This allows Kconfig to link with C libraries that do not provide bcmp(), such as Android bionic libc.
Quoted 10 lines
Quoted 6 lines
It might be useful to add a link that mentions that this function is LEGACY.
https://pubs.opengroup.org/onlinepubs/007904875/functions/bcmp.html
--
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
--
Best Regards
Masahiro Yamada
Quoted 39 lines · Masahiro Yamada
Quoted 20 lines · Thomas Meyer
Am 26. September 2024 17:33:20 MESZ schrieb Masahiro Yamada <[email protected]>:
Quoted 16 lines
Quoted 12 lines · Miguel Ojeda
Quoted 2 lines · Thomas Meyer
Make build succeed on systems whose c library doesn't provided the deprecated bcmp function.
It would be good to mention which systems are those. Other than that, it looks good to me:
Reviewed-by Miguel Ojeda <[email protected]>Cheers,
MiguelQuoted 6 lines
Quoted 4 lines
Agree.
If there is a known system that does not provide bcmp, that information is appreciated.
This fix is needed when I try to build Linux kernel on my Android phone under Termux with bionic libc, which only seems to implement memcmp.
OK, thanks.
Please add a little more description in v2.
For example,
Quoted 5 lines
bcmp()was removed in POSIX.1-2008.This commit replaces
bcmp()withmemcmp(). This allowsKconfigto link with C libraries that do not providebcmp(), such as Android bionic libc.
Applied with updated commit description.
Signature · 2 lines
Best Regards Masahiro Yamada