Set ethernet hostname

How one can set DHCP name using Ethernet API? I cannot find setHostname() or similar.

No, the API doesn't allow that. The mentioned pull request would add such a feature to the Ethernet library but it wan't merged yet as far as I know.

The pull requests you mentioned are even older and were probably replaced by the one above.

I can understand that arduino.cc is cautious with the pull requests as it might pose a lot of problems in using the library for a functionality very seldom needed (other than for narcissistic reasons).