mirror of https://github.com/postgres/postgres
<sys/un.h> is in SUSv3 and every targeted Unix has it. Some Windows tool chains may still lack the approximately equivalent header <afunix.h>, so we already defined struct sockaddr_un ourselves on that OS for now. To harmonize things a bit, move our definition into a new header src/include/port/win32/sys/un.h. HAVE_UNIX_SOCKETS is now defined unconditionally. We migh remove that in a separate commit, pending discussion. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com> Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://postgr.es/m/CA%2BhUKG%2BL_3brvh%3D8e0BW_VfX9h7MtwgN%3DnFHP5o7X2oZucY9dg%40mail.gmail.compull/102/head
parent
75357ab940
commit
077bf2f275
@ -0,0 +1,17 @@ |
|||||||
|
/*
|
||||||
|
* src/include/port/win32/sys/un.h |
||||||
|
*/ |
||||||
|
#ifndef WIN32_SYS_UN_H |
||||||
|
#define WIN32_SYS_UN_H |
||||||
|
|
||||||
|
/*
|
||||||
|
* Windows defines this structure in <afunix.h>, but not all tool chains have |
||||||
|
* the header yet, so we define it here for now. |
||||||
|
*/ |
||||||
|
struct sockaddr_un |
||||||
|
{ |
||||||
|
unsigned short sun_family; |
||||||
|
char sun_path[108]; |
||||||
|
}; |
||||||
|
|
||||||
|
#endif |
||||||
Loading…
Reference in new issue