+ // On windows, fstat() of stdin/stdout/stderr returns all zeros
+ // for the permission bits. This can cause problems down the
+ // line. For example, CanOpen() will fail.
+ // TODO(sbc): Fix this within sel_ldr instead.
+ if (S_ISCHR(stat->st_mode) && (stat->st_mode & S_IRWXU) == 0)
+ stat->st_mode |= S_IRWXU;