"having to" or "being have to"

Hi

Would anyone please explain to me which of below sentences is correct?

I resented having to work such long hours.

or

I resented being have to work such long hours.

first one

second one is kind of passive - but would be ‘I resented being made to work’ I dont think ‘have to’ can be passive.

I resented what have to work such long hours. => i resented having to work such long hours.

right ?

No, I can’t understand your first sentence.
I agree that “I resented having to work such long hours” is correct though.