summaryrefslogtreecommitdiffstats
path: root/src/rccxml.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2010-07-16 09:58:26 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2010-07-16 09:58:26 +0200
commit4ed874500c66aeb60cb11a0acc081dbc113eec51 (patch)
tree425587d32b7a7e005c37c9c2c941936c0c65c0d6 /src/rccxml.c
parent0f6f7b770b84bd02d8c94c84ed9da78bc11ba8ca (diff)
downloadlibrcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.tar.gz
librcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.tar.bz2
librcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.tar.xz
librcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.zip
Windows fixes and CMake scripts to build under Windows
Diffstat (limited to 'src/rccxml.c')
-rw-r--r--src/rccxml.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rccxml.c b/src/rccxml.c
index 1db5788..cc07fa9 100644
--- a/src/rccxml.c
+++ b/src/rccxml.c
@@ -18,9 +18,13 @@
*/
#include <stdio.h>
-#include <string.h>
#include <stdarg.h>
+#include <string.h>
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
+
#include "../config.h"
#ifdef HAVE_UNISTD_H
@@ -467,7 +471,10 @@ clear:
}
xmlFreeDoc(doc);
}
+
+#ifdef HAVE_FSYNC
fsync(fd);
+#endif /* HAVE_FSYNC */
#if defined(HAVE_FLOCK)
flock(fd, LOCK_UN);