serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibJS+LibCore: Some BSD Compatibility updates

Open ADKaster opened this issue 1 year ago • 1 comments
trafficstars

NetBSD and FreeBSD get upset when we don't set the fd to an invalid value when using a non-shared mapping.

FreeBSD and NetBSD don't have secure_getenv(3), same as macOS. FreeBSD 13 and lower also don't allow setting environ pointers to null.

Ref: #23375

cc @0-wiz-0 cc @clausecker

ADKaster avatar May 09 '24 18:05 ADKaster

Correction: FreeBSD 14 and above do have secure_getenv. All FreeBSD versions allow clearing the environment by setting environ to NULL, but only FreeBSD 14 and above have clearenv.

clausecker avatar May 09 '24 22:05 clausecker