mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 17:34:08 +03:00
Windows MSVC: Fix Compiler Warning: getpid
Fix a compiler warning when using PSYCOPG_DEBUG on MSVC where getpid is undefined.
This commit is contained in:
parent
631883f62f
commit
961e855bbd
|
@ -51,6 +51,10 @@ extern HIDDEN int psycopg_debug_enabled;
|
||||||
#else /* !__GNUC__ or __APPLE__ */
|
#else /* !__GNUC__ or __APPLE__ */
|
||||||
#ifdef PSYCOPG_DEBUG
|
#ifdef PSYCOPG_DEBUG
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <process.h>
|
||||||
|
#define getpid _getpid
|
||||||
|
#endif
|
||||||
static void Dprintf(const char *fmt, ...)
|
static void Dprintf(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user