Package: neko
Severity: important
Tags: patch

Hi,

currently your package FTBFS on GNU/kFreeBSD with the following error:
> cc -Wall -fPIC -fomit-frame-pointer -I vm -DCOMPACT_TABLE -g -O3 -pthread -o 
> libs/std/sys.o -c libs/std/sys.c
> libs/std/sys.c:171:2: error: #error Unknow system string
> libs/std/sys.c: In function 'sys_string':
> libs/std/sys.c:173: warning: no return statement in function returning
> non-void
> make[1]: *** [libs/std/sys.o] Error 1
> make[1]: Leaving directory `/home/kibi/x/neko-1.5.3'
> make: *** [build-stamp] Error 2

(Full build log available upon request.)

Although the buildd was lacking some B-D during the last build test,
hull build logs are available at
<http://experimental.ftbfs.de/build.php?arch=kfreebsd-i386&pkg=neko>.

Please find attached a tiny patch to add support for GNU/kFreeBSD.

Cheers,

-- 
Cyril Brulebois
--- neko-1.5.3/libs/std/socket.c	2007-03-09 11:59:27.544454000 +0100
+++ neko-1.5.3/libs/std/socket.c	2007-03-09 12:04:07.000000000 +0100
@@ -45,7 +45,7 @@
 #	define INVALID_SOCKET (-1)
 #endif
 
-#ifndef NEKO_LINUX
+#if !defined(NEKO_LINUX) && !defined(NEKO_GNUKFREEBSD)
 #	define MSG_NOSIGNAL 0
 #endif
 
@@ -397,7 +397,7 @@
 			tt = &tval;
 		}
 		if( select((int)(n+1),ra,wa,ea,tt) == SOCKET_ERROR ) {
-#			if defined(NEKO_LINUX) || defined(NEKO_MAC)
+#			if defined(NEKO_LINUX) || defined(NEKO_MAC) || defined(NEKO_GNUKFREEBSD)
 			if( errno == EINTR )
 				continue;
 #			endif
--- neko-1.5.3/libs/std/sys.c	2007-03-09 11:57:56.940596000 +0100
+++ neko-1.5.3/libs/std/sys.c	2007-03-09 12:03:25.000000000 +0100
@@ -167,6 +167,8 @@
 	return alloc_string("BSD");
 #elif defined(NEKO_MAC)
 	return alloc_string("Mac");
+#elif defined(NEKO_GNUKFREEBSD)
+	return alloc_string("GNU/kFreeBSD");
 #else
 #error Unknow system string
 #endif
--- neko-1.5.3/vm/jit_x86.c	2007-03-09 11:59:27.315504000 +0100
+++ neko-1.5.3/vm/jit_x86.c	2007-03-09 11:59:57.000000000 +0100
@@ -23,7 +23,7 @@
 #include <math.h>
 #include <stdio.h>
 
-#ifdef NEKO_LINUX
+#if defined(NEKO_LINUX) || defined(NEKO_GNUKFREEBSD)
 #	include <sys/types.h>
 #	include <sys/mman.h>
 #	define USE_MMAP
--- neko-1.5.3/vm/main.c	2007-03-09 11:59:27.389858000 +0100
+++ neko-1.5.3/vm/main.c	2007-03-09 12:01:38.000000000 +0100
@@ -27,7 +27,7 @@
 #	include <sys/param.h>
 #	include <mach-o/dyld.h>
 #endif
-#ifdef NEKO_LINUX
+#if defined(NEKO_LINUX) || defined(NEKO_GNUKFREEBSD)
 #	include <signal.h>
 #endif
 
@@ -177,7 +177,7 @@
 #	define _CrtSetDbgFlag(x)
 #endif
 
-#ifdef NEKO_LINUX
+#if defined(NEKO_LINUX) || defined(NEKO_GNUKFREEBSD)
 static void handle_signal( int signal ) {
 	val_throw(alloc_string("Segmentation fault"));
 }
@@ -191,7 +191,7 @@
 	neko_global_init(&vm);
 	vm = neko_vm_alloc(NULL);
 	neko_vm_select(vm);
-#	ifdef NEKO_LINUX
+#	if defined(NEKO_LINUX) || defined(NEKO_GNUKFREEBSD)
 	struct sigaction act;
 	act.sa_sigaction = NULL;
 	act.sa_handler = handle_signal;
--- neko-1.5.3/vm/neko.h	2007-03-09 11:59:27.464777000 +0100
+++ neko-1.5.3/vm/neko.h	2007-03-09 12:02:39.000000000 +0100
@@ -30,6 +30,10 @@
 #	define NEKO_LINUX
 #endif
 
+#if defined(__FreeBSD_kernel__)
+#	define NEKO_GNUKFREEBSD
+#endif
+
 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
 #	define NEKO_BSD
 #endif

Reply via email to