Skip to content

Commit 0b444b6

Browse files
committed
refactor: remove memset hack
1 parent 0d75423 commit 0b444b6

File tree

1 file changed

+1
-13
lines changed
  • openthread-sys/gen/sysroot/include

1 file changed

+1
-13
lines changed

openthread-sys/gen/sysroot/include/string.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,7 @@ extern "C" {
2020
#define strstr __builtin_strstr
2121

2222
#define memcmp __builtin_memcmp
23-
24-
// HACK:
25-
// We need memset to be a function rather than a macro because mbedtls
26-
// assigns it to a static variable. Clang doesn't allow built-in functions
27-
// to be called through a function pointer, so we have to wrap it.
28-
//
29-
// This can be changed to the macro version once we compile against
30-
// mbedtls-rs-sys instead of the vendored version included in OpenThread.
31-
// See: <https://github.com/esp-rs/openthread/issues/61>
32-
inline void* memset(void* s, int c, size_t n) {
33-
return __builtin_memset(s, c, n);
34-
}
35-
23+
#define memset __builtin_memset
3624
#define memcpy __builtin_memcpy
3725
#define memmove __builtin_memmove
3826

0 commit comments

Comments
 (0)