File tree 3 files changed +25
-1
lines changed
3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 29
29
# include <ws2tcpip.h>
30
30
# include <mswsock.h>
31
31
# include "win32defs.h"
32
- # include <afunix.h>
32
+ # include "afunix_compat.h"
33
33
# define IPV6_V6ONLY 27
34
34
#endif
35
35
Original file line number Diff line number Diff line change
1
+ /* The version of afunix.h provided by the version of MSYS2 included with x86
2
+ * versions of GHC before GHC 9.2 excludes certain components introduced with
3
+ * Windows Vista.
4
+ */
5
+
6
+ #ifndef AFUNIX_COMPAT_H
7
+ #define AFUNIX_COMPAT_H
8
+
9
+ #if defined(_AFUNIX_ ) || !defined(_WIN32 ) || __GLASGOW_HASKELL__ > 902
10
+ # include <afunix.h>
11
+ #else
12
+
13
+ #define UNIX_PATH_MAX 108
14
+
15
+ typedef struct sockaddr_un {
16
+ ADDRESS_FAMILY sun_family ;
17
+ char sun_path [UNIX_PATH_MAX ];
18
+ } SOCKADDR_UN , * PSOCKADDR_UN ;
19
+
20
+ #define SIO_AF_UNIX_GETPEERPID _WSAIOR(IOC_VENDOR, 256)
21
+
22
+ #endif /* GHC version check */
23
+ #endif /* AFUNIX_COMPAT_H */
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ extra-source-files:
66
66
include/HsNetworkConfig.h.in
67
67
include/HsNet.h
68
68
include/HsNetDef.h
69
+ include/afunix_compat.h
69
70
cbits/asyncAccept.c
70
71
cbits/initWinSock.c
71
72
cbits/winSockErr.c
You can’t perform that action at this time.
0 commit comments