Skip to content

Commit 28edbdb

Browse files
committed
Add workaround so MSVC doesn't try to load strings.h, which it doesn't
have. This happens when MSVC uses pg_config.h generated by MinGW. Per report from Charles F. I. Savage
1 parent 523adeb commit 28edbdb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/include/c.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
15-
* $PostgreSQL: pgsql/src/include/c.h,v 1.196 2006/02/16 23:23:50 petere Exp $
15+
* $PostgreSQL: pgsql/src/include/c.h,v 1.197 2006/03/03 21:35:46 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -66,7 +66,8 @@
6666
#include <string.h>
6767
#include <stddef.h>
6868
#include <stdarg.h>
69-
#ifdef HAVE_STRINGS_H
69+
/* Some use MinGW-generated pg_config.h but MSVC for extensions. */
70+
#if defined(HAVE_STRINGS_H) && !defined(WIN32_CLIENT_ONLY)
7071
#include <strings.h>
7172
#endif
7273
#include <sys/types.h>

0 commit comments

Comments
 (0)