[erlang-patches] Fix build on systems without syslog.h

Matt Lewandowsky matt@REDACTED
Thu Sep 12 08:45:24 CEST 2013


Hello,

I have fixed the build for systems which lack syslog.h. I have no way to test the changes on VxWorks, but considering that the change is identical for Windows and VxWorks, I can't foresee any breakage there.

Specifically, the issue is that configure generates a config.h which defines a standard HAVE_SYSLOG_H if syslog.h is available, but the current approach in the source is to look for the absence of a NO_SYSLOG define. As the logic of HAVE_SYSLOG_H is cleaner, and less work than testing configure.in changes on various platforms, I opted for that approach.

Additionally, I noticed that LOG_ERR is used and is obviously undefined if there is no syslog.h. This causes the build to fail on a standard POSIX-like system without syslog.h. As LOG_ERR isn't used in the case of a system without syslog.h, a simple define to NULL corrects the issue.

https://github.com/erlang/otp/pull/76

git fetch git://github.com/lewellyn/otp.git nosyslog

https://github.com/lewellyn/otp/compare/erlang:maint...nosyslog
https://github.com/lewellyn/otp/compare/erlang:maint...nosyslog.patch

Thanks,

--Matt

-- 
Matt Lewandowsky
Big Geek
Greenviolet
matt@REDACTED http://www.greenviolet.net
+1 415 578 5782 (US) +44 844 484 8254 (UK)



More information about the erlang-patches mailing list