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

Re: Bug#815242: passenger: FTBFS on kfreebsd: src/cxx_supportlib/BackgroundEventLoop.cpp:198:6: error: #error "This platform is not supported. Please add corresponding I/O polling code."



tags 815242 + patch
user debian-bsd@lists.debian.org
usertags 815242 + kfreebsd
thanks

Hi,

Andreas Beckmann wrote:
> src/cxx_supportlib/BackgroundEventLoop.cpp:198:6: error: #error "This platform is not supported. Please add corresponding I/O polling code."
>      #error "This platform is not supported. Please add corresponding I/O polling code."

That problem is very easily fixed with the attached patch.
This patches fixes one other issue in psg_sysqueue.h also.

There is one remaining issue causing FTBFS on kfreebsd but I will open a
separate bug report for it because it relates to a bundled library copy.

Thank you,
Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org
Subject: add support for GNU/kFreeBSD
From: Steven Chamberlain <steven@pyro.eu.org>
Date: Sun, 21 Feb 2016 20:19:28 +0000

Use kqueue on any platform having the FreeBSD kernel;  not just
FreeBSD itself.

Also define __SYS_QUEUE_H_ as an additional guard macro in
psg_sysqueue.h, which is something used by GNU/kFreeBSD only.

--- a/src/cxx_supportlib/BackgroundEventLoop.cpp
+++ b/src/cxx_supportlib/BackgroundEventLoop.cpp
@@ -43,7 +43,7 @@
 #ifndef HAVE_KQUEUE
 	#if defined(__APPLE__) || \
 		defined(__DragonFly__) || \
-		defined(__FreeBSD__) || \
+		defined(__FreeBSD_kernel__) || \
 		defined(__OpenBSD__) || \
 		defined(__NetBSD__)
 		#define HAVE_KQUEUE 1
--- a/src/ruby_native_extension/passenger_native_support.c
+++ b/src/ruby_native_extension/passenger_native_support.c
@@ -62,7 +62,7 @@
 #ifdef HAVE_ALLOCA_H
 	#include <alloca.h>
 #endif
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__)
 	#define HAVE_KQUEUE
 	#include <sys/event.h>
 	#include <sys/time.h>
--- a/src/cxx_supportlib/vendor-modified/psg_sysqueue.h
+++ b/src/cxx_supportlib/vendor-modified/psg_sysqueue.h
@@ -35,6 +35,7 @@
 #ifndef _PSG_SYSQUEUE_H_
 #define _PSG_SYSQUEUE_H_
 #define _SYS_QUEUE_H_ /* override system sys/queue.h */
+#define __SYS_QUEUE_H_ /* override GNU/kFreeBSD kglue/sys/queue.h */
 
 #include <stddef.h>
 

Attachment: signature.asc
Description: Digital signature


Reply to: