This story appeared to be longer, ksh uses a c program to configure itself and this configuration program is broken, resulting in errornous headers. Here is a better patch that replaces that part of the configration that causes trouble. Produces a functional ksh and is less magical compared to the previous attempt.
-- Antti Järvinen
ksh-gcc5-unified.patch
Description: fix for ksh configuration script to be used with gcc5