[Pcsclite-git-commit] [PCSC] 01/01: Fix compilation on FreeBSD: alloca.h does not exist
Ludovic Rousseau
rousseau at moszumanska.debian.org
Tue May 31 18:20:16 UTC 2016
This is an automated email from the git hooks/post-receive script.
rousseau pushed a commit to branch master
in repository PCSC.
commit ab23479d27d32d0b62c609997e14c38fef6e5928
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date: Tue May 31 20:17:10 2016 +0200
Fix compilation on FreeBSD: alloca.h does not exist
On FreeBSD alloca.h does not exist and alloca(3) is declared in
stdlib.h (already included by src/readerfactory.c).
Thanks to Tilman Keskinoz for the bug report.
---
configure.ac | 2 +-
src/readerfactory.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6704803..5fe6838 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,7 +94,7 @@ LT_INIT
# Checks for header files
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([getopt.h sys/filio.h syslog.h dl.h fcntl.h ])
+AC_CHECK_HEADERS([getopt.h sys/filio.h syslog.h dl.h fcntl.h alloca.h])
# Checks for typedefs, structures, and compiler characteristics
AC_C_CONST
diff --git a/src/readerfactory.c b/src/readerfactory.c
index 026ceea..4f97892 100644
--- a/src/readerfactory.c
+++ b/src/readerfactory.c
@@ -49,7 +49,9 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
-#include "alloca.h"
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
#include "misc.h"
#include "pcscd.h"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git
More information about the Pcsclite-cvs-commit
mailing list