Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion include/zephyr/bluetooth/services/cts.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

#include <stdint.h>
#include <zephyr/posix/time.h>

#ifdef __cplusplus
extern "C" {
Expand Down
13 changes: 9 additions & 4 deletions subsys/bluetooth/services/cts.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L /* To get gmtime_r()'s prototype */

#ifdef CONFIG_BT_CTS_HELPER_API
#include <time.h>
#include <zephyr/sys/timeutil.h>
#endif

#include <stdbool.h>
#include <zephyr/sys/byteorder.h>
#include <zephyr/posix/time.h>

#include <zephyr/bluetooth/conn.h>
#include <zephyr/bluetooth/gatt.h>
Expand All @@ -26,9 +34,6 @@ static const struct bt_cts_cb *cts_cb;

#ifdef CONFIG_BT_CTS_HELPER_API

#include <time.h>
#include <zephyr/sys/timeutil.h>

int bt_cts_time_to_unix_ms(const struct bt_cts_time_format *ct_time, int64_t *unix_ms)
{
struct tm date_time;
Expand Down
Loading