Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12970 )

Change subject: oc2g: fsync requires fd instead of file stream
......................................................................

oc2g: fsync requires fd instead of file stream

Similar fix was done for lc15 in a8041edb.

Change-Id: Idcd9dc48ea2e1f80bfdf5cf8b6bf55d8150fe0d2
---
M src/osmo-bts-oc2g/misc/oc2gbts_par.c
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, but someone else must approve



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 @@
                fclose(fp);
                return -EIO;
        }
-       fsync(fp);
+       fsync(fileno(fp));
        fclose(fp);
        return 0;
 }
@@ -201,7 +201,7 @@

         rc = fwrite(buf, 1, size, fp);

-        fsync(fp);
+        fsync(fileno(fp));
         fclose(fp);

         return rc;
@@ -242,7 +242,7 @@
                fclose(fp);
                return -EIO;
        }
-       fsync(fp);
+       fsync(fileno(fp));
        fclose(fp);

        return 0;

--
To view, visit https://gerrit.osmocom.org/12970
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idcd9dc48ea2e1f80bfdf5cf8b6bf55d8150fe0d2
Gerrit-Change-Number: 12970
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Vadim Yanitskiy <[email protected]>

Reply via email to