CLOEXEC on old Linux kernel.

2022-05-10 Thread AlexKotik
After reading some Nim code from stdlib, I think I can get away by defining SOCK_CLOEXEC to 0. What do you think? I could pass -DSOCK_CLOEXEC=0 to a C compiler, but I was thinking if I could do it using Nim. I've created fixups.nim file with: > {. emit(""" > > #ifndef SOCK_CLOEXEC > #defin

CLOEXEC on old Linux kernel.

2022-05-03 Thread AlexKotik
Hello. I'm trying to make async sockets work on old embedded system with an old Linux kernel (2.4 brunch) and SOCK_CLOEXEC/O_CLOEXEC appeared in 2.6 brunch according to manuals. Nativesockets in Nim are using CLOEXEC internally when creating a socket. I'd like to use asyncnet for async sockets a