[fpc-pascal] fpsocket error
Евгений
sem-evgen at rambler.ru
Wed Aug 19 22:20:27 CEST 2009
Henry Vermaak пишет:
> 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
>
>
A great, great, great ... Many thanks, Henry.
I apply your patch and now it works, socket succesfully created.
Best regards.
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4349 (20090819) __________
The message was checked by ESET NOD32 Antivirus.
http://www.esetnod32.ru
More information about the fpc-pascal
mailing list