Passing and returning structs by value has been part of C since C89. Most compilers pass small structs in individual registers, and nowadays with LTO they'll even elide the copy of bigger ones if they can. What's definitely the case though is that by-value structs weren't a common thing when most of the Unix API was written.
[–] cowlevel 2 days ago
[–] chuckadams 1 day ago
[–] kps 1 day ago