Skip to content

Commit e94df05

Browse files
sycl/builtins.hpp to match rand/srand noexcept
1 parent 44e28fd commit e94df05

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sycl/include/sycl/builtins.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@ extern __DPCPP_SYCL_EXTERNAL_LIBC char *strncpy(char *dest, const char *src,
2727
extern __DPCPP_SYCL_EXTERNAL_LIBC int strcmp(const char *s1, const char *s2);
2828
extern __DPCPP_SYCL_EXTERNAL_LIBC int strncmp(const char *s1, const char *s2,
2929
size_t n);
30+
#ifdef __LLVM_LIBC__
31+
extern __DPCPP_SYCL_EXTERNAL_LIBC int rand() noexcept;
32+
extern __DPCPP_SYCL_EXTERNAL_LIBC void srand(unsigned int seed) noexcept;
33+
#else
3034
extern __DPCPP_SYCL_EXTERNAL_LIBC int rand();
3135
extern __DPCPP_SYCL_EXTERNAL_LIBC void srand(unsigned int seed);
36+
#endif
3237
extern __DPCPP_SYCL_EXTERNAL long long int __imf_llmax(long long int x,
3338
long long int y);
3439
extern __DPCPP_SYCL_EXTERNAL long long int __imf_llmin(long long int x,

0 commit comments

Comments
 (0)