[fpc-pascal] fpsocket error

Henry Vermaak henry.vermaak at gmail.com
Wed Aug 19 18:31:54 CEST 2009


2009/8/19 Henry Vermaak <henry.vermaak at gmail.com>:
>
> If you are using an EABI kernel, it will be the socketcall syscall
> that's failing.  This is the code in unistd.h:
>
> /*
>  * The following syscalls are obsolete and no longer available for EABI.
>  */
> #if defined(__ARM_EABI__) && !defined(__KERNEL__)
> #undef __NR_time
> #undef __NR_umount
> #undef __NR_stime
> #undef __NR_alarm
> #undef __NR_utime
> #undef __NR_getrlimit
> #undef __NR_select
> #undef __NR_readdir
> #undef __NR_mmap
> #undef __NR_socketcall
> #undef __NR_syscall
> #undef __NR_ipc
> #endif
>
> The fpc socket implementation tries to use socketcall for arm eabi, so
> you can try the following patch and recompile fpc (not tested):
>
> Index: rtl/linux/unixsock.inc
> ===================================================================
> --- rtl/linux/unixsock.inc      (revision 13557)
> +++ rtl/linux/unixsock.inc      (working copy)
> @@ -13,7 +13,7 @@
>    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>  }
>
> -{$ifndef cpux86_64}
> +{$if not defined(cpux86_64) and not defined(FPC_ABI_EABI)}
>   {$define NEED_SOCKETCALL}
>  {$endif}
>

I've made a bugreport for this here:
http://bugs.freepascal.org/view.php?id=14386

It contains a patch that will help to remedy the above missing syscalls.

Henry



More information about the fpc-pascal mailing list