Skip to content

Commit 5e75244

Browse files
committed
Use as *mut _ instead of .cast() for 1.13.0 compatibility
1 parent 56e8db0 commit 5e75244

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/unix/linux_like/linux/musl/lfs64.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub unsafe extern "C" fn fallocate64(
1515

1616
#[inline]
1717
pub unsafe extern "C" fn fgetpos64(stream: *mut ::FILE, pos: *mut ::fpos64_t) -> ::c_int {
18-
::fgetpos(stream, pos.cast())
18+
::fgetpos(stream, pos as *mut _)
1919
}
2020

2121
#[inline]
@@ -43,12 +43,12 @@ pub unsafe extern "C" fn fseeko64(
4343

4444
#[inline]
4545
pub unsafe extern "C" fn fsetpos64(stream: *mut ::FILE, pos: *const ::fpos64_t) -> ::c_int {
46-
::fsetpos(stream, pos.cast())
46+
::fsetpos(stream, pos as *mut _)
4747
}
4848

4949
#[inline]
5050
pub unsafe extern "C" fn fstat64(fildes: ::c_int, buf: *mut ::stat64) -> ::c_int {
51-
::fstat(fildes, buf.cast())
51+
::fstat(fildes, buf as *mut _)
5252
}
5353

5454
#[inline]
@@ -58,17 +58,17 @@ pub unsafe extern "C" fn fstatat64(
5858
buf: *mut ::stat64,
5959
flag: ::c_int,
6060
) -> ::c_int {
61-
::fstatat(fd, path, buf.cast(), flag)
61+
::fstatat(fd, path, buf as *mut _, flag)
6262
}
6363

6464
#[inline]
6565
pub unsafe extern "C" fn fstatfs64(fd: ::c_int, buf: *mut ::statfs64) -> ::c_int {
66-
::fstatfs(fd, buf.cast())
66+
::fstatfs(fd, buf as *mut _)
6767
}
6868

6969
#[inline]
7070
pub unsafe extern "C" fn fstatvfs64(fd: ::c_int, buf: *mut ::statvfs64) -> ::c_int {
71-
::fstatvfs(fd, buf.cast())
71+
::fstatvfs(fd, buf as *mut _)
7272
}
7373

7474
#[inline]
@@ -83,7 +83,7 @@ pub unsafe extern "C" fn ftruncate64(fd: ::c_int, length: ::off64_t) -> ::c_int
8383

8484
#[inline]
8585
pub unsafe extern "C" fn getrlimit64(resource: ::c_int, rlim: *mut ::rlimit64) -> ::c_int {
86-
::getrlimit(resource, rlim.cast())
86+
::getrlimit(resource, rlim as *mut _)
8787
}
8888

8989
#[inline]
@@ -93,7 +93,7 @@ pub unsafe extern "C" fn lseek64(fd: ::c_int, offset: ::off64_t, whence: ::c_int
9393

9494
#[inline]
9595
pub unsafe extern "C" fn lstat64(path: *const ::c_char, buf: *mut ::stat64) -> ::c_int {
96-
::lstat(path, buf.cast())
96+
::lstat(path, buf as *mut _)
9797
}
9898

9999
#[inline]
@@ -173,7 +173,7 @@ pub unsafe extern "C" fn prlimit64(
173173
new_limit: *const ::rlimit64,
174174
old_limit: *mut ::rlimit64,
175175
) -> ::c_int {
176-
::prlimit(pid, resource, new_limit.cast(), old_limit.cast())
176+
::prlimit(pid, resource, new_limit as *mut _, old_limit as *mut _)
177177
}
178178

179179
#[inline]
@@ -198,7 +198,7 @@ pub unsafe extern "C" fn pwritev64(
198198

199199
#[inline]
200200
pub unsafe extern "C" fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64 {
201-
::readdir(dirp).cast()
201+
::readdir(dirp) as *mut _
202202
}
203203

204204
#[inline]
@@ -207,7 +207,7 @@ pub unsafe extern "C" fn readdir64_r(
207207
entry: *mut ::dirent64,
208208
result: *mut *mut ::dirent64,
209209
) -> ::c_int {
210-
::readdir_r(dirp, entry.cast(), result.cast())
210+
::readdir_r(dirp, entry as *mut _, result as *mut _)
211211
}
212212

213213
#[inline]
@@ -222,22 +222,22 @@ pub unsafe extern "C" fn sendfile64(
222222

223223
#[inline]
224224
pub unsafe extern "C" fn setrlimit64(resource: ::c_int, rlim: *const ::rlimit64) -> ::c_int {
225-
::setrlimit(resource, rlim.cast())
225+
::setrlimit(resource, rlim as *mut _)
226226
}
227227

228228
#[inline]
229229
pub unsafe extern "C" fn stat64(pathname: *const ::c_char, statbuf: *mut ::stat64) -> ::c_int {
230-
::stat(pathname, statbuf.cast())
230+
::stat(pathname, statbuf as *mut _)
231231
}
232232

233233
#[inline]
234234
pub unsafe extern "C" fn statfs64(pathname: *const ::c_char, buf: *mut ::statfs64) -> ::c_int {
235-
::statfs(pathname, buf.cast())
235+
::statfs(pathname, buf as *mut _)
236236
}
237237

238238
#[inline]
239239
pub unsafe extern "C" fn statvfs64(path: *const ::c_char, buf: *mut ::statvfs64) -> ::c_int {
240-
::statvfs(path, buf.cast())
240+
::statvfs(path, buf as *mut _)
241241
}
242242

243243
#[inline]

0 commit comments

Comments
 (0)