Re: Binary won't run on MacOSX
Walt Madden <[email protected]> Sun, 29 Jul 2012 21:41:09 -0600
| Newsgroups | gmane.comp.emulators.tn5250 |
|---|---|
| Organization | midrange.com |
| Message-ID | <[email protected]> |
On 6/11/12 1:07 PM, Hugh Caley wrote: > I'm running Lion 10.7.4. I just built tn5250, but when I run it I get > Segmentation fault:11. I got xt5250/tn5250 to work on Mac OS X by adding #include's as shown below: --- tn5250-0.17.4/curses/cursesterm.c 2008-11-21 01:12:20.000000000 -0700 +++ cursesterm.c 2012-07-28 11:45:04.000000000 -0600 @@ -22,6 +22,9 @@ #define _TN5250_TERMINAL_PRIVATE_DEFINED #include "tn5250-private.h" #include "cursesterm.h" +#ifdef __APPLE__ +#include <term.h> +#endif #ifdef USE_CURSES --- tn5250-0.17.4/curses/tn5250.c 2008-11-21 01:12:21.000000000 -0700 +++ tn5250.c 2012-07-28 11:37:10.000000000 -0600 @@ -19,6 +19,7 @@ */ #include "tn5250-private.h" +#include "cursesterm.h" Tn5250Session *sess = NULL; Tn5250Stream *stream = NULL; Without these, I believe there are un-prototyped routines in the modules and the C compiler (incorrectly) uses a default prototype returning an int. On 64-bit OS's where pointers are not interchangeable with int's this causes addressing issues. Hope this helps. -- ----- Walt Madden -- This is the Linux 5250 Development Project (LINUX5250) mailing list To post a message email: LINUX5250-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/linux5250 or email: LINUX5250-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/linux5250.