From c3c3fc6e406763914c1a6163d311320298a1663d Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sat, 15 Apr 2017 20:42:07 +0100 Subject: [PATCH] getdata: fpos_t is not easy to print correctly On some systems fpos_t may be a complex object, so printing it is not as easy as ftell() position. Signed-off-by: Sami Kerola --- src/getdata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/getdata.c b/src/getdata.c index 13b882a..2083440 100644 --- a/src/getdata.c +++ b/src/getdata.c @@ -249,9 +249,9 @@ void parse_config(int is_include, const char *restrict config_file, break; } else if (argument == ITS_A_RANGE_SECOND_IP && i == 0) { if (!range_p) { - fpos_t pos; - fgetpos(dhcpd_config, &pos); - error(EXIT_FAILURE, 0, "parse_config: parsing failed at position: %Ld", pos); + long int pos; + pos = ftell(dhcpd_config); + error(EXIT_FAILURE, 0, "parse_config: parsing failed at position: %ld", pos); } range_p->last_ip = range_p->first_ip; goto newrange;