[Nut-upsdev] [PATCH] Support for ASEM UPS on Linux/i2c

Charles Lepple clepple at gmail.com
Wed Jul 9 01:46:27 UTC 2014


On Jul 8, 2014, at 3:29 AM, Giuseppe Corbelli <giuseppe.corbelli at copanitalia.com> wrote:

> Seems that on x64 architectures NULL is not #defined in <stddef.h>
> the attached patch #includes <stdio.h> in AC_CHECK_DECLS. Tested on an ubuntu 12.10 x64, seems to solve the issue.

I am a little confused as to how you are testing this :-)

The driver still wouldn't compile on Ubuntu 14.04 with libi2c-dev. The "#if HAVE_LINUX_I2C_DEV_H" won't be satisfied until after config.h is included (typically by main.h). Since the driver won't even be compiled if WITH_LINUX_I2C is not defined, I took out the #if wrapper.

Also, since the intermediate commits aren't terribly useful, I'll collapse the asem_i2c_take2 branch into a single commit before merging to master. Here is the branch as it stands:

https://github.com/networkupstools/nut/compare/asem_i2c_take2

-- 
Charles Lepple
clepple at gmail






More information about the Nut-upsdev mailing list