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 <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2017-04-15 20:42:07 +01:00
parent e9223a852c
commit c3c3fc6e40
No known key found for this signature in database
GPG key ID: A9553245FDE9B739

View file

@ -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;