Gitweb:
http://git.exim.org/exim.git/commitdiff/9acf6b941e1356590e94e8e4a0bcf5dd3318087c
Commit: 9acf6b941e1356590e94e8e4a0bcf5dd3318087c
Parent: 0eb9153b250c9569733efaf67e4fd1a3588faa5e
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Mon Sep 29 11:50:06 2014 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Mon Sep 29 11:50:06 2014 +0100
Fix Solaris build
---
src/src/os.c | 33 +++++++++++++++++++++++++++++++++
src/src/tlscert-openssl.c | 2 +-
2 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/src/src/os.c b/src/src/os.c
index 6e02b8f..2b6f79c 100644
--- a/src/src/os.c
+++ b/src/src/os.c
@@ -836,6 +836,39 @@ os_get_dns_resolver_res(void)
/* ----------------------------------------------------------------------- */
+/***********************************************************
+* Time-related functions *
+***********************************************************/
+
+/* At least Solaris, and probably others, don't have this */
+
+#ifndef _BSD_SOURCE
+
+# include <time.h>
+# include <stdlib.h>
+
+time_t
+timegm(struct tm * tm)
+{
+time_t ret;
+char *tz;
+
+tz = getenv("TZ");
+setenv("TZ", "", 1);
+tzset();
+ret = mktime(tm);
+if (tz)
+ setenv("TZ", tz, 1);
+else
+ unsetenv("TZ");
+tzset();
+return ret;
+}
+
+#endif
+
+/* ----------------------------------------------------------------------- */
+
diff --git a/src/src/tlscert-openssl.c b/src/src/tlscert-openssl.c
index a57980d..9444b6d 100644
--- a/src/src/tlscert-openssl.c
+++ b/src/src/tlscert-openssl.c
@@ -344,7 +344,7 @@ while (sk_GENERAL_NAME_num(san) > 0)
if (ele[len]) /* not nul-terminated */
ele = string_copyn(ele, len);
- if (strnlen(CS ele, len) == len) /* ignore any with embedded nul */
+ if (Ustrlen(ele) == len) /* ignore any with embedded nul */
list = string_append_listele(list, sep,
match == -1 ? string_sprintf("%s=%s", tag, ele) : ele);
}