mirror of
https://github.com/outbackdingo/wwan-packages.git
synced 2026-01-27 10:20:52 +00:00
quectel-cm: fix build with gcc14
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=quectel-cm
|
||||
PKG_VERSION:=1.6.5
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
29
utils/quectel-cm/patches/010-gcc14.patch
Normal file
29
utils/quectel-cm/patches/010-gcc14.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
--- a/quectel-qrtr-proxy.c
|
||||
+++ b/quectel-qrtr-proxy.c
|
||||
@@ -547,7 +547,7 @@ static int recv_qmi_from_client(PQCQMIMS
|
||||
}
|
||||
else if (le16toh(pQMI->CTLMsg.QMICTLMsgHdr.QMICTLType) == QMICTL_GET_CLIENT_ID_REQ) {
|
||||
uint8_t QMIType = pQMI->CTLMsg.GetClientIdReq.QMIType;
|
||||
- PQCQMIMSG pRsp = (PQCQMIMSG)malloc(256);
|
||||
+ PQCQMIMSG pRsp = (PQCQMIMSG)malloc(sizeof(*pRsp));
|
||||
|
||||
if (pRsp) {
|
||||
uint8_t ClientId = 0;
|
||||
@@ -581,7 +581,7 @@ static int recv_qmi_from_client(PQCQMIMS
|
||||
}
|
||||
}
|
||||
else if (le16toh(pQMI->CTLMsg.QMICTLMsgHdr.QMICTLType) == QMICTL_RELEASE_CLIENT_ID_REQ) {
|
||||
- PQCQMIMSG pRsp = (PQCQMIMSG)malloc(256);
|
||||
+ PQCQMIMSG pRsp = (PQCQMIMSG)malloc(sizeof(*pRsp));
|
||||
release_qrtr_client_id(qrtr_con, pQMI->CTLMsg.ReleaseClientIdReq.QMIType, pQMI->CTLMsg.ReleaseClientIdReq.ClientId);
|
||||
|
||||
if (pRsp) {
|
||||
@@ -610,7 +610,7 @@ static int recv_qmi_from_client(PQCQMIMS
|
||||
}
|
||||
}
|
||||
else if (le16toh(pQMI->CTLMsg.QMICTLMsgHdr.QMICTLType) == QMICTL_GET_VERSION_REQ) {
|
||||
- PQCQMIMSG pRsp = (PQCQMIMSG)malloc(256);
|
||||
+ PQCQMIMSG pRsp = (PQCQMIMSG)malloc(sizeof(*pRsp));
|
||||
|
||||
if (pRsp) {
|
||||
pRsp->QMIHdr.IFType = USB_CTL_MSG_TYPE_QMI;
|
||||
Reference in New Issue
Block a user