Merge branch 'fix-solaris-11'

This commit is contained in:
Daniele Varrazzo 2018-02-19 11:43:59 +00:00
commit 750ececf08
3 changed files with 14 additions and 1 deletions

7
NEWS
View File

@ -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
^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -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) */

View File

@ -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) */