Turns out that I've done the patch for the outdated version of the shell script. This new version is the same as before but put one of the lines to a different spot.
Also, I've ran test-patch locally and all seems to be ok:
There appear to be 125 release audit warnings before the patch and 125 release audit warnings after applying the patch.
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 4 new or modified tests.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
I've started ant clover test run locally and now it passes without a glitch, i.e. c++ compilation is went through and libhdfs test has passed.