diff --git a/lib/posix/_lstat.c b/lib/posix/_lstat.c index bdde67c52..bb2108fe8 100644 --- a/lib/posix/_lstat.c +++ b/lib/posix/_lstat.c @@ -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); }