From 782b72e29f5fe600d7a73362a0cb732924562373 Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau Date: Wed, 16 May 2012 13:34:21 +0000 Subject: [PATCH] Correctly handle PCSC header files on Mac OS X Fixes Issue #195 --- libnfc/drivers/acr122_pcsc.c | 6 +++++- m4/libnfc_check_pcsc.m4 | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libnfc/drivers/acr122_pcsc.c b/libnfc/drivers/acr122_pcsc.c index 726a853..1729621 100644 --- a/libnfc/drivers/acr122_pcsc.c +++ b/libnfc/drivers/acr122_pcsc.c @@ -41,14 +41,18 @@ #include "nfc-internal.h" // Bus +#ifdef __APPLE__ +#include +#include +#else #include +#endif #define ACR122_PCSC_DRIVER_NAME "acr122_pcsc" #if defined (_WIN32) # define IOCTL_CCID_ESCAPE_SCARD_CTL_CODE SCARD_CTL_CODE(3500) #elif defined(__APPLE__) -# include # define IOCTL_CCID_ESCAPE_SCARD_CTL_CODE (((0x31) << 16) | ((3500) << 2)) #elif defined (__FreeBSD__) || defined (__OpenBSD__) # define IOCTL_CCID_ESCAPE_SCARD_CTL_CODE (((0x31) << 16) | ((3500) << 2)) diff --git a/m4/libnfc_check_pcsc.m4 b/m4/libnfc_check_pcsc.m4 index abf76a4..453fcc9 100644 --- a/m4/libnfc_check_pcsc.m4 +++ b/m4/libnfc_check_pcsc.m4 @@ -17,7 +17,7 @@ AC_DEFUN([LIBNFC_CHECK_PCSC], if test x"$HAVE_PCSC" = "x0" ; then AC_MSG_CHECKING(for PC/SC) libpcsclite_LIBS="-Wl,-framework,PCSC" - libpcsclite_CFLAGS="-I/System/Library/Frameworks/PCSC.framework/Headers" + libpcsclite_CFLAGS="" HAVE_PCSC=1 AC_MSG_RESULT(yes: darwin PC/SC framework) fi