Skip to content

Commit

Permalink
Fix linux compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
dd86k committed Jun 4, 2024
1 parent c23ca24 commit f733af4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/adbg/os/file.d
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ version (Windows) {
return null;

int oflags; // O_RDONLY == 0
if ((flags & OSFileOFlags.readWrite) == OFlags.readWrite)
if ((flags & OSFileOFlags.readWrite) == OSFileOFlags.readWrite)
oflags |= O_RDWR;
else if (flags & OFlags.write)
else if (flags & OSFileOFlags.write)
oflags |= O_WRONLY;
file.handle = .open(path, oflags);
if (handle == 0) {
if (file.handle == 0) {
free(file);
return null;
}
Expand Down Expand Up @@ -188,7 +188,7 @@ version (Windows) {
case S_IFBLK: // Block devices (like a disk)
//TODO: BSD variants
long s = void;
return ioctl(handle, BLOCKSIZE, &s) < 0 ? -1 : s;
return ioctl(file.handle, BLOCKSIZE, &s) < 0 ? -1 : s;
default:
return -1;
}
Expand Down

0 comments on commit f733af4

Please sign in to comment.