Skip to content

Commit bfa3d56

Browse files
committed
Fix string.h translation with glibc >= 2.43
1 parent ec9b793 commit bfa3d56

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎cpp2rust/compat/sys/cdefs.h‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// Copyright (c) 2022-present INESC-ID.
2+
// Distributed under the MIT license that can be found in the LICENSE file.
3+
4+
#include_next <sys/cdefs.h>
5+
6+
// glibc >= 2.43 wraps strchr, memchr, strstr, etc. in a _Generic selection
7+
// to preserve the constness of the argument in C23. Disable it so we
8+
// translate the plain function call.
9+
#undef __glibc_const_generic

0 commit comments

Comments
 (0)