Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Mar 2008 01:28:29 +0200
From:      Stefan Lambrev <stefan.lambrev@moneybookers.com>
To:        itetcu@FreeBSD.org, Lars.Koeller@Uni-Bielefeld.DE
Cc:        freebsd-ports@freebsd.org
Subject:   patch to get apcupsd-3.14.3.tar.gz compiling under freebsd
Message-ID:  <47DEFE9D.8070603@moneybookers.com>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030905040303090207080109
Content-Type: text/plain; charset=windows-1251; format=flowed
Content-Transfer-Encoding: 7bit

Greetings,

Could you consider the attached patch (if you plan to upgrade the port 
to the latest version)?
v3.14.3 does not compile under FreeBSD 6.3 without it.

Thanks.

--------------030905040303090207080109
Content-Type: text/plain;
 name="patch-bsd-usb.c.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="patch-bsd-usb.c.txt"

--- src/drivers/usb/bsd/bsd-usb.c.orig	2007-10-27 20:15:14.000000000 +0300
+++ src/drivers/usb/bsd/bsd-usb.c	2008-03-18 01:10:26.000000000 +0200
@@ -351,9 +351,9 @@
 
 int pusb_ups_get_capabilities(UPSINFO *ups, const struct s_known_info *known_info)
 {
-   int i, rc, ci, phys;
+   int i, ci, phys, input, feature;
    USB_DATA *my_data = (USB_DATA *)ups->driver_internal_data;
-   hid_item_t item;
+   hid_item_t item, witem;
    USB_INFO *info;
 
    write_lock(ups);
@@ -506,7 +506,7 @@
 
       // Store a (possibly truncated) copy of the floating point value in the
       // integer field as well.
-      val.iValue = val.dValue;
+      val.iValue = (int) val.dValue;
 
       Dmsg4(200, "Def val=%d exp=%d dVal=%f ci=%d\n", info->value,
          exponent, val.dValue, info->ci);
@@ -775,7 +775,7 @@
    return true;
 }
 
-int pusb_write_int_to_ups(UPSINFO *ups, int ci, int value, char *name)
+int pusb_write_int_to_ups(UPSINFO *ups, int ci, int value, const char *name)
 {
    USB_DATA *my_data = (USB_DATA *)ups->driver_internal_data;
    USB_INFO *info;

--------------030905040303090207080109--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47DEFE9D.8070603>