1 From 0bf90de93b9fe21df32319e27b2507154fa8a21d Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3 Date: Fri, 15 Apr 2016 00:37:26 +0200
4 Subject: [PATCH] Fix for platform socklen_t on other C libraries than glibc
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 This helps to make sure that QT_SOCKLEN_T is defined to be 'int'
10 only when its glibc < 2 and not also for the libraries which may define
11 it as per standards but are not glibc, e.g. musl.
13 This patch is adapted from Qt5 [1].
16 https://github.com/qtproject/qtbase/commit/813f468a14fb84af43c1f8fc0a1430277358eba2
18 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
20 mkspecs/linux-g++/qplatformdefs.h | 6 +++---
21 1 file changed, 3 insertions(+), 3 deletions(-)
23 diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
24 index de751dd..d4146ed 100644
25 --- a/mkspecs/linux-g++/qplatformdefs.h
26 +++ b/mkspecs/linux-g++/qplatformdefs.h
31 -#if defined(__GLIBC__) && (__GLIBC__ >= 2)
32 -#define QT_SOCKLEN_T socklen_t
34 +#if defined(__GLIBC__) && (__GLIBC__ < 2)
35 #define QT_SOCKLEN_T int
37 +#define QT_SOCKLEN_T socklen_t
40 #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500)