summaryrefslogtreecommitdiffstats
path: root/contrib/unbound/smallapp/unbound-anchor.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2016-01-16 19:06:12 +0000
committerdes <des@FreeBSD.org>2016-01-16 19:06:12 +0000
commitdc5c74f3f12a6f57440056448e551a0f1c335299 (patch)
tree2a7e37ea0ed7669b7017829c084a497ede84c5d0 /contrib/unbound/smallapp/unbound-anchor.c
parent28f497d302178844843a97044b9d18027c124fc7 (diff)
downloadFreeBSD-src-dc5c74f3f12a6f57440056448e551a0f1c335299.zip
FreeBSD-src-dc5c74f3f12a6f57440056448e551a0f1c335299.tar.gz
MFH (r292206): upgrade to Unbound 1.5.7
MFH (r292135): run configure script with correct compiler
Diffstat (limited to 'contrib/unbound/smallapp/unbound-anchor.c')
-rw-r--r--contrib/unbound/smallapp/unbound-anchor.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/contrib/unbound/smallapp/unbound-anchor.c b/contrib/unbound/smallapp/unbound-anchor.c
index 92bfa84..81bb896 100644
--- a/contrib/unbound/smallapp/unbound-anchor.c
+++ b/contrib/unbound/smallapp/unbound-anchor.c
@@ -95,7 +95,7 @@
* signed yet; avoids attacks on system clock). The
* last-successful-RFC5011-probe (if available) has to be more than 30 days
* in the past (otherwise, RFC5011 should have worked). This keeps
- * unneccesary https traffic down. If the main certificate is expired, it
+ * unnecessary https traffic down. If the main certificate is expired, it
* fails.
*
* The dates on the keys in the xml are checked (uses the libexpat xml
@@ -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);
}
OpenPOWER on IntegriCloud