[Pkg-telepathy-commits] [libnice] 205/265: build: Check for [s]size_t before redefining them on MinGW

Simon McVittie smcv at debian.org
Wed May 14 12:05:08 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository libnice.

commit fac5f3648041fd5225d5e1623625d7f6a9df615b
Author: Philip Withnall <philip.withnall at collabora.co.uk>
Date:   Thu Apr 3 12:29:04 2014 +0100

    build: Check for [s]size_t before redefining them on MinGW
    
    MinGW defines size_t and ssize_t for us, so we should not
    unconditionally redefine them in stun/win32_common.h. Add an
    AC_CHECK_TYPES configure check to avoid this.
---
 configure.ac        | 1 +
 stun/win32_common.h | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 745b40c..9b83742 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,6 +92,7 @@ AC_CHECK_HEADERS([arpa/inet.h net/in.h])
 AC_CHECK_HEADERS([ifaddrs.h], \
 		      [AC_DEFINE(HAVE_GETIFADDRS, [1], \
 		       [Whether getifaddrs() is available on the system])])
+AC_CHECK_TYPES([size_t, ssize_t])
 
 # Also put matching version in LIBNICE_CFLAGS
 GLIB_REQ=2.30
diff --git a/stun/win32_common.h b/stun/win32_common.h
index 5f8e593..61fa981 100644
--- a/stun/win32_common.h
+++ b/stun/win32_common.h
@@ -57,6 +57,7 @@
 #ifndef _WIN32_COMMON_H
 #define _WIN32_COMMON_H
 
+#include "config.h"
 #include <sys/types.h>
 
 /* 7.18.1.1  Exact-width integer types */
@@ -69,8 +70,10 @@ typedef unsigned   uint32_t;
 typedef long long  int64_t;
 typedef unsigned long long   uint64_t;
 
-#ifndef _SSIZE_T_
+#ifndef HAVE_SIZE_T
 typedef unsigned int size_t;
+#endif
+#ifndef HAVE_SSIZE_T
 typedef unsigned long ssize_t;
 #endif
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git



More information about the Pkg-telepathy-commits mailing list