From ca6b768a679953715cd0a5a994ebd084fdc53d47 Mon Sep 17 00:00:00 2001 From: Romain Tartiere Date: Tue, 10 Aug 2010 21:45:30 +0000 Subject: [PATCH] Fix build on Microsoft Windows. --- libnfc/chips/pn53x.c | 3 ++- windows/win32/nfc.def | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/libnfc/chips/pn53x.c b/libnfc/chips/pn53x.c index c53e10d..c5d3c1b 100644 --- a/libnfc/chips/pn53x.c +++ b/libnfc/chips/pn53x.c @@ -418,8 +418,9 @@ const char * pn53x_strerror (const nfc_device_t *pnd) { const char *pcRes = "Unknown error"; + size_t i; - for (size_t i=0; i < (sizeof (sErrorMessages) / sizeof (struct sErrorMessage)); i++) { + for (i=0; i < (sizeof (sErrorMessages) / sizeof (struct sErrorMessage)); i++) { if (sErrorMessages[i].iErrorCode == pnd->iErrorCode) { pcRes = sErrorMessages[i].pcErrorMsg; break; diff --git a/windows/win32/nfc.def b/windows/win32/nfc.def index ba83eaf..9627a18 100644 --- a/windows/win32/nfc.def +++ b/windows/win32/nfc.def @@ -26,3 +26,6 @@ EXPORTS iso14443a_crc append_iso14443a_crc nfc_version + nfc_perror + nfc_strerror + nfc_strerror_r