"forward compatible" hack for lstat() - make new binaries work on old

systems
This commit is contained in:
Ben Gras 2005-11-07 13:15:09 +00:00
parent df279ac347
commit c6412ae342

View file

@ -8,9 +8,12 @@ _CONST char *name;
struct stat *buffer;
{
message m;
int r;
m.m1_i1 = strlen(name) + 1;
m.m1_p1 = (char *) name;
m.m1_p2 = (char *) buffer;
return(_syscall(FS, LSTAT, &m));
if((r = _syscall(FS, LSTAT, &m)) >= 0 || errno != ENOSYS)
return r;
return _stat(name, buffer);
}