aboutsummaryrefslogtreecommitdiff
path: root/src/conf.c
diff options
context:
space:
mode:
authorJacob Appelbaum <jacob@appelbaum.net>2013-02-06 00:06:04 -0500
committerJacob Appelbaum <jacob@appelbaum.net>2013-02-06 00:06:04 -0500
commit5b0ee57271eab109f103b42a326fc5b126e3bbda (patch)
tree2f74455ec067770a201805bb4d43c44c46580bdb /src/conf.c
parentdb5f01f0150015b88ffc98c5f6fc16e538de566b (diff)
downloadtlsdate-5b0ee57271eab109f103b42a326fc5b126e3bbda.tar.gz
more g++ improvements that also keeps gcc happy
Diffstat (limited to 'src/conf.c')
-rw-r--r--src/conf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/conf.c b/src/conf.c
index ee7a9b8..f57af88 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -1,6 +1,8 @@
/* conf.c - config file parser */
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE /* strchrnul */
+#endif
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
@@ -47,7 +49,7 @@ struct conf_entry *conf_parse(FILE *f)
val = strtok(NULL, "");
if (val)
val = eat_whitespace(val);
- e = malloc(sizeof *e);
+ e = (struct conf_entry *) malloc(sizeof *e);
if (!e)
goto fail;
e->next = NULL;