blob: 319cc7c33cbea19e9b17671913d82e3606a58379 [file] [log] [blame]
Dan Albert6576a372016-09-21 01:16:13 -07001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ANDROID_LEGACY_TIME_INLINES_H
18#define ANDROID_LEGACY_TIME_INLINES_H
19
20#include <sys/cdefs.h>
21#include <time.h>
22
23__BEGIN_DECLS
24
25#if __ANDROID_API__ < 21
26
27static __inline int strftime_l(char* s, size_t max, const char* format, const struct tm* tm,
28 locale_t l __unused) {
29 return strftime(s, max, format, tm);
30}
31
32#endif /* __ANDROID_API__ < 21 */
33
34__END_DECLS
35
36#endif /* ANDROID_LEGACY_TIME_INLINES_H */