Hey Jan,

Applied the slightly modified attached patch.

Al

On Mon, 2009-03-09 at 17:48 +0100, Jan Forch wrote:
> Hi experts,
> I am sending patches which had to be applied on unzipped 
> freeipmi-0.7.4.tar.gz source files else
> FreeIPMI doesn't work properly on Solaris. I attached some comments 
> (##### blocks) to them to
> understand purpose of changes easily. Feel free to send me a feedback. 
> In case someone is aware
> of some other places in the source files where similar bug is presented 
> please share it!
> Thanks, have a nice day ;-)
>    Jan Forch, Sun Microsystems
> 
> -----------------------------------------------------------------------------------------------------
> | List of patche files aplied on unzipped freeipmi-0.7.4.tar.gz source 
> files.
> -----------------------------------------------------------------------------------------------------
>  > ls
> freeipmi2.patch  freeipmi.patch
> 
> PATCHES:
> ####################################################################################
> # 1) freeipmi.patch
> # The problem is that the behavior of the function getpwuid_r (...)  is 
> different on Solaris and Linux.
> # On Linux function returns 0 in case that everything is OK and not 0 
> value as an error number.
> # But on Solaris returns NULL in case of error and pointer if it was 
> successful.
> # So != had to be changed to ==.
> ####################################################################################
>  > cat freeipmi.patch
> diff -ru 
> ../freeipmi-0.7.4_orig/common/src/toolcommon/tool-sdr-cache-common.c 
> ./common/src/toolcommon/tool-sdr-cache-common.c
> --- 
> ../freeipmi-0.7.4_orig/common/src/toolcommon/tool-sdr-cache-common.c        
> Tue Jan  6 07:09:05 2009
> +++ ./common/src/toolcommon/tool-sdr-cache-common.c     Thu Jan  8 
> 02:04:15 2009
> @@ -229,8 +229,9 @@
>    if (getpwuid_r (user_id,
>                    &pwd,
>                    tbuf,
> -                  tbuf_len) != 0)
> +                  tbuf_len) == NULL)
>      {
> +      /* User not found or another error */
>        PSTDOUT_PERROR(pstate, "getpwuid_r");
>        return -1;
>      }
> 
> 
> ####################################################################################
> # 1) freeipmi2.patch
> # Almost same as the first one. But changes had to be made in two places 
> in the source file.
> ####################################################################################
>  > cat freeipmi2.patch
> diff -ru ../freeipmi-0.7.4_orig/libfreeipmi/src/api/ipmi-api.c 
> ./libfreeipmi/src/api/ipmi-api.c
> --- ../freeipmi-0.7.4_orig/libfreeipmi/src/api/ipmi-api.c       Tue Jan  
> 6 07:09:04 2009
> +++ ./libfreeipmi/src/api/ipmi-api.c    Mon Jan 12 09:34:54 2009
> @@ -274,11 +274,11 @@
>                                                      &h_errnop));
>    API_ERR_HOSTNAME_INVALID_CLEANUP(hptr);
>  #elif defined(HAVE_FUNC_GETHOSTBYNAME_R_5)
> -  API_ERR_HOSTNAME_INVALID_CLEANUP(!gethostbyname_r(hostname,
> +  API_ERR_HOSTNAME_INVALID_CLEANUP(gethostbyname_r(hostname,
>                                                      &hent,
>                                                      buf,
>                                                      
> GETHOSTBYNAME_AUX_BUFLEN,
> -                                                    &h_errnop));
> +                                                    &h_errnop) != NULL);
>  #else  /* !HAVE_FUNC_GETHOSTBYNAME_R */
>    API_ERR_HOSTNAME_INVALID_CLEANUP(!freeipmi_gethostbyname_r(hostname,
>                                                               &hent,
> @@ -419,11 +419,11 @@
>                                                      &h_errnop));
>    API_ERR_HOSTNAME_INVALID_CLEANUP(hptr);
>  #elif defined(HAVE_FUNC_GETHOSTBYNAME_R_5)
> -  API_ERR_HOSTNAME_INVALID_CLEANUP(!gethostbyname_r(hostname,
> +  API_ERR_HOSTNAME_INVALID_CLEANUP(gethostbyname_r(hostname,
>                                                      &hent,
>                                                      buf,
>                                                      
> GETHOSTBYNAME_AUX_BUFLEN,
> -                                                    &h_errnop));
> +                                                    &h_errnop) != NULL);
>  #else  /* !HAVE_FUNC_GETHOSTBYNAME_R */
>    API_ERR_HOSTNAME_INVALID_CLEANUP(!freeipmi_gethostbyname_r(hostname,
>                                                               &hent,
> _______________________________________________
> Freeipmi-users mailing list
> freeipmi-us...@gnu.org
> http:// lists.gnu.org/mailman/listinfo/freeipmi-users
> 
-- 
Albert Chu
ch...@llnl.gov
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
? Makefile
? Makefile.in
? aclocal.m4
? autom4te.cache
? conf.patch
? config.log
? config.patch
? config.status
? configure
? cscope.files
? cscope.out
? foo.patch
? freeipmi-0.7.5.tar.gz
? freeipmi-0.7.6
? freeipmi.spec
? libtool
? more
? patch1.patch
? patch2.patch
? solaris_port.patch
? workaround.patch2
? bmc-config/Makefile
? bmc-config/Makefile.in
? bmc-config/bmc-config.8
? bmc-config/bmc-config.8.pre
? bmc-config/bmc-config.conf.5
? bmc-config/bmc-config.conf.5.pre
? bmc-config/src/.deps
? bmc-config/src/.libs
? bmc-config/src/Makefile
? bmc-config/src/Makefile.in
? bmc-config/src/bmc-config
? bmc-device/Makefile
? bmc-device/Makefile.in
? bmc-device/bmc-device.8
? bmc-device/bmc-device.8.pre
? bmc-device/src/.deps
? bmc-device/src/.libs
? bmc-device/src/Makefile
? bmc-device/src/Makefile.in
? bmc-device/src/bmc-device
? bmc-info/Makefile
? bmc-info/Makefile.in
? bmc-info/bmc-info.8
? bmc-info/bmc-info.8.pre
? bmc-info/src/.deps
? bmc-info/src/.libs
? bmc-info/src/Makefile
? bmc-info/src/Makefile.in
? bmc-info/src/bmc-info
? bmc-info/src/comment.patch
? bmc-watchdog/Makefile
? bmc-watchdog/Makefile.in
? bmc-watchdog/bmc-watchdog.8
? bmc-watchdog/bmc-watchdog.8.pre
? bmc-watchdog/src/.deps
? bmc-watchdog/src/.libs
? bmc-watchdog/src/Makefile
? bmc-watchdog/src/Makefile.in
? bmc-watchdog/src/bmc-watchdog
? common/Makefile
? common/Makefile.in
? common/man/Makefile
? common/man/Makefile.in
? common/src/Makefile
? common/src/Makefile.in
? common/src/configtool/.deps
? common/src/configtool/.libs
? common/src/configtool/Makefile
? common/src/configtool/Makefile.in
? common/src/configtool/libconfigtoolcommon.la
? common/src/configtool/libconfigtoolcommon_la-config-tool-argp.lo
? common/src/configtool/libconfigtoolcommon_la-config-tool-checkout.lo
? common/src/configtool/libconfigtoolcommon_la-config-tool-comment.lo
? common/src/configtool/libconfigtoolcommon_la-config-tool-commit.lo
? common/src/configtool/libconfigtoolcommon_la-config-tool-diff.lo
? common/src/configtool/libconfigtoolcommon_la-config-tool-parse.lo
? common/src/configtool/libconfigtoolcommon_la-config-tool-pef-conf-section.lo
? common/src/configtool/libconfigtoolcommon_la-config-tool-section.lo
? common/src/configtool/libconfigtoolcommon_la-config-tool-utils.lo
? common/src/configtool/libconfigtoolcommon_la-config-tool-validate.lo
? common/src/debugutil/.deps
? common/src/debugutil/.libs
? common/src/debugutil/Makefile
? common/src/debugutil/Makefile.in
? common/src/debugutil/libdebugutil.la
? common/src/debugutil/libdebugutil_la-debug-util.lo
? common/src/miscutil/.deps
? common/src/miscutil/.libs
? common/src/miscutil/Makefile
? common/src/miscutil/Makefile.in
? common/src/miscutil/cbuf.lo
? common/src/miscutil/conffile.lo
? common/src/miscutil/error.lo
? common/src/miscutil/fd.lo
? common/src/miscutil/hash.lo
? common/src/miscutil/hostlist.lo
? common/src/miscutil/libmiscutils.la
? common/src/miscutil/list.lo
? common/src/miscutil/secure.lo
? common/src/miscutil/thread.lo
? common/src/miscutil/timeval.lo
? common/src/pingtool/.deps
? common/src/pingtool/.libs
? common/src/pingtool/Makefile
? common/src/pingtool/Makefile.in
? common/src/pingtool/libpingtoolcommon.la
? common/src/pingtool/libpingtoolcommon_la-ping-tool-common.lo
? common/src/portability/.deps
? common/src/portability/.libs
? common/src/portability/Makefile
? common/src/portability/Makefile.in
? common/src/portability/freeipmi-portability.lo
? common/src/portability/libfreeipmiportability.la
? common/src/toolcommon/.deps
? common/src/toolcommon/.libs
? common/src/toolcommon/Makefile
? common/src/toolcommon/Makefile.in
? common/src/toolcommon/libtoolcommon.la
? common/src/toolcommon/libtoolcommon_la-tool-cmdline-common.lo
? common/src/toolcommon/libtoolcommon_la-tool-common.lo
? common/src/toolcommon/libtoolcommon_la-tool-config-file-common.lo
? common/src/toolcommon/libtoolcommon_la-tool-sdr-cache-common.lo
? common/src/toolcommon/libtoolcommon_la-tool-sensor-common.lo
? common/src/toolhostrange/.deps
? common/src/toolhostrange/.libs
? common/src/toolhostrange/Makefile
? common/src/toolhostrange/Makefile.in
? common/src/toolhostrange/libtoolhostrange.la
? common/src/toolhostrange/libtoolhostrange_la-pstdout.lo
? common/src/toolhostrange/libtoolhostrange_la-tool-hostrange-common.lo
? config/compile
? config/config.guess
? config/config.h
? config/config.h.in
? config/config.sub
? config/depcomp
? config/install-sh
? config/ltmain.sh
? config/mdate-sh
? config/missing
? config/texinfo.tex
? contrib/Makefile
? contrib/Makefile.in
? contrib/ganglia/Makefile
? contrib/ganglia/Makefile.in
? contrib/nagios/Makefile
? contrib/nagios/Makefile.in
? doc/Makefile
? doc/Makefile.in
? doc/freeipmi-faq.info
? doc/stamp-vti
? doc/version-faq.texi
? etc/Makefile
? etc/Makefile.in
? ipmi-chassis/Makefile
? ipmi-chassis/Makefile.in
? ipmi-chassis/ipmi-chassis.8
? ipmi-chassis/ipmi-chassis.8.pre
? ipmi-chassis/src/.deps
? ipmi-chassis/src/.libs
? ipmi-chassis/src/Makefile
? ipmi-chassis/src/Makefile.in
? ipmi-chassis/src/ipmi-chassis
? ipmi-chassis-config/Makefile
? ipmi-chassis-config/Makefile.in
? ipmi-chassis-config/ipmi-chassis-config.8
? ipmi-chassis-config/ipmi-chassis-config.8.pre
? ipmi-chassis-config/src/.deps
? ipmi-chassis-config/src/.libs
? ipmi-chassis-config/src/Makefile
? ipmi-chassis-config/src/Makefile.in
? ipmi-chassis-config/src/ipmi-chassis-config
? ipmi-fru/Makefile
? ipmi-fru/Makefile.in
? ipmi-fru/ipmi-fru.8
? ipmi-fru/ipmi-fru.8.pre
? ipmi-fru/src/.deps
? ipmi-fru/src/.libs
? ipmi-fru/src/Makefile
? ipmi-fru/src/Makefile.in
? ipmi-fru/src/ipmi-fru
? ipmi-locate/Makefile
? ipmi-locate/Makefile.in
? ipmi-locate/ipmi-locate.8
? ipmi-locate/ipmi-locate.8.pre
? ipmi-locate/src/.deps
? ipmi-locate/src/.libs
? ipmi-locate/src/Makefile
? ipmi-locate/src/Makefile.in
? ipmi-locate/src/ipmi-locate
? ipmi-oem/Makefile
? ipmi-oem/Makefile.in
? ipmi-oem/ipmi-oem.8
? ipmi-oem/ipmi-oem.8.pre
? ipmi-oem/src/.deps
? ipmi-oem/src/.libs
? ipmi-oem/src/Makefile
? ipmi-oem/src/Makefile.in
? ipmi-oem/src/ipmi-oem
? ipmi-raw/Makefile
? ipmi-raw/Makefile.in
? ipmi-raw/ipmi-raw.8
? ipmi-raw/ipmi-raw.8.pre
? ipmi-raw/src/.deps
? ipmi-raw/src/.libs
? ipmi-raw/src/Makefile
? ipmi-raw/src/Makefile.in
? ipmi-raw/src/ipmi-raw
? ipmi-sel/Makefile
? ipmi-sel/Makefile.in
? ipmi-sel/ipmi-sel.8
? ipmi-sel/ipmi-sel.8.pre
? ipmi-sel/src/.deps
? ipmi-sel/src/.libs
? ipmi-sel/src/Makefile
? ipmi-sel/src/Makefile.in
? ipmi-sel/src/ipmi-sel
? ipmi-sensors/Makefile
? ipmi-sensors/Makefile.in
? ipmi-sensors/ipmi-sensors.8
? ipmi-sensors/ipmi-sensors.8.pre
? ipmi-sensors/src/.deps
? ipmi-sensors/src/.libs
? ipmi-sensors/src/Makefile
? ipmi-sensors/src/Makefile.in
? ipmi-sensors/src/ipmi-sensors
? ipmi-sensors-config/Makefile
? ipmi-sensors-config/Makefile.in
? ipmi-sensors-config/ipmi-sensors-config.8
? ipmi-sensors-config/ipmi-sensors-config.8.pre
? ipmi-sensors-config/src/.deps
? ipmi-sensors-config/src/.libs
? ipmi-sensors-config/src/Makefile
? ipmi-sensors-config/src/Makefile.in
? ipmi-sensors-config/src/ipmi-sensors-config
? ipmiconsole/Makefile
? ipmiconsole/Makefile.in
? ipmiconsole/ipmiconsole.8
? ipmiconsole/ipmiconsole.8.pre
? ipmiconsole/ipmiconsole.conf.5
? ipmiconsole/ipmiconsole.conf.5.pre
? ipmiconsole/libipmiconsole.3
? ipmiconsole/libipmiconsole.3.pre
? ipmiconsole/src/Makefile
? ipmiconsole/src/Makefile.in
? ipmiconsole/src/ipmiconsole/.deps
? ipmiconsole/src/ipmiconsole/.libs
? ipmiconsole/src/ipmiconsole/Makefile
? ipmiconsole/src/ipmiconsole/Makefile.in
? ipmiconsole/src/ipmiconsole/ipmiconsole
? ipmiconsole/src/libipmiconsole/.deps
? ipmiconsole/src/libipmiconsole/.libs
? ipmiconsole/src/libipmiconsole/Makefile
? ipmiconsole/src/libipmiconsole/Makefile.in
? ipmiconsole/src/libipmiconsole/libipmiconsole.la
? ipmiconsole/src/libipmiconsole/libipmiconsole_la-ipmiconsole.lo
? ipmiconsole/src/libipmiconsole/libipmiconsole_la-ipmiconsole_checks.lo
? ipmiconsole/src/libipmiconsole/libipmiconsole_la-ipmiconsole_ctx.lo
? ipmiconsole/src/libipmiconsole/libipmiconsole_la-ipmiconsole_debug.lo
? ipmiconsole/src/libipmiconsole/libipmiconsole_la-ipmiconsole_engine.lo
? ipmiconsole/src/libipmiconsole/libipmiconsole_la-ipmiconsole_fiid_wrappers.lo
? 
ipmiconsole/src/libipmiconsole/libipmiconsole_la-ipmiconsole_garbage_collector.lo
? ipmiconsole/src/libipmiconsole/libipmiconsole_la-ipmiconsole_packet.lo
? ipmiconsole/src/libipmiconsole/libipmiconsole_la-ipmiconsole_processing.lo
? ipmiconsole/src/libipmiconsole/libipmiconsole_la-ipmiconsole_util.lo
? ipmiconsole/src/libipmiconsole/libipmiconsole_la-scbuf.lo
? ipmidetect/Makefile
? ipmidetect/Makefile.in
? ipmidetect/ipmidetect.8
? ipmidetect/ipmidetect.8.pre
? ipmidetect/ipmidetect.conf.5
? ipmidetect/ipmidetect.conf.5.pre
? ipmidetect/ipmidetectd.8
? ipmidetect/ipmidetectd.8.pre
? ipmidetect/ipmidetectd.conf.5
? ipmidetect/ipmidetectd.conf.5.pre
? ipmidetect/libipmidetect.3
? ipmidetect/libipmidetect.3.pre
? ipmidetect/src/Makefile
? ipmidetect/src/Makefile.in
? ipmidetect/src/ipmidetect/.deps
? ipmidetect/src/ipmidetect/.libs
? ipmidetect/src/ipmidetect/Makefile
? ipmidetect/src/ipmidetect/Makefile.in
? ipmidetect/src/ipmidetect/ipmidetect
? ipmidetect/src/ipmidetectd/.deps
? ipmidetect/src/ipmidetectd/.libs
? ipmidetect/src/ipmidetectd/Makefile
? ipmidetect/src/ipmidetectd/Makefile.in
? ipmidetect/src/ipmidetectd/ipmidetectd
? ipmidetect/src/libipmidetect/.deps
? ipmidetect/src/libipmidetect/.libs
? ipmidetect/src/libipmidetect/Makefile
? ipmidetect/src/libipmidetect/Makefile.in
? ipmidetect/src/libipmidetect/libipmidetect.la
? ipmidetect/src/libipmidetect/libipmidetect_la-ipmidetect.lo
? ipmimonitoring/Makefile
? ipmimonitoring/Makefile.in
? ipmimonitoring/doc.patch
? ipmimonitoring/ipmi_monitoring_sensors.conf.5
? ipmimonitoring/ipmi_monitoring_sensors.conf.5.pre
? ipmimonitoring/ipmimonitoring.8
? ipmimonitoring/ipmimonitoring.8.pre
? ipmimonitoring/ipmimonitoring.conf.5
? ipmimonitoring/ipmimonitoring.conf.5.pre
? ipmimonitoring/ipmimonitoring_sensors.conf.5
? ipmimonitoring/ipmimonitoring_sensors.conf.5.pre
? ipmimonitoring/libipmimonitoring.3
? ipmimonitoring/libipmimonitoring.3.pre
? ipmimonitoring/libipmimonitoring.conf.5
? ipmimonitoring/libipmimonitoring.conf.5.pre
? ipmimonitoring/src/Makefile
? ipmimonitoring/src/Makefile.in
? ipmimonitoring/src/ipmimonitoring/.deps
? ipmimonitoring/src/ipmimonitoring/.libs
? ipmimonitoring/src/ipmimonitoring/Makefile
? ipmimonitoring/src/ipmimonitoring/Makefile.in
? ipmimonitoring/src/ipmimonitoring/ipmimonitoring
? ipmimonitoring/src/libipmimonitoring/.deps
? ipmimonitoring/src/libipmimonitoring/.libs
? ipmimonitoring/src/libipmimonitoring/Makefile
? ipmimonitoring/src/libipmimonitoring/Makefile.in
? ipmimonitoring/src/libipmimonitoring/libipmimonitoring.la
? ipmimonitoring/src/libipmimonitoring/libipmimonitoring_la-ipmi_monitoring.lo
? 
ipmimonitoring/src/libipmimonitoring/libipmimonitoring_la-ipmi_monitoring_debug.lo
? 
ipmimonitoring/src/libipmimonitoring/libipmimonitoring_la-ipmi_monitoring_fiid_wrappers.lo
? 
ipmimonitoring/src/libipmimonitoring/libipmimonitoring_la-ipmi_monitoring_ipmi_communication.lo
? 
ipmimonitoring/src/libipmimonitoring/libipmimonitoring_la-ipmi_monitoring_sdr_cache.lo
? 
ipmimonitoring/src/libipmimonitoring/libipmimonitoring_la-ipmi_monitoring_sensor_config.lo
? 
ipmimonitoring/src/libipmimonitoring/libipmimonitoring_la-ipmi_monitoring_sensor_reading.lo
? ipmiping/Makefile
? ipmiping/Makefile.in
? ipmiping/ipmiping.8
? ipmiping/ipmiping.8.pre
? ipmiping/src/.deps
? ipmiping/src/.libs
? ipmiping/src/Makefile
? ipmiping/src/Makefile.in
? ipmiping/src/ipmiping
? ipmipower/Makefile
? ipmipower/Makefile.in
? ipmipower/ipmipower.8
? ipmipower/ipmipower.8.pre
? ipmipower/ipmipower.conf.5
? ipmipower/ipmipower.conf.5.pre
? ipmipower/src/.deps
? ipmipower/src/.libs
? ipmipower/src/Makefile
? ipmipower/src/Makefile.in
? ipmipower/src/ipmipower
? libfreeipmi/Makefile
? libfreeipmi/Makefile.in
? libfreeipmi/libfreeipmi.3
? libfreeipmi/libfreeipmi.3.pre
? libfreeipmi/include/Makefile
? libfreeipmi/include/Makefile.in
? libfreeipmi/src/.libs
? libfreeipmi/src/Makefile
? libfreeipmi/src/Makefile.in
? libfreeipmi/src/libfreeipmi.la
? libfreeipmi/src/api/.deps
? libfreeipmi/src/api/.libs
? libfreeipmi/src/api/Makefile
? libfreeipmi/src/api/Makefile.in
? libfreeipmi/src/api/libapi.la
? libfreeipmi/src/api/libapi_la-ipmi-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-chassis-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-device-global-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-event-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-fru-inventory-device-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-kcs-driver-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-lan-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-lan-interface-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-lan-session-common.lo
? libfreeipmi/src/api/libapi_la-ipmi-messaging-support-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-openipmi-driver-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-pef-and-alerting-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-rmcpplus-support-and-payload-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-sdr-repository-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-sel-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-sensor-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-serial-modem-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-sol-cmds-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-ssif-driver-api.lo
? libfreeipmi/src/api/libapi_la-ipmi-sunbmc-driver-api.lo
? libfreeipmi/src/cmds/.deps
? libfreeipmi/src/cmds/.libs
? libfreeipmi/src/cmds/Makefile
? libfreeipmi/src/cmds/Makefile.in
? libfreeipmi/src/cmds/libcmds.la
? libfreeipmi/src/cmds/libcmds_la-ipmi-bmc-watchdog-timer-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-chassis-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-device-global-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-event-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-fru-inventory-device-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-lan-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-messaging-support-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-pef-and-alerting-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-rmcpplus-support-and-payload-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-sdr-repository-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-sel-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-sensor-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-serial-modem-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-ipmi-sol-cmds.lo
? libfreeipmi/src/cmds/libcmds_la-rmcp-cmds.lo
? libfreeipmi/src/debug/.deps
? libfreeipmi/src/debug/.libs
? libfreeipmi/src/debug/Makefile
? libfreeipmi/src/debug/Makefile.in
? libfreeipmi/src/debug/libdebug.la
? libfreeipmi/src/debug/libdebug_la-ipmi-debug-common.lo
? libfreeipmi/src/debug/libdebug_la-ipmi-debug-lan.lo
? libfreeipmi/src/debug/libdebug_la-ipmi-debug-rmcp.lo
? libfreeipmi/src/debug/libdebug_la-ipmi-debug-rmcpplus.lo
? libfreeipmi/src/debug/libdebug_la-ipmi-debug-sdr.lo
? libfreeipmi/src/debug/libdebug_la-ipmi-debug.lo
? libfreeipmi/src/driver/.deps
? libfreeipmi/src/driver/.libs
? libfreeipmi/src/driver/Makefile
? libfreeipmi/src/driver/Makefile.in
? libfreeipmi/src/driver/libdriver.la
? libfreeipmi/src/driver/libdriver_la-ipmi-kcs-driver.lo
? libfreeipmi/src/driver/libdriver_la-ipmi-openipmi-driver.lo
? libfreeipmi/src/driver/libdriver_la-ipmi-semaphores.lo
? libfreeipmi/src/driver/libdriver_la-ipmi-ssif-driver.lo
? libfreeipmi/src/driver/libdriver_la-ipmi-sunbmc-driver.lo
? libfreeipmi/src/fiid/.deps
? libfreeipmi/src/fiid/.libs
? libfreeipmi/src/fiid/Makefile
? libfreeipmi/src/fiid/Makefile.in
? libfreeipmi/src/fiid/libfiid.la
? libfreeipmi/src/fiid/libfiid_la-fiid.lo
? libfreeipmi/src/interface/.deps
? libfreeipmi/src/interface/.libs
? libfreeipmi/src/interface/Makefile
? libfreeipmi/src/interface/Makefile.in
? libfreeipmi/src/interface/libinterface.la
? libfreeipmi/src/interface/libinterface_la-ipmi-ipmb-interface.lo
? libfreeipmi/src/interface/libinterface_la-ipmi-kcs-interface.lo
? libfreeipmi/src/interface/libinterface_la-ipmi-lan-interface.lo
? libfreeipmi/src/interface/libinterface_la-ipmi-rmcpplus-interface.lo
? libfreeipmi/src/interface/libinterface_la-rmcp-interface.lo
? libfreeipmi/src/libcommon/.deps
? libfreeipmi/src/libcommon/.libs
? libfreeipmi/src/libcommon/Makefile
? libfreeipmi/src/libcommon/Makefile.in
? libfreeipmi/src/libcommon/libcommon.la
? libfreeipmi/src/libcommon/libcommon_la-ipmi-bit-ops.lo
? libfreeipmi/src/libcommon/libcommon_la-ipmi-crypt.lo
? libfreeipmi/src/libcommon/libcommon_la-ipmi-md2.lo
? libfreeipmi/src/libcommon/libcommon_la-ipmi-md5.lo
? libfreeipmi/src/locate/.deps
? libfreeipmi/src/locate/.libs
? libfreeipmi/src/locate/Makefile
? libfreeipmi/src/locate/Makefile.in
? libfreeipmi/src/locate/liblocate.la
? libfreeipmi/src/locate/liblocate_la-ipmi-locate-acpi-spmi.lo
? libfreeipmi/src/locate/liblocate_la-ipmi-locate-defaults.lo
? libfreeipmi/src/locate/liblocate_la-ipmi-locate-dmidecode.lo
? libfreeipmi/src/locate/liblocate_la-ipmi-locate-pci.lo
? libfreeipmi/src/locate/liblocate_la-ipmi-locate-smbios.lo
? libfreeipmi/src/locate/liblocate_la-ipmi-locate.lo
? libfreeipmi/src/record-format/.deps
? libfreeipmi/src/record-format/.libs
? libfreeipmi/src/record-format/Makefile
? libfreeipmi/src/record-format/Makefile.in
? libfreeipmi/src/record-format/librecordformat.la
? 
libfreeipmi/src/record-format/librecordformat_la-ipmi-cipher-suite-record-format.lo
? 
libfreeipmi/src/record-format/librecordformat_la-ipmi-fru-information-record-format.lo
? libfreeipmi/src/record-format/librecordformat_la-ipmi-sdr-record-format.lo
? libfreeipmi/src/record-format/librecordformat_la-ipmi-sel-record-format.lo
? libfreeipmi/src/sdr-cache/.deps
? libfreeipmi/src/sdr-cache/.libs
? libfreeipmi/src/sdr-cache/Makefile
? libfreeipmi/src/sdr-cache/Makefile.in
? libfreeipmi/src/sdr-cache/libsdrcache.la
? libfreeipmi/src/sdr-cache/libsdrcache_la-ipmi-sdr-cache-common.lo
? libfreeipmi/src/sdr-cache/libsdrcache_la-ipmi-sdr-cache-create.lo
? libfreeipmi/src/sdr-cache/libsdrcache_la-ipmi-sdr-cache-delete.lo
? libfreeipmi/src/sdr-cache/libsdrcache_la-ipmi-sdr-cache-read.lo
? libfreeipmi/src/sdr-cache/libsdrcache_la-ipmi-sdr-cache.lo
? libfreeipmi/src/spec/.deps
? libfreeipmi/src/spec/.libs
? libfreeipmi/src/spec/Makefile
? libfreeipmi/src/spec/Makefile.in
? libfreeipmi/src/spec/libspec.la
? libfreeipmi/src/spec/libspec_la-ipmi-fru-chassis-types-spec.lo
? libfreeipmi/src/spec/libspec_la-ipmi-fru-language-codes-spec.lo
? libfreeipmi/src/spec/libspec_la-ipmi-sensor-types-spec.lo
? libfreeipmi/src/spec/libspec_la-ipmi-sensor-units-spec.lo
? libfreeipmi/src/util/.deps
? libfreeipmi/src/util/.libs
? libfreeipmi/src/util/Makefile
? libfreeipmi/src/util/Makefile.in
? libfreeipmi/src/util/libutil.la
? libfreeipmi/src/util/libutil_la-ipmi-cipher-suite-util.lo
? libfreeipmi/src/util/libutil_la-ipmi-error-util.lo
? libfreeipmi/src/util/libutil_la-ipmi-ipmb-util.lo
? libfreeipmi/src/util/libutil_la-ipmi-lan-util.lo
? libfreeipmi/src/util/libutil_la-ipmi-rmcpplus-util.lo
? libfreeipmi/src/util/libutil_la-ipmi-sensor-and-event-code-tables-util.lo
? libfreeipmi/src/util/libutil_la-ipmi-sensor-util.lo
? libfreeipmi/src/util/libutil_la-ipmi-util.lo
? libfreeipmi/src/util/libutil_la-rmcp-util.lo
? man/Makefile
? man/Makefile.in
? man/freeipmi.7
? man/freeipmi.7.pre
? man/freeipmi.conf.5
? man/freeipmi.conf.5.pre
? pef-config/Makefile
? pef-config/Makefile.in
? pef-config/pef-config.8
? pef-config/pef-config.8.pre
? pef-config/src/.deps
? pef-config/src/.libs
? pef-config/src/Makefile
? pef-config/src/Makefile.in
? pef-config/src/pef-config
? rmcpping/Makefile
? rmcpping/Makefile.in
? rmcpping/rmcpping.8
? rmcpping/rmcpping.8.pre
? rmcpping/src/.deps
? rmcpping/src/.libs
? rmcpping/src/Makefile
? rmcpping/src/Makefile.in
? rmcpping/src/rmcpping
Index: ChangeLog
===================================================================
RCS file: /cvsroot/freeipmi/freeipmi/ChangeLog,v
retrieving revision 1.1771.2.70
diff -p -u -r1.1771.2.70 ChangeLog
--- ChangeLog   7 Mar 2009 20:01:06 -0000       1.1771.2.70
+++ ChangeLog   9 Mar 2009 20:56:35 -0000
@@ -1,3 +1,10 @@
+2009-03-09  Jan Forch <jan.fo...@sun.com>
+
+       * libfreeipmi/src/api/ipmi-api.c (ipmi_ctx_open_outofband,
+       ipmi_ctx_open_outofband_2_0),
+       common/src/toolcommon/tool-sdr-cache-common.c
+        (_get_home_directory): Fix Solaris porting bugs.
+       
 2009-03-07  Albert Chu <ch...@llnl.gov>
 
        * libfreeipmi/include/freeipmi/spec/ipmi-sensor-units-spec.h: Fix
Index: NEWS
===================================================================
RCS file: /cvsroot/freeipmi/freeipmi/NEWS,v
retrieving revision 1.198.2.64
diff -p -u -r1.198.2.64 NEWS
--- NEWS        7 Mar 2009 20:01:07 -0000       1.198.2.64
+++ NEWS        9 Mar 2009 20:56:35 -0000
@@ -1,6 +1,7 @@
 0.7.7 - xx/xx/xx
 ----------------
 o Fix libfreeipmi field validity checks for sensor units.
+o Fix Solaris porting bugs.
 
 0.7.6 - 02/25/09
 ----------------
Index: common/src/toolcommon/tool-sdr-cache-common.c
===================================================================
RCS file: 
/cvsroot/freeipmi/freeipmi/common/src/toolcommon/tool-sdr-cache-common.c,v
retrieving revision 1.15.2.1
diff -p -u -r1.15.2.1 tool-sdr-cache-common.c
--- common/src/toolcommon/tool-sdr-cache-common.c       20 Nov 2008 18:49:41 
-0000      1.15.2.1
+++ common/src/toolcommon/tool-sdr-cache-common.c       9 Mar 2009 20:56:35 
-0000
@@ -226,10 +226,11 @@ _get_home_directory (pstdout_state_t pst
       return -1;
     }
 #elif defined(HAVE_FUNC_GETPWUID_R_4)
-  if (getpwuid_r (user_id, 
-                  &pwd,
-                  tbuf,
-                  tbuf_len) != 0)
+  /* Jan Forch - Solaris getpwuid_r returns ptr, not integer */
+  if (!getpwuid_r (user_id, 
+                   &pwd,
+                   tbuf,
+                   tbuf_len)
     {
       PSTDOUT_PERROR(pstate, "getpwuid_r");
       return -1;
Index: libfreeipmi/src/api/ipmi-api.c
===================================================================
RCS file: /cvsroot/freeipmi/freeipmi/libfreeipmi/src/api/ipmi-api.c,v
retrieving revision 1.23.2.1
diff -p -u -r1.23.2.1 ipmi-api.c
--- libfreeipmi/src/api/ipmi-api.c      27 Nov 2008 04:29:08 -0000      1.23.2.1
+++ libfreeipmi/src/api/ipmi-api.c      9 Mar 2009 20:56:35 -0000
@@ -274,11 +274,12 @@ ipmi_ctx_open_outofband (ipmi_ctx_t ctx,
                                                     &h_errnop));
   API_ERR_HOSTNAME_INVALID_CLEANUP(hptr);
 #elif defined(HAVE_FUNC_GETHOSTBYNAME_R_5)
-  API_ERR_HOSTNAME_INVALID_CLEANUP(!gethostbyname_r(hostname,
-                                                    &hent,
-                                                    buf,
-                                                    GETHOSTBYNAME_AUX_BUFLEN,
-                                                    &h_errnop));
+  /* Jan Forch - Solaris gethostbyname_r returns ptr, not integer */
+  API_ERR_HOSTNAME_INVALID_CLEANUP(gethostbyname_r(hostname,
+                                                   &hent,
+                                                   buf,
+                                                   GETHOSTBYNAME_AUX_BUFLEN,
+                                                   &h_errnop));
 #else  /* !HAVE_FUNC_GETHOSTBYNAME_R */
   API_ERR_HOSTNAME_INVALID_CLEANUP(!freeipmi_gethostbyname_r(hostname,
                                                              &hent,
@@ -419,11 +420,12 @@ ipmi_ctx_open_outofband_2_0 (ipmi_ctx_t 
                                                     &h_errnop));
   API_ERR_HOSTNAME_INVALID_CLEANUP(hptr);
 #elif defined(HAVE_FUNC_GETHOSTBYNAME_R_5)
-  API_ERR_HOSTNAME_INVALID_CLEANUP(!gethostbyname_r(hostname,
-                                                    &hent,
-                                                    buf,
-                                                    GETHOSTBYNAME_AUX_BUFLEN,
-                                                    &h_errnop));
+  /* Jan Forch - Solaris gethostbyname_r returns ptr, not integer */
+  API_ERR_HOSTNAME_INVALID_CLEANUP(gethostbyname_r(hostname,
+                                                   &hent,
+                                                   buf,
+                                                   GETHOSTBYNAME_AUX_BUFLEN,
+                                                   &h_errnop));
 #else  /* !HAVE_FUNC_GETHOSTBYNAME_R */
   API_ERR_HOSTNAME_INVALID_CLEANUP(!freeipmi_gethostbyname_r(hostname,
                                                              &hent,
_______________________________________________
Freeipmi-devel mailing list
Freeipmi-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/freeipmi-devel

Reply via email to