libwd/0130-uadk-ecc-remove-a-redefined-macro.patch
Yang Shen ec2f993b84 libwd: backport for uadk from 2.3.31 to 2.3.36
Update some patch for uadk from mainline.
To get more information, please visit the homepage:
https://github.comp/Linaro/uadk

Signed-off-by: Yang Shen <shenyang39@huawei.com>
2022-07-28 15:32:23 +08:00

43 lines
1.1 KiB
Diff

From e54fc1d2840a7bd9b884a84d5fd4de385f23e03f Mon Sep 17 00:00:00 2001
From: Yang Shen <shenyang39@huawei.com>
Date: Fri, 1 Jul 2022 11:01:06 +0800
Subject: [PATCH 143/183] uadk/ecc - remove a redefined macro
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>
--
2.27.0