summaryrefslogtreecommitdiff
path: root/src/include/libpq/pqcomm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/libpq/pqcomm.h')
-rw-r--r--src/include/libpq/pqcomm.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h
index 1aa8444a9a..dbe6761576 100644
--- a/src/include/libpq/pqcomm.h
+++ b/src/include/libpq/pqcomm.h
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: pqcomm.h,v 1.41 2000/01/26 05:58:12 momjian Exp $
+ * $Id: pqcomm.h,v 1.42 2000/09/27 15:17:56 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,11 +20,22 @@
#include <sys/types.h>
#ifdef WIN32
-#include "winsock.h"
-#else
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <netinet/in.h>
+# include "winsock.h"
+#else /* not WIN32 */
+# include <sys/socket.h>
+# ifdef HAVE_SYS_UN_H
+# include <sys/un.h>
+# endif
+# include <netinet/in.h>
+#endif /* not WIN32 */
+
+
+#ifndef HAVE_STRUCT_SOCKADDR_UN
+struct sockaddr_un
+{
+ short int sun_family; /* AF_UNIX */
+ char sun_path[108]; /* path name (gag) */
+};
#endif
/* Define a generic socket address type. */
@@ -33,9 +44,7 @@ typedef union SockAddr
{
struct sockaddr sa;
struct sockaddr_in in;
-#ifndef WIN32
struct sockaddr_un un;
-#endif
} SockAddr;