1 //===-- LibcGlue.cpp ------------------------------------------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 // This files adds functions missing from libc on earlier versions of Android 10 11 #include <android/api-level.h> 12 13 #include <sys/syscall.h> 14 15 #if __ANDROID_API__ < 21 16 17 #include <fcntl.h> 18 #include <signal.h> 19 #include <sys/stat.h> 20 #include <sys/types.h> 21 22 #include "lldb/Host/Time.h" 23 timegm(struct tm * t)24time_t timegm(struct tm *t) { return (time_t)timegm64(t); } 25 posix_openpt(int flags)26int posix_openpt(int flags) { return open("/dev/ptmx", flags); } 27 28 #endif 29