Make sys includes POSIX-compliant
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 28 Nov 2013 00:45:43 +0000 (01:45 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 28 Nov 2013 00:50:37 +0000 (01:50 +0100)
We're using <sys/resources.h> in quassel.cpp for the backtrace generation
stuff. Documentation for that header indicates that <sys/time.h> shall also
be included (even though it doesn't seem to be needed for our usage).
Additionally, compiling started to fail in recent FreeBSD versions, because
we lacked the <sys/types.h> include, which seems to be mandated by POSIX
(but not on Linux, although it won't hurt to have it).

tl;dr: This should make Quassel compile on recent versions of FreeBSD again.

src/common/quassel.cpp

index e081775..058b4b9 100644 (file)
@@ -23,6 +23,8 @@
 #include <iostream>
 #include <signal.h>
 #if !defined Q_OS_WIN32 && !defined Q_OS_MAC
+#  include <sys/types.h>
+#  include <sys/time.h>
 #  include <sys/resource.h>
 #endif