`return &File{fd: fd, name: name}`

seems like a good way to do it to me. The named fields solve the problems associated with the current way you are doing it.