There are different ETOPS, 120 minutes, 180 minutes, etc. You have to be within that flight time of a suitable airfield.
IIRC Boeing funded an appropriate landing strip out in the middle of the Pacific to meet ETOPS requirements for the 777.