File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 23
23
/* Define if 'int64_t' is typedefed to 'long long' in bsdmodule. */
24
24
#undef HAVE_INT64_IS_LONG_LONG_BSDMODULE
25
25
26
+ /* Define to enable assertion checking. Failed assertions will print a message
27
+ and optionally stop the router. */
28
+ #undef HAVE_KERNEL_ASSERT
29
+
26
30
/* Define if NETISR scheduling should be used. */
27
31
#undef BSD_NETISRSCHED
28
32
33
37
#include <sys/types.h>
34
38
35
39
/* Define assert macro. */
36
- #define assert (x ) /* nada */
40
+ # ifdef __cplusplus
41
+ extern "C" {
42
+ # endif
43
+ void click_assert_failed (const char * file , int line , const char * problem_text );
44
+ # ifdef __cplusplus
45
+ }
46
+ # endif
47
+
48
+ #ifdef HAVE_KERNEL_ASSERT
49
+ # define assert (x ) ((x) ? (void)0 : click_assert_failed(__FILE__, __LINE__, #x))
50
+ #else
51
+ # define assert (x ) /* nada */
52
+ #endif
37
53
38
54
/* Define likely and unlikely macros. */
39
55
#define likely (x ) __builtin_expect(!!(x), 1)
You can’t perform that action at this time.
0 commit comments