"Don't you have anything to do, or what?"
Translation:Hast du nichts zu tun, oder was?
machen and tun mean exactly the same thing.
They do not.
For example, you can deine Hausaufgaben machen (do your homework) but you can't deine Hausaufgaben tun (which would be as odd as "make your homework").
The two overlap but are not identical or always interchangeable.
And in this case, nichts zu tun haben is fine but nichts zu machen haben is bizarre, at least for me.