]> git.ipfire.org Git - thirdparty/strongswan.git/blame - src/libstrongswan/utils/compat/android.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libstrongswan / utils / compat / android.h
CommitLineData
a60e92a2 1/*
073761ec 2 * Copyright (C) 2010-2015 Tobias Brunner
19ef2aec
TB
3 *
4 * Copyright (C) secunet Security Networks AG
a60e92a2
TB
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
9be6b2e0
TB
17/**
18 * @defgroup android android
19 * @{ @ingroup compat
20 */
21
22#ifndef ANDROID_H_
23#define ANDROID_H_
24
17e36cd4
TB
25#include <android/api-level.h>
26
1be32988
TB
27/* stuff defined in AndroidConfig.h, which is included using the -include
28 * command-line option, thus cannot be undefined using -U CFLAGS options.
29 * the reason we have to undefine these flags in the first place, is that
30 * AndroidConfig.h defines them as 0, which in turn means that they are
31 * actually defined. */
1be32988 32#undef HAVE_BACKTRACE
9be6b2e0 33
17e36cd4
TB
34/* API level 21 changed quite a few things, we define some stuff here and not
35 * via CFLAGS in Android.mk files as it is easier to compare versions */
36#if __ANDROID_API__ >= 21
37
38#define HAVE_PTHREAD_CONDATTR_INIT 1
39#define HAVE_CONDATTR_CLOCK_MONOTONIC 1
40
31298187
TB
41#undef TIME_CLOCK_ID
42#define TIME_CLOCK_ID CLOCK_REALTIME
43
17e36cd4
TB
44#define HAVE_SYS_CAPABILITY_H 1
45
46#else /* __ANDROID_API__ */
47
48#define HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1
49
50#endif /* __ANDROID_API__ */
51
9be6b2e0 52#endif /** ANDROID_H_ @}*/