Merge "Cherrypick a change to drop getcwd prototypes." am: 4367cc55b9
am: 5245bb626d

Change-Id: Ib65c19271ca949fbc9bbc621a8b2e0c5885cf424