diff options
Diffstat (limited to 'usr.sbin/unbound/smallapp/unbound-anchor.c')
-rw-r--r-- | usr.sbin/unbound/smallapp/unbound-anchor.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/usr.sbin/unbound/smallapp/unbound-anchor.c b/usr.sbin/unbound/smallapp/unbound-anchor.c index f6f90e20115..81bb896f717 100644 --- a/usr.sbin/unbound/smallapp/unbound-anchor.c +++ b/usr.sbin/unbound/smallapp/unbound-anchor.c @@ -1520,7 +1520,11 @@ xml_entitydeclhandler(void *userData, const XML_Char *ATTR_UNUSED(publicId), const XML_Char *ATTR_UNUSED(notationName)) { +#if HAVE_DECL_XML_STOPPARSER (void)XML_StopParser((XML_Parser)userData, XML_FALSE); +#else + (void)userData; +#endif } /** @@ -1828,6 +1832,12 @@ write_unsigned_root(const char* root_anchor_file) root_anchor_file); if(verb && errno != 0) printf("%s\n", strerror(errno)); } + fflush(out); +#ifdef HAVE_FSYNC + fsync(fileno(out)); +#else + FlushFileBuffers((HANDLE)_fileno(out)); +#endif fclose(out); } @@ -1854,6 +1864,12 @@ write_root_anchor(const char* root_anchor_file, BIO* ds) root_anchor_file); if(verb && errno != 0) printf("%s\n", strerror(errno)); } + fflush(out); +#ifdef HAVE_FSYNC + fsync(fileno(out)); +#else + FlushFileBuffers((HANDLE)_fileno(out)); +#endif fclose(out); } |