Package: genesis
Version: 2.2.1-5
Severity: important
Tags: patch

Hi,

the current version of genesis fails to build on GNU/kFreeBSD.

Please find attached patch to fix that. 
It would be nice if it could be included in the next upload.

Thanks in advance,

        Petr
only in patch2:
unchanged:
--- genesis-2.2.1.orig/src/shell/shell_tty.c
+++ genesis-2.2.1/src/shell/shell_tty.c
@@ -112,7 +112,8 @@
 */
 #ifdef TERMIO
 
-#if defined(sgi) || defined(__FreeBSD__)
+#if defined(sgi) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <sys/ioctl.h>
 #include <termios.h>
 #include <curses.h>
 #include <term.h>
@@ -120,7 +121,7 @@
 #include <termio.h>
 #endif
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 struct termios old_tty_stdin, old_tty_stdout, new_tty_stdin, new_tty_stdout;
 #else
 struct termio old_tty_stdin, old_tty_stdout, new_tty_stdin, new_tty_stdout;
@@ -439,7 +440,7 @@
      * reset the terminal parameters to their original state
      */
 #ifdef TERMIO
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
     tcsetattr(fileno(stdin), TCSANOW, &old_tty_stdin);
     tcsetattr(fileno(stdout), TCSANOW, &old_tty_stdout);
 #else
@@ -485,7 +486,7 @@
      * save the old terminal parameters
      */
 #ifdef TERMIO
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
     tcgetattr(fileno(stdin), &old_tty_stdin);
     tcgetattr(fileno(stdout), &old_tty_stdout);
 #else
@@ -651,7 +652,7 @@
     /*
      * set the new parameters
      */
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
     tcsetattr(fileno(stdin), TCSANOW, &new_tty_stdin);
 #else
     ioctl(fileno(stdin), TCSETA, &new_tty_stdin);
only in patch2:
unchanged:
--- genesis-2.2.1.orig/src/sim/sim_func_ext.h
+++ genesis-2.2.1/src/sim/sim_func_ext.h
@@ -89,16 +89,6 @@
 extern char                            *ftoa();
 extern char                            *itoa();
 
-/* 1999-07-16 <[EMAIL PROTECTED]>
- * This fix for Red Hat Linux 6.0 is courtesy of Mike Vanier
- * <[EMAIL PROTECTED]>.  
- */
-#ifdef linux
-extern char                             *strchr __P ((__const char *__s, int 
__c));
-#else
-extern char                            *strchr();
-#endif
-
 extern int             ClearPinfo();
 extern int             LocateOp();
 extern char            *GetIdent();
diff -u genesis-2.2.1/src/shell/shell_func_ext.h 
genesis-2.2.1/src/shell/shell_func_ext.h
--- genesis-2.2.1/src/shell/shell_func_ext.h
+++ genesis-2.2.1/src/shell/shell_func_ext.h
@@ -232,13 +232,2 @@
 
-/* 1999-07-16 <[EMAIL PROTECTED]>
- * This fix for Red Hat Linux 6.0 is courtesy of Mike Vanier
- * <[EMAIL PROTECTED]>.  
- */
-#ifdef linux
-extern char     *strchr __P ((__const char *__s, int __c));
-#else
-extern char    *strchr();
-#endif
-
-
 #endif /* SHELL_FUNC_EXT_H */

Reply via email to