Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

options/posix: Add bzero #977

Merged
merged 1 commit into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions options/posix/generic/strings-stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,8 @@ int strncasecmp(const char *a, const char *b, size_t size) {
return mlibc::strncasecmp(a, b, size);
}

// Marked as obsolete in posix 2008 but used by at least tracker
void bzero(void *s, size_t n) {
memset(s, 0, n);
}

3 changes: 3 additions & 0 deletions options/posix/include/strings.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ int ffs(int word);
int strcasecmp(const char *a, const char *b);
int strncasecmp(const char *a, const char *b, size_t size);

// Marked as obsolete in posix 2008 but used by at least tracker
void bzero(void *s, size_t n);

#endif /* !__MLIBC_ABI_ONLY */

#ifdef __cplusplus
Expand Down
Loading