Forward port patches and add a patch to fix compiler warnings Signed-off-by: Khem Raj <raj.khem@gmail.com>