mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +00:00
Fix issues for latest GCC toolchain
This commit is contained in:
parent
5cb9b2658c
commit
3b086af91b
22 changed files with 148 additions and 166 deletions
|
@ -27,8 +27,6 @@
|
|||
#include "libc/sysv/consts/at.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
__msabi extern typeof(GetFileAttributes) *const __imp_GetFileAttributesW;
|
||||
|
||||
static int __mkntpathat_impl(int dirfd, const char *path, int flags,
|
||||
char16_t file[hasatleast PATH_MAX]) {
|
||||
char16_t dir[PATH_MAX];
|
||||
|
@ -71,7 +69,7 @@ int __mkntpathat(int dirfd, const char *path, int flags,
|
|||
if (len > 1 && !(len == 3 && file[1] == ':')) {
|
||||
file[--len] = 0;
|
||||
}
|
||||
if ((fattr = __imp_GetFileAttributesW(file)) != -1u &&
|
||||
if ((fattr = GetFileAttributes(file)) != -1u &&
|
||||
!(fattr & kNtFileAttributeReparsePoint) &&
|
||||
!(fattr & kNtFileAttributeDirectory)) {
|
||||
return enotdir();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue