os0file.c:

  Add typecast from ulint to ssize_t in pread and pwrite, so that the type is according to the Linux man page; this will probably not help to fix the HP-UX 32-bit pwrite failure, since the compiler should do the appropriate typecasts anyway
parent 215cd1e4
......@@ -1186,7 +1186,7 @@ os_file_pread(
os_file_n_pending_preads++;
os_mutex_exit(os_file_count_mutex);
n_bytes = pread(file, buf, n, offs);
n_bytes = pread(file, buf, (ssize_t)n, offs);
os_mutex_enter(os_file_count_mutex);
os_file_n_pending_preads--;
......@@ -1211,7 +1211,7 @@ os_file_pread(
return(ret);
}
ret = read(file, buf, n);
ret = read(file, buf, (ssize_t)n);
os_mutex_exit(os_file_seek_mutexes[i]);
......@@ -1261,7 +1261,7 @@ os_file_pwrite(
os_file_n_pending_pwrites++;
os_mutex_exit(os_file_count_mutex);
ret = pwrite(file, buf, n, offs);
ret = pwrite(file, buf, (ssize_t)n, offs);
os_mutex_enter(os_file_count_mutex);
os_file_n_pending_pwrites--;
......@@ -1296,7 +1296,7 @@ os_file_pwrite(
return(ret);
}
ret = write(file, buf, n);
ret = write(file, buf, (ssize_t)n);
if (srv_unix_file_flush_method != SRV_UNIX_LITTLESYNC
&& srv_unix_file_flush_method != SRV_UNIX_NOSYNC
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment