[ChangeLog][Platform Specific Changes][BSD] Fixed compile errors on
DragonFly BSD and potentially FreeBSD.
Task-number: QTBUG-35867
Change-Id: Iea90b93672c34f8a4b56e9afc4dbfb82cc993548
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
# define alloca _alloca
# endif
#else
+#if !defined(__FreeBSD__) && !defined(__DragonFly__)
# include <alloca.h>
#endif
+#endif
#endif
#if USE(PTHREADS)
# include <pthread.h>
# include <sys/resource.h>
+#if HAVE(PTHREAD_NP_H)
+# include <pthread_np.h>
+#endif
#endif
QT_BEGIN_NAMESPACE
# else
void* stackBottom = 0;
pthread_attr_t attr;
+#if HAVE(PTHREAD_NP_H) && OS(FREEBSD)
+ if (pthread_attr_get_np(pthread_self(), &attr) == 0) {
+#else
if (pthread_getattr_np(pthread_self(), &attr) == 0) {
+#endif
size_t stackSize = 0;
pthread_attr_getstack(&attr, &stackBottom, &stackSize);
pthread_attr_destroy(&attr);
#include <sys/storage.h> // __tls()
#endif
+#if USE(PTHREADS) && HAVE(PTHREAD_NP_H)
+#include <pthread_np.h>
+#endif
+
QT_BEGIN_NAMESPACE
using namespace QV4;
# else
void* stackBottom = 0;
pthread_attr_t attr;
+#if HAVE(PTHREAD_NP_H) && OS(FREEBSD)
+ if (pthread_attr_get_np(pthread_self(), &attr) == 0) {
+#else
if (pthread_getattr_np(pthread_self(), &attr) == 0) {
+#endif
size_t stackSize = 0;
pthread_attr_getstack(&attr, &stackBottom, &stackSize);
pthread_attr_destroy(&attr);