aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-02-19 23:47:37 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2019-02-19 23:47:41 +0100
commit546056c9c896da1bd7a760a5ad2b7cdd43494a1e (patch)
tree2194db628e692252a8a5a900617185334c032cfd
parentf3fa1d384d549d0013a4fea8ad2b2b5c86414e30 (diff)
oc2g: fsync requires fd instead of file stream
Similar fix was done for lc15 in a8041edb. Change-Id: Idcd9dc48ea2e1f80bfdf5cf8b6bf55d8150fe0d2
-rw-r--r--src/osmo-bts-oc2g/misc/oc2gbts_par.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osmo-bts-oc2g/misc/oc2gbts_par.c b/src/osmo-bts-oc2g/misc/oc2gbts_par.c
index f355024..7dc77c9 100644
--- a/src/osmo-bts-oc2g/misc/oc2gbts_par.c
+++ b/src/osmo-bts-oc2g/misc/oc2gbts_par.c
@@ -151,7 +151,7 @@ int oc2gbts_par_set_int(enum oc2gbts_par par, int val)
fclose(fp);
return -EIO;
}
- fsync(fp);
+ fsync(fileno(fp));
fclose(fp);
return 0;
}
@@ -201,7 +201,7 @@ int oc2gbts_par_set_buf(enum oc2gbts_par par, const uint8_t *buf,
rc = fwrite(buf, 1, size, fp);
- fsync(fp);
+ fsync(fileno(fp));
fclose(fp);
return rc;
@@ -242,7 +242,7 @@ int oc2gbts_par_set_gps_fix(void *ctx, time_t val)
fclose(fp);
return -EIO;
}
- fsync(fp);
+ fsync(fileno(fp));
fclose(fp);
return 0;