C90 doesn't like declarations intermingled with statements So move all of the declarations to the top of the offending function. This patch includes both of issues (Fixes:), from @jeking3 and @pprindeville Fixes: #418 Fixes: nmathewson/Libevent#136