Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libplist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwn
libplist
Commits
d53d0412
Commit
d53d0412
authored
Dec 14, 2016
by
Nikias Bassen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly check for the availability of strptime() and make sure to use it
parent
ae8b7a0f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
configure.ac
configure.ac
+1
-1
xplist.c
src/xplist.c
+5
-1
No files found.
configure.ac
View file @
d53d0412
...
...
@@ -48,7 +48,7 @@ AC_TYPE_UINT32_T
AC_TYPE_UINT8_T
# Checks for library functions.
AC_CHECK_FUNCS([asprintf strcasecmp strdup strerror strndup stpcpy vasprintf gmtime_r localtime_r timegm])
AC_CHECK_FUNCS([asprintf strcasecmp strdup strerror strndup stpcpy vasprintf gmtime_r localtime_r timegm
strptime
])
# Checking endianness
AC_C_BIGENDIAN([AC_DEFINE([__BIG_ENDIAN__], [1], [big endian])],
...
...
src/xplist.c
View file @
d53d0412
...
...
@@ -25,6 +25,10 @@
#include <config.h>
#endif
#ifdef HAVE_STRPTIME
#define _XOPEN_SOURCE 600
#endif
#include <string.h>
#include <assert.h>
#include <stdlib.h>
...
...
@@ -354,7 +358,7 @@ static void parse_date(const char *strval, struct TM *btime)
if
(
!
btime
)
return
;
memset
(
btime
,
0
,
sizeof
(
struct
tm
));
if
(
!
strval
)
return
;
#ifdef
strptime
#ifdef
HAVE_STRPTIME
strptime
((
char
*
)
strval
,
"%Y-%m-%dT%H:%M:%SZ"
,
btime
);
#else
#ifdef USE_TM64
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment