Date: Fri, 16 Dec 2011 21:58:23 GMT From: Rainer Hurling <rhurlin@gwdg.de> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/163367: [maintainer] [patch] sysutils/wmupmon: build error and missing URL Message-ID: <201112162158.pBGLwNvG079191@red.freebsd.org> Resent-Message-ID: <201112162200.pBGM0RXq008178@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 163367 >Category: ports >Synopsis: [maintainer] [patch] sysutils/wmupmon: build error and missing URL >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Fri Dec 16 22:00:26 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Rainer Hurling >Release: FreeBSD 10-CURRENT (amd64) >Organization: >Environment: FreeBSD xxx.xxx.xxx 10.0-CURRENT FreeBSD 10.0-CURRENT #0: Wed Dec 14 19:10:47 CET 2011 xxx@xxx.xxx.xxx:/usr/obj/usr/src/sys/XXX amd64 >Description: The port did not fetch the distfile any more (ULR does not exist) and it had a build warning with sys/sysctl.h: uptime_freebsd.c: In function 'get_uptime': uptime_freebsd.c:31: warning: passing argument 4 of 'sysctl' from incompatible pointer type Could someone please have a look at my patch for src/uptime_freebsd.c? Unfortunately I have almost no C knowledge, thanks. Renaming files/patch-src_main.c to files/patch-src__main.c because of naming conventions. >How-To-Repeat: 1. Try to fetch the distfile without the patch. 2. When building look for the warning. >Fix: Patch attached with submission follows: diff -Naur wmupmon.orig/Makefile wmupmon/Makefile --- wmupmon.orig/Makefile 2010-12-04 08:33:42.000000000 +0100 +++ wmupmon/Makefile 2011-12-16 22:32:00.000000000 +0100 @@ -7,9 +7,10 @@ PORTNAME= wmupmon PORTVERSION= 0.1.3 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= sysutils windowmaker -MASTER_SITES= http://www.dockapps.org/files/188/547/ +# URL link over http://freecode.com/projects/wmupmon +MASTER_SITES= http://j-z-s.com/projects/downloads/ MAINTAINER= rhurlin@gwdg.de COMMENT= An uptime showing dockapp with a similar look to wmcpuload diff -Naur wmupmon.orig/files/patch-src__main.c wmupmon/files/patch-src__main.c --- wmupmon.orig/files/patch-src__main.c 1970-01-01 01:00:00.000000000 +0100 +++ wmupmon/files/patch-src__main.c 2010-11-28 15:05:57.000000000 +0100 @@ -0,0 +1,40 @@ +--- src/main.c 2004-12-11 19:07:21.000000000 +0000 ++++ src/main.c 2007-01-31 12:20:47.000000000 +0000 +@@ -66,10 +66,8 @@ + int main(int argc, char **argv) + { + int i, a, aa, b, bb; +- char* real_off_xpm[(style == 2 ? sizeof(backlight2_off_xpm) : +- sizeof(backlight_off_xpm))]; +- char* real_on_xpm[(style == 2 ? sizeof(backlight2_on_xpm) : +- sizeof(backlight_on_xpm))]; ++ char** real_off_xpm; ++ char** real_on_xpm; + XEvent event; + XpmColorSymbol colors[2] = { {"Back0", NULL, 0}, {"Back1", NULL, 0} }; + int ncolor = 0; +@@ -79,20 +77,12 @@ + + /* setup pixmap to use - this is ugly but it works */ + +- a = sizeof(backlight2_off_xpm); +- aa = sizeof(backlight2_on_xpm); +- b = sizeof(backlight_off_xpm); +- bb = sizeof(backlight_on_xpm); + if(style == 2){ +- for(i=0; i<a; i++) +- real_off_xpm[i] = backlight2_off_xpm[i]; +- for(i=0; i<aa; i++) +- real_on_xpm[i] = backlight2_on_xpm[i]; ++ real_off_xpm = backlight2_off_xpm; ++ real_on_xpm = backlight2_on_xpm; + } else { +- for(i=0; i<b; i++) +- real_off_xpm[i] = backlight_off_xpm[i]; +- for(i=0; i<bb; i++) +- real_on_xpm[i] = backlight_on_xpm[i]; ++ real_off_xpm = backlight_off_xpm; ++ real_on_xpm = backlight_on_xpm; + } + + /* Initialize Application */ diff -Naur wmupmon.orig/files/patch-src__uptime_freebsd.c wmupmon/files/patch-src__uptime_freebsd.c --- wmupmon.orig/files/patch-src__uptime_freebsd.c 1970-01-01 01:00:00.000000000 +0100 +++ wmupmon/files/patch-src__uptime_freebsd.c 2011-12-16 22:21:16.000000000 +0100 @@ -0,0 +1,14 @@ +--- src/uptime_freebsd.c.orig 2004-12-11 20:07:21.000000000 +0100 ++++ src/uptime_freebsd.c 2011-12-16 22:20:08.000000000 +0100 +@@ -23,9 +23,10 @@ + { + + int mib[2] = {CTL_KERN, KERN_BOOTTIME}; ++ size_t size; + struct timeval boottime; + time_t now; +- int size = sizeof(boottime); ++ size = sizeof(boottime); + int uptime; + + if((sysctl(mib, 2, &boottime, &size, NULL, 0) != -1) diff -Naur wmupmon.orig/files/patch-src_main.c wmupmon/files/patch-src_main.c --- wmupmon.orig/files/patch-src_main.c 2010-11-28 15:05:57.000000000 +0100 +++ wmupmon/files/patch-src_main.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,40 +0,0 @@ ---- src/main.c 2004-12-11 19:07:21.000000000 +0000 -+++ src/main.c 2007-01-31 12:20:47.000000000 +0000 -@@ -66,10 +66,8 @@ - int main(int argc, char **argv) - { - int i, a, aa, b, bb; -- char* real_off_xpm[(style == 2 ? sizeof(backlight2_off_xpm) : -- sizeof(backlight_off_xpm))]; -- char* real_on_xpm[(style == 2 ? sizeof(backlight2_on_xpm) : -- sizeof(backlight_on_xpm))]; -+ char** real_off_xpm; -+ char** real_on_xpm; - XEvent event; - XpmColorSymbol colors[2] = { {"Back0", NULL, 0}, {"Back1", NULL, 0} }; - int ncolor = 0; -@@ -79,20 +77,12 @@ - - /* setup pixmap to use - this is ugly but it works */ - -- a = sizeof(backlight2_off_xpm); -- aa = sizeof(backlight2_on_xpm); -- b = sizeof(backlight_off_xpm); -- bb = sizeof(backlight_on_xpm); - if(style == 2){ -- for(i=0; i<a; i++) -- real_off_xpm[i] = backlight2_off_xpm[i]; -- for(i=0; i<aa; i++) -- real_on_xpm[i] = backlight2_on_xpm[i]; -+ real_off_xpm = backlight2_off_xpm; -+ real_on_xpm = backlight2_on_xpm; - } else { -- for(i=0; i<b; i++) -- real_off_xpm[i] = backlight_off_xpm[i]; -- for(i=0; i<bb; i++) -- real_on_xpm[i] = backlight_on_xpm[i]; -+ real_off_xpm = backlight_off_xpm; -+ real_on_xpm = backlight_on_xpm; - } - - /* Initialize Application */ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112162158.pBGLwNvG079191>