1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-01 04:19:55 +00:00

Attempting some more windows related fixes.

This commit is contained in:
llmII 2021-09-06 19:26:33 -05:00
parent 1597ca0de5
commit 7217caacd1
No known key found for this signature in database
GPG Key ID: E3AD2E259F58A9A0

View File

@ -588,7 +588,9 @@ union sockaddr_arg {
struct sockaddr_in *c_sin;
struct sockaddr_in6 *sin6;
struct sockaddr_in6 *c_sin6;
#ifndef JANET_WINDOWS
struct sockaddr_un *sun;
#endif
struct sockaddr_un *c_sun;
union sockaddr_any *any;
union sockaddr_any *c_any;
@ -602,7 +604,9 @@ union sockaddr_any {
struct sockaddr_storage ss;
struct sockaddr_in sin;
struct sockaddr_in6 sin6;
#ifndef JANET_WINDOWS
struct sockaddr_un sun;
#endif
};
static inline union sockaddr_arg sockaddr_ref(void *arg) {
@ -670,6 +674,7 @@ char *sa_ntop(char *dst, size_t lim, const void *src, const char *def, int *_err
goto syerr;
break;
#ifndef JANET_WINDOWS
case AF_UNIX:
unspec = "/nonexistent";
@ -677,6 +682,7 @@ char *sa_ntop(char *dst, size_t lim, const void *src, const char *def, int *_err
memcpy(text, any->sun.sun_path, SO_MIN(sizeof text - 1, sizeof any->sun.sun_path));
break;
#endif
default:
error = EAFNOSUPPORT;