Subject: Re: gnome2 package feedback
To: None <tech-pkg@NetBSD.org>
From: iMil <imil@home.imil.net>
List: tech-pkg
Date: 03/29/2005 19:46:11
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> 1. gnome2-applets
>
> battstat dies at start, with the usual "has quit unexpectedly" popup

here's a patch correcting this (added to actual 
gnome2-applets/patches/patch-ad)

- --- power-management.c.old      2005-03-29 19:42:00.000000000 +0200
+++ power-management.c  2005-03-29 19:40:05.000000000 +0200
@@ -25,6 +25,7 @@

  #include <stdio.h>

+#include <sys/param.h>
  #include <sys/file.h>
  #include <sys/ioctl.h>
  #include <sys/types.h>
@@ -129,7 +130,11 @@
    /* Code for OpenBSD by Joe Ammond <jra@twinight.org>. Using the same
       procedure as for FreeBSD.
    */
+#if defined(__NetBSD__)
+  struct apm_power_info apminfo;
+#else /* __OpenBSD__ */
    struct apm_info apminfo;
+#endif
    int fd;

  #if defined(__NetBSD__)
@@ -144,6 +149,7 @@
      pm_initialised = 0;
      return ERR_OPEN_APMDEV;
    }
+  memset(&apminfo, 0, sizeof(apminfo));
    if (ioctl(fd, APM_IOC_GETPOWER, &apminfo) == -1)
      err(1, "ioctl(APM_IOC_GETPOWER)");
    close(fd);

- -------------------------
iMil <imil@home.imil.net>                                                 _
      http://gcu-squad.org                          ASCII ribbon campaign ( )
                                                     - against HTML email  X
                                                                 & vCards / \
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)

iD8DBQFCSZRmFG3BlGWyzUIRAq/PAJ9Ahol6rlCMFKE3a+dTmA434aYVBQCfaKTx
svuLlCqp3gnwj679AumQIP8=
=3XAA
-----END PGP SIGNATURE-----