# std: fix pthread\_\{get,set\}name_np return type ABI · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/a1777cb5cb378374377fd1c5e37bef9292b90910)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: a1777cb5cb378374377fd1c5e37bef9292b90910

Requested commit: a1777cb5cb378374377fd1c5e37bef9292b90910

Commit: a1777cb5cb378374377fd1c5e37bef9292b90910

Tree: 01d5ca0d0657672a8ac28ef0a2d558f21d79a4f7

Author: Isaac Freund

Committer: Isaac Freund

## Message

```
std: fix pthread_{get,set}name_np return type ABI

I believe this was accidentally broken when the E enum for errno values
was introduces. These functions are quite the special case in that they
return the error value directly rather than returning -1 and passing the
error value through the errno variable.

In any case, using a u16 as the return type at the ABI boundary where a
c_int is expected is asking for trouble.

```

## Parents

- [687a756bf9b443ae53aa6dc3ee8f4a1550a09597](https://git.cafe/gitcafe/zig/commit/687a756bf9b443ae53aa6dc3ee8f4a1550a09597?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/a1777cb5cb378374377fd1c5e37bef9292b90910?format=markdown)
