7195480: javax.smartcardio does not detect cards on Mac OS X
authorigerasim
Tue, 20 May 2014 10:11:23 +0400
changeset 24502 7e0b521daf48
parent 24501 767c30e88a61
child 24503 fe24408289d7
7195480: javax.smartcardio does not detect cards on Mac OS X Reviewed-by: valeriep
jdk/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h
--- a/jdk/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h	Mon May 19 14:28:08 2014 +0100
+++ b/jdk/src/solaris/native/sun/security/smartcardio/MUSCLE/pcsclite.h	Tue May 20 10:11:23 2014 +0400
@@ -62,6 +62,8 @@
 
 #define MAX_ATR_SIZE                    33      /* Maximum ATR size */
 
+#ifndef __APPLE__
+
 typedef struct
 {
         const char *szReader;
@@ -73,6 +75,23 @@
 }
 SCARD_READERSTATE_A;
 
+#else // __APPLE__
+
+#pragma pack(1)
+typedef struct
+{
+        const char *szReader;
+        void *pvUserData;
+        uint32_t dwCurrentState;
+        uint32_t dwEventState;
+        uint32_t cbAtr;
+        unsigned char rgbAtr[MAX_ATR_SIZE];
+}
+SCARD_READERSTATE_A;
+#pragma pack()
+
+#endif // __APPLE__
+
 typedef SCARD_READERSTATE_A SCARD_READERSTATE, *PSCARD_READERSTATE_A,
         *LPSCARD_READERSTATE_A;