summaryrefslogtreecommitdiffstats
path: root/config.tests/unix/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'config.tests/unix/ipv6')
-rw-r--r--config.tests/unix/ipv6/ipv6.pro3
-rw-r--r--config.tests/unix/ipv6/ipv6test.cpp69
2 files changed, 72 insertions, 0 deletions
diff --git a/config.tests/unix/ipv6/ipv6.pro b/config.tests/unix/ipv6/ipv6.pro
new file mode 100644
index 0000000000..c51e61bc8b
--- /dev/null
+++ b/config.tests/unix/ipv6/ipv6.pro
@@ -0,0 +1,3 @@
+SOURCES = ipv6test.cpp
+CONFIG -= qt dylib
+mac:CONFIG -= app_bundle
diff --git a/config.tests/unix/ipv6/ipv6test.cpp b/config.tests/unix/ipv6/ipv6test.cpp
new file mode 100644
index 0000000000..d33c53427d
--- /dev/null
+++ b/config.tests/unix/ipv6/ipv6test.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the config.tests of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/* Sample program for configure to test IPv6 support on target
+platforms. We check for the required IPv6 data structures. */
+
+#if defined(__hpux)
+#define _HPUX_SOURCE
+#endif
+
+#ifdef __MINGW32__
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#endif
+
+int main()
+{
+ sockaddr_in6 tmp;
+ sockaddr_storage tmp2;
+ (void)tmp.sin6_addr.s6_addr;
+ (void)tmp.sin6_port;
+ (void)tmp.sin6_family;
+ (void)tmp.sin6_scope_id;
+ (void)tmp2;
+
+ return 0;
+}