Based on a patch by Luiz Angelo Daros de Luca Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 43421