[uClibc]Re: nfs-utils
Erik Andersen
andersen at codepoet.org
Wed Aug 14 02:15:38 UTC 2002
On Wed Aug 14, 2002 at 11:04:32AM +0900, Miles Bader wrote:
> Erik Andersen <andersen at codepoet.org> writes:
> > Basically, I've not implemented syscall on mips yet.
>
> Is this something that's supposed to be implemented?
It is a good thing to add. A number of apps use syscall()
to try and be more portable across libc versions. For
example, older glibc versions don't provide pivot_root,
so you will see apps that do this type of thing:
#ifdef __NR_pivot_root
int pivot_root(const char *new_root, const char *put_old)
{
return(syscall(__NR_pivot_root, option, fs_index, buf));
}
#else
int pivot_root(const char * new_root,const char * put_old)
{
errno=ENOSYS;
return -1;
}
#endif
The same sort of thing happens a lot for llseek (as I recall
samba does that). So its actually fairly common,
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
More information about the uClibc
mailing list