NetBSD Problem Report #48552

From  Sun Jan 26 14:04:29 2014
Return-Path: <>
Received: from ( [])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "", Issuer "Postmaster" (not verified))
	by (Postfix) with ESMTPS id D5268A6485
	for <>; Sun, 26 Jan 2014 14:04:29 +0000 (UTC)
Message-Id: <>
Date: Sun, 26 Jan 2014 14:04:28 +0000 (UTC)
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
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):







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.
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 ---

* 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)
+#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>

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



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


NetBSD Home
NetBSD PR Database Search

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