#344 Compilation with pcsc 1.6.6

v1.7.1
closed-fixed
None
5
2014-12-26
2011-07-04
No

When I try to compile rdesktop 1.7.0 with pcsc 1.6.6, I get such messages:

gcc -g -O2 -Wall -I/usr/include -pthread -I/usr/include/PCSC -DPACKAGE_NAME=\"rdesktop\" -DPACKAGE_TARNAME=\"rdesktop\" -DPACKAGE_VERSION=\"1.7.0\" -DPACKAGE_STRING=\"rdesktop\ 1.7.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DL_ENDIAN=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_LOCALE_H=1 -DHAVE_LANGINFO_H=1 -DHAVE_SYSEXITS_H=1 -Dssldir=\"/usr\" -DWITH_SCARD=1 -DEGD_SOCKET=\"/var/run/egd-pool\" -DWITH_RDPSND=1 -DRDPSND_OSS=1 -DHAVE_DIRENT_H=1 -DHAVE_DIRFD=1 -DHAVE_DECL_DIRFD=1 -DHAVE_ICONV_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DHAVE_SYS_VFS_H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_STATFS_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_MOUNT_H=1 -DSTAT_STATVFS=1 -DHAVE_STRUCT_STATVFS_F_NAMEMAX=1 -DHAVE_STRUCT_STATFS_F_NAMELEN=1 -D_FILE_OFFSET_BITS=64 -DHAVE_MNTENT_H=1 -DHAVE_SETMNTENT=1 -DKEYMAP_PATH=\"/usr/local/share/rdesktop/keymaps/\" -o scard.o -c scard.c
In file included from scard.c:42:
scard.h:53: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MYPCSC_SCARD_READERSTATE_A'
scard.h:54: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'MYPCSC_LPSCARD_READERSTATE_A'
scard.c:974: error: expected ')' before 'src'
scard.c:993: error: expected declaration specifiers or '...' before 'MYPCSC_LPSCARD_READERSTATE_A'
scard.c: In function 'copyReaderState_ServerToMyPCSC':
scard.c:997: error: 'MYPCSC_LPSCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:997: error: (Each undeclared identifier is reported only once
scard.c:997: error: for each function it appears in.)
scard.c:997: error: expected ';' before 'dstIter'
scard.c:1000: error: 'dstIter' undeclared (first use in this function)
scard.c:1000: error: 'dst' undeclared (first use in this function)
scard.c: In function 'TS_SCardGetStatusChange':
scard.c:1020: error: 'MYPCSC_LPSCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:1020: error: expected ';' before 'myRsArray'
scard.c:1077: error: 'myRsArray' undeclared (first use in this function)
scard.c:1077: error: 'MYPCSC_SCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:1081: error: too many arguments to function 'copyReaderState_ServerToMyPCSC'
scard.c:1085: warning: implicit declaration of function 'copyReaderState_MyPCSCToServer'
scard.c: In function 'TS_SCardLocateCardsByATR':
scard.c:1156: error: 'MYPCSC_LPSCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:1156: error: expected ';' before 'myRsArray'
scard.c:1168: error: 'SCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:1223: error: 'myRsArray' undeclared (first use in this function)
scard.c:1223: error: 'MYPCSC_SCARD_READERSTATE_A' undeclared (first use in this function)
scard.c:1226: error: too many arguments to function 'copyReaderState_ServerToMyPCSC'
make: *** [scard.o] Error 1

The patch to fix is available in Gentoo repo: http://web.archiveorange.com/archive/v/a7O9XEzTKbR8C8iN9RDw
Direct link to patch: http://mirror.yandex.ru/gentoo-portage/net-misc/rdesktop/files/rdesktop-1.7.0%2bpcsc-lite-1.6.6.patch

I tried, and this patch solved the issue. Why not to include it to rdesktop source?

Discussion

  • Henrik Andersson

    • assigned_to: nobody --> hean01
    • milestone: --> v1.7.1
     
  • Henrik Andersson

    Since pcsc 1.6.2 this patch is needed which will break compile against older version,
    add checks to configure and defines to support old and new version.

     
  • Henrik Andersson

    • status: open --> closed
     
  • Henrik Andersson

    Commit r1643 applies the patch and does not break build of previous versions of
    pcsclite due to SCARD_READERSTATE is an typedef of SCARD_READERSTATE_A.

     
  • Peter Åstrand

    Peter Åstrand - 2011-11-15
    • status: closed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks