Skip to content

Commit f88f090

Browse files
authored
[libc] Correct 'memrchr' definition and re-enable on GPU (#67850)
Summary: This was disabled on the GPU because it conflicted with the definition in `glibc`. According to information online and in the `glibc` implementation, the first argument should be a `const void *`. Fixing this resolves the problem when exporting this to offloading languages.
1 parent 46c1671 commit f88f090

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/spec/gnu_ext.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def GnuExtensions : StandardSpec<"GNUExtensions"> {
6969
FunctionSpec<
7070
"memrchr",
7171
RetValSpec<VoidPtr>,
72-
[ArgSpec<VoidPtr>, ArgSpec<IntType>, ArgSpec<SizeTType>]
72+
[ArgSpec<ConstVoidPtr>, ArgSpec<IntType>, ArgSpec<SizeTType>]
7373
>,
7474
FunctionSpec<
7575
"strerror_r",

0 commit comments

Comments
 (0)