summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/syscalls.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2003-09-17 21:47:12 +0000
committerChristopher Faylor <me@cgf.cx>2003-09-17 21:47:12 +0000
commitf7f542063b1f8231286d2a275d465bd887305b50 (patch)
treec59ed1c8b188533b44e883141a8d96f3c40d6c02 /winsup/cygwin/syscalls.cc
parentcb16ce2c2e5dbf0d7c4d8ae35e9bab82941d73ae (diff)
downloadcygnal-f7f542063b1f8231286d2a275d465bd887305b50.tar.gz
cygnal-f7f542063b1f8231286d2a275d465bd887305b50.tar.bz2
cygnal-f7f542063b1f8231286d2a275d465bd887305b50.zip
* syscalls.cc (gethostid): Add lpFreeBytesAvailable argument to
GetDiskFreeSpaceEx call since NT4 requires it.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index c9d926462..11cacd5ed 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -2884,7 +2884,10 @@ long gethostid(void)
key.get_string ("ProductId", (char *)&data[6], 24, "00000-000-0000000-00000");
debug_printf ("Windows Product ID: %s", (char *)&data[6]);
- GetDiskFreeSpaceEx ("C:\\", NULL, (PULARGE_INTEGER) &data[11], NULL);
+ /* Contrary to MSDN, NT4 requires the second argument
+ or a STATUS_ACCESS_VIOLATION is generated */
+ ULARGE_INTEGER availb;
+ GetDiskFreeSpaceEx ("C:\\", &availb, (PULARGE_INTEGER) &data[11], NULL);
if (GetLastError () == ERROR_PROC_NOT_FOUND)
GetDiskFreeSpace ("C:\\", NULL, NULL, NULL, (DWORD *)&data[11]);