summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/syscalls.cc5
2 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 2725400c3..62c776a38 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-16 Brian Ford <ford@vss.fsi.com>
+
+ * syscalls.cc (gethostid): Add lpFreeBytesAvailable argument to
+ GetDiskFreeSpaceEx call since NT4 requires it.
+
2003-09-16 Christopher Faylor <cgf@redhat.com>
* fhandler_process.cc (fhandler_process::fill_filebuf): Open pinfo with
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]);