Try build with third update to time.h for osm2pgsql and libmingle. Few updates to undefine old types.