use constant for ip kind (#151)
IPV6_MULTICAST_HOPS already declared in posix.nim while IP_MULTICAST_TTL has a value that will stay constant on linux/x86_64 - better codegen and nlvm compat like this.
This commit is contained in:
parent
c1f6e7276e
commit
e7f5f855ab
|
@ -15,10 +15,11 @@ when defined(windows):
|
||||||
import winlean
|
import winlean
|
||||||
else:
|
else:
|
||||||
import posix
|
import posix
|
||||||
|
when (defined(linux) and not defined(android)) and defined(amd64):
|
||||||
|
const IP_MULTICAST_TTL: cint = 33
|
||||||
|
else:
|
||||||
var IP_MULTICAST_TTL* {.importc: "IP_MULTICAST_TTL",
|
var IP_MULTICAST_TTL* {.importc: "IP_MULTICAST_TTL",
|
||||||
header: "<netinet/in.h>".}: cint
|
header: "<netinet/in.h>".}: cint
|
||||||
var IPV6_MULTICAST_HOPS* {.importc: "IPV6_MULTICAST_HOPS",
|
|
||||||
header: "<netinet/in.h>".}: cint
|
|
||||||
|
|
||||||
type
|
type
|
||||||
VectorKind = enum
|
VectorKind = enum
|
||||||
|
|
Loading…
Reference in New Issue