diff options
Diffstat (limited to 'firmware/2lib/include/2common.h')
-rw-r--r-- | firmware/2lib/include/2common.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/2lib/include/2common.h b/firmware/2lib/include/2common.h index b08790a5..fa64c0f3 100644 --- a/firmware/2lib/include/2common.h +++ b/firmware/2lib/include/2common.h @@ -47,6 +47,18 @@ struct vb2_public_key; #endif /* + * Define test_mockable and for mocking functions when compiled for Chrome OS + * environment (that is, not for firmware). + */ +#ifndef test_mockable +#ifdef CHROMEOS_ENVIRONMENT +#define test_mockable __attribute__((weak)) +#else +#define test_mockable +#endif +#endif + +/* * Alignment for work buffer pointers/allocations should be useful for any * data type. When declaring workbuf buffers on the stack, the caller should * use explicit alignment to avoid run-time errors. For example: |