From 041b8f697bb31ce443de0e6f9e4eee892f9e2ac8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 29 Dec 2008 17:28:13 +0100 Subject: command: use gmtime() on WIN32 gmtime_r() is not available. --- src/command.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/command.c') diff --git a/src/command.c b/src/command.c index 9793830c1..326a0499d 100644 --- a/src/command.c +++ b/src/command.c @@ -257,14 +257,21 @@ print_spl_list(struct client *client, GPtrArray *list) struct stored_playlist_info *playlist = g_ptr_array_index(list, i); time_t t; +#ifndef WIN32 struct tm tm; +#endif char timestamp[32]; client_printf(client, "playlist: %s\n", playlist->name); t = playlist->mtime; strftime(timestamp, sizeof(timestamp), "%FT%TZ", - gmtime_r(&t, &tm)); +#ifdef WIN32 + gmtime(&t) +#else + gmtime_r(&t, &tm) +#endif + ); client_printf(client, "Last-Modified: %s\n", timestamp); } } -- cgit v1.2.3