1 //===-- LibcGlue.cpp ------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // This files adds functions missing from libc on earlier versions of Android
11 #include <android/api-level.h>
13 #include <sys/syscall.h>
15 #if __ANDROID_API__ < 21
20 #include <sys/types.h>
22 #include "lldb/Host/Time.h"
24 time_t timegm(struct tm
*t
) { return (time_t)timegm64(t
); }
26 int posix_openpt(int flags
) { return open("/dev/ptmx", flags
); }