LudovicRousseau / pcsc-tools

Some tools to be used with smart cards and PC/SC
https://pcsc-tools.apdu.fr/
GNU General Public License v2.0
185 stars 63 forks source link

compile from git fails #72

Closed nickersk closed 1 year ago

nickersk commented 1 year ago

| ../git/pcsc_scan.c: In function 'main': | ../git/pcsc_scan.c:496:45: error: 'ATR_PARSER' undeclared (first use in this function) | 496 | char atr_command[sizeof(atr)+sizeof(ATR_PARSER)+2+1]; | | ^~~~~~ | ../git/pcsc_scan.c:496:45: note: each undeclared identifier is reported only once for each function it appears in | ../git/pcsc_scan.c:878:72: error: expected ')' before string constant | 878 | sprintf(atr_command, ATR_PARSER " '%s'", atr); | | ~ ^~~~ | | )

nickersk commented 1 year ago

possible fix: --- a/pcsc_scan.c +++ b/pcsc_scan.c @@ -51,6 +51,10 @@ typedef enum

define TIMEOUT 36001000 / 1 hour timeout */

+#ifndef ATR_PARSER +/ command used to parse (on screen) the ATR / +#define ATR_PARSER "ATR_analysis" +#endif

ifndef SCARD_E_NO_READERS_AVAILABLE

define SCARD_E_NO_READERS_AVAILABLE 0x8010002E

LudovicRousseau commented 1 year ago

What OS are you using?

nickersk commented 1 year ago

https://www.yoctoproject.org/ on Ubuntu 22.04 x64

LudovicRousseau commented 1 year ago

Do (or redo):

./bootstrap
./configure
make
nickersk commented 1 year ago

thank you, works