Hi folks,

Here is a patch to build ion 3.0.0~dfsg1-1.  Unfortunately it has a lot of use 
of MAXHOSTNAMELEN and
MAXPATHLEN so I hardcoded those values for now. (They did the same for 
MAXHOSTNAMELEN for mingw).

Should we attempt to fix those issues more correctly?

Thanks,

Barry deFreese (bddebian for those who don't remember me :) )

Index: ion-3.0.0~dfsg1/ici/include/platform.h
===================================================================
--- ion-3.0.0~dfsg1.orig/ici/include/platform.h 2012-05-31 11:46:40.000000000 
+0000
+++ ion-3.0.0~dfsg1/ici/include/platform.h      2012-05-31 11:47:14.000000000 
+0000
@@ -361,6 +361,18 @@

 #endif                         /****   End of #ifdef freebsd        ****/

+#ifdef gnu                     /****   GNU                          ****/
+
+#include <malloc.h>            /****   For memalign                 ****/
+#include <sys/param.h>
+#include <pthread.h>
+
+#define MAXHOSTNAMELEN 256     /**** GNU doesn't define MAXHOSTNAMELEN ****/
+#define MAXPATHLEN 1024                /**** Another ugly hack, neither should 
be used ****/
+#define        _MULTITHREADED
+
+#endif                         /****   End of #ifdef GNU            ****/
+
 #ifdef darwin                  /****   Mac OS X                     ****/

 #include <sys/malloc.h>
Index: ion-3.0.0~dfsg1/configure.ac
===================================================================
--- ion-3.0.0~dfsg1.orig/configure.ac   2012-05-31 11:46:40.000000000 +0000
+++ ion-3.0.0~dfsg1/configure.ac        2012-05-31 11:47:14.000000000 +0000
@@ -214,6 +214,11 @@
                fi
                ;;
        vxworks*) AC_DEFINE([vxworks],[1],[Build VXWorks specific platform 
code.]) ;;
+       gnu*)
+               AC_DEFINE([gnu],[1],[Build 32-bit GNU specific platform code.])
+               AC_SUBST([ION_CFLAGS]," -Dgnu -fno-strict-aliasing")
+               echo "Build 32-bit GNU specific platform code."
+               ;;
 esac

 AC_C_CONST
Index: ion-3.0.0~dfsg1/ici/library/platform.c
===================================================================
--- ion-3.0.0~dfsg1.orig/ici/library/platform.c 2012-05-31 11:46:40.000000000 
+0000
+++ ion-3.0.0~dfsg1/ici/library/platform.c      2012-05-31 11:47:14.000000000 
+0000
@@ -476,7 +476,7 @@

 #endif                         /*      end #ifdef _MULTITHREADED       */

-#if (!defined (linux) && !defined (freebsd) && !defined (darwin) && !defined 
(RTEMS)) && !defined (mingw)
+#if (!defined (linux) && !defined (freebsd) && !defined (darwin) && !defined 
(RTEMS) && !defined(gnu)) && !defined (mingw)
 /*     These things are defined elsewhere for Linux-like op systems.   */

 extern int     sys_nerr;
@@ -966,7 +966,7 @@

 #endif                 /*      end of #if defined (mingw)              */

-#if (defined (linux) || defined (freebsd) || defined (darwin) || defined 
(RTEMS))
+#if (defined (linux) || defined (freebsd) || defined (darwin) || defined 
(RTEMS) || defined(gnu))

 char   *system_error_msg()
 {
Index: ion-3.0.0~dfsg1/ltp/udp/udplso.c
===================================================================
--- ion-3.0.0~dfsg1.orig/ltp/udp/udplso.c       2012-04-06 22:39:37.000000000 
+0000
+++ ion-3.0.0~dfsg1/ltp/udp/udplso.c    2012-05-31 12:46:20.000000000 +0000
@@ -24,6 +24,10 @@

 #define IPHDR_SIZE     (20 + 8)

+#elif defined(gnu)
+
+#define IPHDR_SIZE     (sizeof(struct iphdr) + sizeof(struct udphdr))
+
 #else

 #include "netinet/ip_var.h"

Reply via email to