summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-04-12 15:56:12 -0700
committerbors <bors@rust-lang.org>2016-04-12 15:56:12 -0700
commitba084f408a518d103414c13c6fba0e7003541f21 (patch)
treeea169b511b0a3d1b811aa0639f9429de94bb3e0a
parente4447f406c5d33842971f3849834d8ba6e1a4ce4 (diff)
parent6b0e09c1f417ecb51e16cdf4be41836db729c6e6 (diff)
downloadrust-libc-ba084f408a518d103414c13c6fba0e7003541f21.tar.gz
Auto merge of #261 - myfreeweb:master, r=alexcrichton
64-bit Android timegm fix On aarch64 and x86_64, `timegm64` does not exist (see [time64.h](https://android.googlesource.com/platform/development/+/797351fd3bbb8fe517afafdd5095fd740387e7a4/ndk/platforms/android-L/include/time64.h)). See rust-lang-deprecated/time#118 for usage. Since that patch, the time library switched to using libc for `timegm` (rust-lang-deprecated/time@51c0019), and it doesn't build on 64-bit Android. This PR fixes that.
-rw-r--r--src/unix/notbsd/android/b32.rs4
-rw-r--r--src/unix/notbsd/android/b64.rs4
-rw-r--r--src/unix/notbsd/android/mod.rs1
3 files changed, 8 insertions, 1 deletions
diff --git a/src/unix/notbsd/android/b32.rs b/src/unix/notbsd/android/b32.rs
index 267060d422..1e0c2ed344 100644
--- a/src/unix/notbsd/android/b32.rs
+++ b/src/unix/notbsd/android/b32.rs
@@ -10,3 +10,7 @@ s! {
}
pub const SYS_gettid: ::c_long = 224;
+
+extern {
+ pub fn timegm64(tm: *const ::tm) -> ::time64_t;
+}
diff --git a/src/unix/notbsd/android/b64.rs b/src/unix/notbsd/android/b64.rs
index 5cf4f9d0c8..d5380232d4 100644
--- a/src/unix/notbsd/android/b64.rs
+++ b/src/unix/notbsd/android/b64.rs
@@ -10,3 +10,7 @@ s! {
}
pub const SYS_gettid: ::c_long = 178;
+
+extern {
+ pub fn timegm(tm: *const ::tm) -> ::time64_t;
+}
diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs
index 3f78e01921..ac1a124c37 100644
--- a/src/unix/notbsd/android/mod.rs
+++ b/src/unix/notbsd/android/mod.rs
@@ -648,7 +648,6 @@ extern {
serv: *mut ::c_char,
sevlen: ::size_t,
flags: ::c_int) -> ::c_int;
- pub fn timegm64(tm: *const ::tm) -> time64_t;
pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
pub fn ptrace(request: ::c_int, ...) -> ::c_long;
pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int;