blob: 13437f9704e37cc9f7538b6d4fec62b933162649 [file] [log] [blame]
Vince Harron8b335672015-05-12 01:10:56 +00001//===-- LibcGlue.cpp --------------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// This files adds functions missing from libc on earlier versions of Android
11
12#include <android/api-level.h>
13
Pavel Labathdf7c6992015-06-17 18:38:49 +000014#include <sys/syscall.h>
Pavel Labathdf7c6992015-06-17 18:38:49 +000015
Vince Harron8b335672015-05-12 01:10:56 +000016#if __ANDROID_API__ < 21
17
Vince Harron8b335672015-05-12 01:10:56 +000018#include <fcntl.h>
Vince Harron8b335672015-05-12 01:10:56 +000019#include <signal.h>
Kate Stoneb9c1b512016-09-06 20:57:50 +000020#include <sys/stat.h>
21#include <sys/types.h>
Vince Harron8b335672015-05-12 01:10:56 +000022
23#include "lldb/Host/Time.h"
24
Kate Stoneb9c1b512016-09-06 20:57:50 +000025time_t timegm(struct tm *t) { return (time_t)timegm64(t); }
Vince Harron8b335672015-05-12 01:10:56 +000026
Kate Stoneb9c1b512016-09-06 20:57:50 +000027int posix_openpt(int flags) { return open("/dev/ptmx", flags); }
Vince Harron8b335672015-05-12 01:10:56 +000028
29#endif