Summary: | errno.h does not define ETIME | ||
---|---|---|---|
Product: | Base System | Reporter: | Val Packett <val> |
Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> |
Status: | New --- | ||
Severity: | Affects Only Me | CC: | dch, emaste, jfolker11, nishida, rozhuk.im |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any | ||
Bug Depends on: | |||
Bug Blocks: | 273422 |
Description
Val Packett
2018-01-19 18:52:49 UTC
Other userland software doesn't compile for this reason, e.g. https://github.com/IAIK/meltdown/issues/14 The "solution" there was: #ifndef ETIME #define ETIME 62 #endif which seems strictly worse than either of the two options you describe. Debian Code Search returns 3470 (Debian) packages referencing ETIME, https://codesearch.debian.net/search?q=ETIME Some of these are going to cause grief if we start defining ETIME, e.g.: libreoffice_1:5.4.3-4/sal/osl/unx/system.hxx #ifdef FREEBSD # define ETIME ETIMEDOUT # include <pthread.h> # include <sys/sem.h> so it seems like the first thing we'll want to do is perform a ports exp-run with ETIME defined (In reply to Ed Maste from comment #1) Yeah, the ones that define it to ETIMEDOUT when __FreeBSD__ is defined, as opposed to when ETIME is undefined, are going to cause the most pain with the second option. I'm looking at porting a QUIC library, https://github.com/microsoft/msquic which amongst other Linuxisms, also wants ETIME. Is there any preferred way to accommodate this for a port-specific patch? atm I just used ETIMEDOUT as a close approximation. QUIC picks 62, or 101, depending on the OS. Rather than go through the trouble of modifying the kernel and libc, have you considered using lsquic instead of msquic? https://github.com/litespeedtech/lsquic It's also MIT licensed like msquic, but unlike msquic the docs say it's tested on FreeBSD and also tested on ARM architecture as well as both 32-bit and 64-bit architectures. They build and run their automated tests against FreeBSD platforms, and I was able to get it up and running without much trouble on my 13.0 setup. You need to build BoringSSL first as the README says, but make sure you don't install it under /usr/local, or else you'll stomp OpenSSL. (In reply to Dave Cottlehuber from comment #3) I'm also trying to build msquic now and having the same issue. I'll replace it with ETIMEDOUT but please post any feedback on building msquic maybe somewhere. Thanks. |