aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-06-11 12:49:00 +0200
committerHarald Welte <laforge@gnumonks.org>2018-09-16 10:44:55 +0000
commita8041edb5be3ae82bef97106b783ea4ec15e2a21 (patch)
treec0b8ab061f9cc2def671f0982f7c9890fa1c3c74
parent5fceb9fc3a8ed061d25dda8b057cbbb3a57c058a (diff)
lc15: fsync requires fd instead of file stream
-rw-r--r--src/osmo-bts-litecell15/misc/lc15bts_par.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osmo-bts-litecell15/misc/lc15bts_par.c b/src/osmo-bts-litecell15/misc/lc15bts_par.c
index 75314a44..af9d030f 100644
--- a/src/osmo-bts-litecell15/misc/lc15bts_par.c
+++ b/src/osmo-bts-litecell15/misc/lc15bts_par.c
@@ -144,7 +144,7 @@ int lc15bts_par_set_int(void *ctx, enum lc15bts_par par, int val)
return -EIO;
}
- fsync(fp);
+ fsync(fileno(fp));
fclose(fp);
return 0;
}
@@ -176,7 +176,7 @@ int lc15bts_par_set_buf(void *ctx, enum lc15bts_par par, const uint8_t *buf, uns
rc = fwrite(buf, 1, size, fp);
- fsync(fp);
+ fsync(fileno(fp));
fclose(fp);
return rc;
@@ -225,7 +225,7 @@ int lc15bts_par_set_gps_fix(time_t val)
fclose(fp);
return -EIO;
}
- fsync(fp);
+ fsync(fileno(fp));
fclose(fp);
return 0;