NetBSD Problem Report #48552

From www@NetBSD.org  Sun Jan 26 14:04:29 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D5268A6485
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 26 Jan 2014 14:04:29 +0000 (UTC)
Message-Id: <20140126140428.775D9A6485@mollari.NetBSD.org>
Date: Sun, 26 Jan 2014 14:04:28 +0000 (UTC)
From: nros@users.sourceforge.net
Reply-To: nros@users.sourceforge.net
To: gnats-bugs@NetBSD.org
Subject: Not only NetBSD and sunos needs <sys/utsname.h> for uname in x11/qt5-qtbase
X-Send-Pr-Version: www-1.0

>Number:         48552
>Category:       pkg
>Synopsis:       Not only NetBSD and sunos needs <sys/utsname.h> for uname in x11/qt5-qtbase
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ryoon
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 26 14:05:00 +0000 2014
>Last-Modified:  Sun Jan 26 15:55:42 +0000 2014
>Originator:     Niclas Rosenvik
>Release:        pkgsrc-2013Q4
>Organization:
>Environment:
>Description:
x11/qt5-qtbase includes a patch that says that <sys/utsname.h> is 
needed on NetBSD and sunos for uname(3). Looking futher down in the 
file qtbase/src/corelib/io/qfileselector.cpp in function 
QStringList QFileSelectorPrivate::platformSelectors()
it can be seen that uname(3) will be run on a lot of pkgsrc platforms
and they will need <sys/utsname.h> to. 
Man pages on different pkgsrc platforms that says that 
<sys/utsname.h> is needed for uname(3):

IRIX
http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=man&fname=/usr/share/catman/p_man/cat2/standard/uname.z&srch=uname

FreeBSD
http://www.freebsd.org/cgi/man.cgi?query=uname&apropos=0&sektion=3&manpath=FreeBSD+10.0-RELEASE&arch=default&format=html

OpenBSD
http://www.openbsd.org/cgi-bin/man.cgi?query=uname&sektion=3

DragonFlyBSD
http://leaf.dragonflybsd.org/cgi/web-man?command=uname&section=3

MIRBSD
http://www.mirbsd.org/htman/i386/man3/uname.htm

OSF/1
http://modman.unixdev.net/?manpath=OSF1-V5.1-alpha&page=uname&sektion=2&apropos=

>How-To-Repeat:
I guess a build failure will occur in qt5-qtbase on a non qnx, non mac, non linux platform, that is not NetBSD or sunos.
>Fix:
This patch for x11/qt5-qtbase make the preprocessor include <sys/utsname.h> in qfileselector.cpp when it makes qfileselector.cpp use uname.
It has been tested and includes sys/utsname.h successfully on NetBSD and should do this for all non-qnx, non-android, non-ios, non-linux, non-mac, non-blackberry 
unix platforms.

--- patch-qtbase_src_corelib_io_qfileselector.cpp begins here ---
$NetBSD$

* include sys/utsname.h for uname(3)

--- qtbase/src/corelib/io/qfileselector.cpp.orig	2013-12-08 17:09:53.000000000 +0000
+++ qtbase/src/corelib/io/qfileselector.cpp
@@ -51,6 +51,21 @@
 #include <QtCore/QLocale>
 #include <QtCore/QDebug>

+#if defined(Q_OS_WIN)
+#if defined(Q_OS_WINCE)
+#endif
+#elif defined(Q_OS_UNIX)
+#  if defined(Q_OS_LINUX_ANDROID)
+#  elif defined(Q_OS_BLACKBERRY)
+#  elif defined(Q_OS_QNX)
+#  elif defined(Q_OS_IOS)
+#  elif defined(Q_OS_LINUX)
+#  elif defined(Q_OS_MAC)
+#  else
+#include <sys/utsname.h>
+#endif
+#endif
+
 QT_BEGIN_NAMESPACE

 //Environment variable to allow tooling full control of file selectors
--- patch-qtbase_src_corelib_io_qfileselector.cpp ends here ---

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Sun, 26 Jan 2014 15:55:42 +0000
Responsible-Changed-Why:
Over to maintainer.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.