libnvme: Actually implement nvme_static_assert.
This commit is contained in:
@@ -72,9 +72,13 @@
|
|||||||
/*
|
/*
|
||||||
* Compile time assert check.
|
* Compile time assert check.
|
||||||
*/
|
*/
|
||||||
#ifdef static_assert
|
#if __GNUC__ > 3
|
||||||
|
#ifdef __cplusplus
|
||||||
#define nvme_static_assert(cond, msg) static_assert(cond, msg)
|
#define nvme_static_assert(cond, msg) static_assert(cond, msg)
|
||||||
#else
|
#else
|
||||||
|
#define nvme_static_assert(cond, msg) _Static_assert(cond, msg)
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
#define nvme_static_assert(cond, msg)
|
#define nvme_static_assert(cond, msg)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user