1
0
mirror of https://github.com/janet-lang/janet synced 2026-04-25 00:01:26 +00:00

fix multicast on illumos (#1717)

illumos, like BSD, expects IP_MULTICAST_TTL to be
an unsigned char
This commit is contained in:
R Fisher
2026-02-20 13:30:30 +00:00
committed by GitHub
parent fc725e2511
commit ea997d585b

View File

@@ -1122,7 +1122,7 @@ JANET_CORE_FN(cfun_net_setsockopt,
val.v_int = janet_getboolean(argv, 2);
optlen = sizeof(val.v_int);
} else if (st->type == JANET_NUMBER) {
#ifdef JANET_BSD
#if defined(JANET_BSD) || defined(JANET_ILLUMOS)
int v_int = janet_getinteger(argv, 2);
if (st->optname == IP_MULTICAST_TTL) {
val.v_uchar = v_int;