Within the fd_t type both _length and eof are marked mutable and then used in const expressions which change their value.
This should be corrected by removing the mutable marking from them and then also removing the const from the methods which assign to them.
I've not checked to see if this is also a problem in other parts but a through check would be ideal.