[Nut-upsdev] [nut-commits] svn commit r3226 - trunk/tools/nut-scanner

Charles Lepple clepple at ghz.cc
Wed Sep 14 13:05:50 UTC 2011


On Sep 14, 2011, at 8:55 AM, Frédéric Bohé wrote:

> On Wed, 2011-09-14 at 12:25 +0000, Charles Lepple wrote:
>> Author: clepple-guest
>> Date: Wed Sep 14 12:25:03 2011
>> New Revision: 3226
>> URL: http://trac.networkupstools.org/projects/nut/changeset/3226
>>
>> Log:
>> Include <string.h> for nut-scanner
>>
>> Modified:
>>   trunk/tools/nut-scanner/scan_snmp.c
>>   trunk/tools/nut-scanner/scan_usb.c
>>
>> Modified: trunk/tools/nut-scanner/scan_snmp.c
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =
>> =====================================================================
>> --- trunk/tools/nut-scanner/scan_snmp.c	Wed Sep 14 12:24:58 2011	 
>> (r3225)
>> +++ trunk/tools/nut-scanner/scan_snmp.c	Wed Sep 14 12:25:03 2011	 
>> (r3226)
>> @@ -26,6 +26,7 @@
>> #include <netinet/in.h>
>> #include <arpa/inet.h>
>> #include <stdio.h>
>> +#include <string.h>
>>
>> /* workaround for buggy Net-SNMP config
>>  * from drivers/snmp-ups.h */
>
> If it's for strndup, I fear it will not be enough. AFAIK strndup is  
> not
> in standard C library on our Solaris version. I have just made some
> changes to avoid calling strndup, not committed yet.

strdup and memset, too:

http://buildbot.networkupstools.org/public/nut/builders/MacOSX-10.5-x86/builds/325/steps/compile/logs/warnings


More information about the Nut-upsdev mailing list