Macro 'offsetof' has been defined in 'stddef.h'. So remove the redefined one in 'wd_ecc_drv.h'.
Signed-off-by: Yang Shen shenyang39@huawei.com --- include/drv/wd_ecc_drv.h | 2 -- wd_ecc.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/include/drv/wd_ecc_drv.h b/include/drv/wd_ecc_drv.h index ef98606..857da20 100644 --- a/include/drv/wd_ecc_drv.h +++ b/include/drv/wd_ecc_drv.h @@ -45,8 +45,6 @@ extern "C" { #define WD_X448 0x2 #define WD_SM2P256 0x3
-#define offsetof(t, m) ((size_t)(uintptr_t)&((t *)0)->m) - /* ECC message format */ struct wd_ecc_msg { struct wd_ecc_req req; diff --git a/wd_ecc.c b/wd_ecc.c index 1ff6ed3..4cf287b 100644 --- a/wd_ecc.c +++ b/wd_ecc.c @@ -8,6 +8,7 @@ #include <errno.h> #include <pthread.h> #include <stdlib.h> +#include <stddef.h> #include <string.h> #include <time.h> #include <dlfcn.h>