pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48552: Not only NetBSD and sunos needs <sys/utsname.h> for uname in x11/qt5-qtbase



>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:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 26 14:05:00 +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 ---



Home | Main Index | Thread Index | Old Index