Compile fix: for OpenBSD: <sys/select.h> not included by <sys/types.h>

On OpenBSD, <sys/select.h> isn't included in <sys/types.h>, so that
leads to compile errors on files that include qcore_unix_p.h:

qcore_unix_p.h:335:69: error: 'fd_set' has not been declared

Just move the whole select include section from qcore_unix.cpp, no
functional changes.

The patch is adapted from OpenBSD ports maintainer Vadim Zhukov
<persgray@gmail.com> patch for qt ports.

Change-Id: I35ba693440b1c1644bcfcdb69823e2b37870ad97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Ralf Nolden 2016-05-24 22:02:02 +02:00
parent 5c16b73243
commit e0ab94b525
2 changed files with 10 additions and 10 deletions

View File

@ -34,16 +34,6 @@
#include "qcore_unix_p.h" #include "qcore_unix_p.h"
#include "qelapsedtimer.h" #include "qelapsedtimer.h"
#ifdef Q_OS_NACL
#elif !defined (Q_OS_VXWORKS)
# if !defined(Q_OS_HPUX) || defined(__ia64)
# include <sys/select.h>
# endif
# include <sys/time.h>
#else
# include <selectLib.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#ifdef Q_OS_MAC #ifdef Q_OS_MAC

View File

@ -58,6 +58,16 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#ifdef Q_OS_NACL
#elif !defined (Q_OS_VXWORKS)
# if !defined(Q_OS_HPUX) || defined(__ia64)
# include <sys/select.h>
# endif
# include <sys/time.h>
#else
# include <selectLib.h>
#endif
#include <sys/wait.h> #include <sys/wait.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>