Fix issues for latest GCC toolchain

This commit is contained in:
Justine Tunney 2023-10-11 14:54:42 -07:00
parent 5cb9b2658c
commit 3b086af91b
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
22 changed files with 148 additions and 166 deletions

View file

@ -34,8 +34,6 @@
#include "libc/runtime/stack.h"
#include "libc/sysv/errfuns.h"
__msabi extern typeof(GetFileAttributes) *const __imp_GetFileAttributesW;
static struct {
_Atomic(uint32_t) once;
_Bool allowed;
@ -72,7 +70,7 @@ textwindows int sys_symlinkat_nt(const char *target, int newdirfd,
if ((targetlen = __mkntpath(target, M.target16)) == -1) return -1;
// determine if we need directory flag
if ((attrs = __imp_GetFileAttributesW(M.target16)) != -1u) {
if ((attrs = GetFileAttributes(M.target16)) != -1u) {
if (attrs & kNtFileAttributeDirectory) {
flags = kNtSymbolicLinkFlagDirectory;
} else {