acsccid: fix compilation with GCC15

Upstream backport.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2025-10-09 11:31:10 -07:00
committed by Tianling Shen
parent dbe5e04779
commit d77623843e
2 changed files with 56 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=acsccid
PKG_VERSION:=1.1.8
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/acshk/acsccid/tar.gz/v$(PKG_VERSION)?

View File

@@ -0,0 +1,55 @@
From b2c073a8f373e40c475aa130e8a9ca0814c080dd Mon Sep 17 00:00:00 2001
From: Godfrey Chung <godfrey.chung@acs.com.hk>
Date: Mon, 7 Sep 2020 14:57:28 +0800
Subject: [PATCH] towitoko: do not use "bool" type.
Merge from ccid 1.4.33.
---
src/towitoko/atr.h | 2 +-
src/towitoko/defines.h | 4 ----
src/towitoko/pps.c | 4 ++--
3 files changed, 3 insertions(+), 7 deletions(-)
--- a/src/towitoko/atr.h
+++ b/src/towitoko/atr.h
@@ -82,7 +82,7 @@ typedef struct
struct
{
BYTE value;
- bool present;
+ int present;
}
ib[ATR_MAX_PROTOCOLS][ATR_MAX_IB], TCK;
unsigned pn;
--- a/src/towitoko/defines.h
+++ b/src/towitoko/defines.h
@@ -48,9 +48,5 @@
#include <wintypes.h>
-#ifndef __cplusplus
-typedef int bool;
-#endif
-
#endif /* DEFINES_H */
--- a/src/towitoko/pps.c
+++ b/src/towitoko/pps.c
@@ -41,7 +41,7 @@
* Not exported funtions declaration
*/
-static bool PPS_Match (BYTE * request, unsigned len_request, BYTE * reply, unsigned len_reply);
+static int PPS_Match (BYTE * request, unsigned len_request, BYTE * reply, unsigned len_reply);
static unsigned PPS_GetLength (BYTE * block);
@@ -91,7 +91,7 @@ PPS_Exchange (int lun, BYTE * params, un
return ret;
}
-static bool
+static int
PPS_Match (BYTE * request, unsigned len_request, BYTE * confirm, unsigned len_confirm)
{
/* See if the reply differs from request */