summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS7
-rw-r--r--psycopg/solaris_support.c5
-rw-r--r--psycopg/solaris_support.h3
3 files changed, 14 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index c400f24..dfee39c 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,13 @@ Other changes:
without using 2to3.
+What's new in psycopg 2.7.5
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- Fixed building on Solaris 11 and derivatives such as SmartOS and illumos
+ (:ticket:`#677`)
+
+
What's new in psycopg 2.7.4
^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/psycopg/solaris_support.c b/psycopg/solaris_support.c
index cf82e2e..e5f8edf 100644
--- a/psycopg/solaris_support.c
+++ b/psycopg/solaris_support.c
@@ -1,6 +1,7 @@
/* solaris_support.c - emulate functions missing on Solaris
*
* Copyright (C) 2017 My Karlsson <mk@acc.umu.se>
+ * Copyright (c) 2018, Joyent, Inc.
*
* This file is part of psycopg.
*
@@ -28,7 +29,8 @@
#include "psycopg/solaris_support.h"
#if defined(__sun) && defined(__SVR4)
-/* timeradd is missing on Solaris */
+/* timeradd is missing on Solaris 10 */
+#ifndef timeradd
void
timeradd(struct timeval *a, struct timeval *b, struct timeval *c)
{
@@ -51,4 +53,5 @@ timersub(struct timeval *a, struct timeval *b, struct timeval *c)
c->tv_sec -= 1;
}
}
+#endif /* timeradd */
#endif /* defined(__sun) && defined(__SVR4) */
diff --git a/psycopg/solaris_support.h b/psycopg/solaris_support.h
index 33c2f2b..880e9f1 100644
--- a/psycopg/solaris_support.h
+++ b/psycopg/solaris_support.h
@@ -1,6 +1,7 @@
/* solaris_support.h - definitions for solaris_support.c
*
* Copyright (C) 2017 My Karlsson <mk@acc.umu.se>
+ * Copyright (c) 2018, Joyent, Inc.
*
* This file is part of psycopg.
*
@@ -30,8 +31,10 @@
#if defined(__sun) && defined(__SVR4)
#include <sys/time.h>
+#ifndef timeradd
extern HIDDEN void timeradd(struct timeval *a, struct timeval *b, struct timeval *c);
extern HIDDEN void timersub(struct timeval *a, struct timeval *b, struct timeval *c);
#endif
+#endif
#endif /* !defined(PSYCOPG_SOLARIS_SUPPORT_H) */