Skip to content

Commit f19dc98

Browse files
author
Nikolay Kurtov
committed
Define GPR_ASSERT macro to ensure compatibility.
Added a fallback definition for GPR_ASSERT using <assert.h> to handle cases where it is not predefined. This ensures smoother compilation and avoids potential issues with missing assertions. Signed-off-by: Nikolay Kurtov <[email protected]>
1 parent 0b1798d commit f19dc98

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

grpc-sys/grpc_wrap.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@
6666
#define GPR_CALLTYPE
6767
#endif
6868

69+
#ifndef GPR_ASSERT
70+
#include <assert.h>
71+
#define GPR_ASSERT assert
72+
#endif
73+
6974
grpc_byte_buffer* string_to_byte_buffer(const char* buffer, size_t len) {
7075
grpc_slice slice = grpc_slice_from_copied_buffer(buffer, len);
7176
grpc_byte_buffer* bb = grpc_raw_byte_buffer_create(&slice, 1);

0 commit comments

Comments
 (0)