From d9dfc2c69739cfcb86557013a5bd9c3a2cfece25 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Sat, 19 Sep 2015 02:39:33 +0200 Subject: [PATCH] Checks for ssize_t Works around the different typedef of ssize_t in MinGW --- virtualsmartcard/configure.ac | 1 + virtualsmartcard/src/vpcd/vpcd.h | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/virtualsmartcard/configure.ac b/virtualsmartcard/configure.ac index 204d0b3..4d22d84 100644 --- a/virtualsmartcard/configure.ac +++ b/virtualsmartcard/configure.ac @@ -200,6 +200,7 @@ AC_CHECK_HEADERS([arpa/inet.h stdint.h stdlib.h string.h sys/socket.h sys/time.h # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T AC_TYPE_UINT16_T AC_CHECK_DECLS([SO_NOSIGPIPE], [], [], [#include ]) AC_CHECK_DECLS([MSG_NOSIGNAL], [], [], [#include ]) diff --git a/virtualsmartcard/src/vpcd/vpcd.h b/virtualsmartcard/src/vpcd/vpcd.h index fff60bd..b5c3635 100644 --- a/virtualsmartcard/src/vpcd/vpcd.h +++ b/virtualsmartcard/src/vpcd/vpcd.h @@ -19,10 +19,17 @@ #ifndef _VPCD_H_ #define _VPCD_H_ +#if HAVE_CONFIG_H +#include "config.h" +#endif + #ifdef _WIN32 #include #include +#ifndef HAVE_CONFIG_H +/* we assume that ./configure has not defined ssize_t for us */ typedef int ssize_t; +#endif #else #define SOCKET int #include