summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-02-19 11:43:59 +0000
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-02-19 11:43:59 +0000
commit750ececf0850d6a14dc97885c17426915340eed6 (patch)
tree4af0e12157571dd05e506eea5f9411bd0cbd81c7
parentdf952c149da2a3a7574c54a8a62c791211223270 (diff)
parent8670287928501edf0d3868cf468a6796ad841b50 (diff)
downloadpsycopg2-750ececf0850d6a14dc97885c17426915340eed6.tar.gz
Merge branch 'fix-solaris-11'
-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) */