components/pcsc-lite/patches/07-readerfactory.patch
author Stephen Gaul Jr <steve.gaul@oracle.com>
Fri, 03 Jun 2016 09:30:42 -0700
changeset 6133 73641150a4de
permissions -rw-r--r--
PSARC/2016/217 Smartcard Reintroduction PSARC/2016/218 USB CCID PSARC/2016/221 PC/SC Lite smartcard middleware 22017759 Add pcsclite v1.8.14 to Userland consolidation 22017751 Add libccid v1.4.20 to Userland consolidation

Upstream fix that will be included in another release of pcsclite.

From 890f7edbd931467fd381739257ac1e1f335eb64a Mon Sep 17 00:00:00 2001
From: Ludovic Rousseau <[email protected]>
Date: Sat, 23 Apr 2016 15:57:46 +0200
Subject: [PATCH] readerfactory: fix compilation warning on SunOS

The code uses alloca() so we #include "alloca.h"

readerfactory.c: In function 'RFAddReader':
readerfactory.c:211:2: warning: implicit declaration of function 'alloca' [-Wimplicit-function-declaration]
  readerName = alloca(strlen(readerNameLong)+1);
  ^
readerfactory.c:211:15: warning: incompatible implicit declaration of built-in function 'alloca'
  readerName = alloca(strlen(readerNameLong)+1);
               ^
---
 src/readerfactory.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/readerfactory.c b/src/readerfactory.c
index 14cd42f..df855ea 100644
--- a/src/readerfactory.c
+++ b/src/readerfactory.c
@@ -49,6 +49,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <errno.h>
 #include <fcntl.h>
 #include <pthread.h>
+#include "alloca.h"
 
 #include "misc.h"
 #include "pcscd.h"
-- 
1.9.1