FreeBSD Bugzilla – Attachment 185413 Details for
Bug 221531
net/wmwifi: Fix runtime on architectures where sizeof(int) != sizeof(size_t)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
wmwifi.diff
wmwifi.diff (text/plain), 4.19 KB, created by
Tobias Kortkamp
on 2017-08-14 18:59:02 UTC
(
hide
)
Description:
wmwifi.diff
Filename:
MIME Type:
Creator:
Tobias Kortkamp
Created:
2017-08-14 18:59:02 UTC
Size:
4.19 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 447956) >+++ Makefile (working copy) >@@ -4,7 +4,7 @@ > PORTNAME= wmwifi > PORTVERSION= 0.4 > DISTVERSIONSUFFIX=-bsd >-PORTREVISION= 4 >+PORTREVISION= 5 > CATEGORIES= net > MASTER_SITES= http://digitalssg.net/debian/ \ > LOCAL/uqs >@@ -12,12 +12,15 @@ > MAINTAINER= uqs@FreeBSD.org > COMMENT= Dockapp displaying the signal strength of WiFi connection > >+LICENSE= GPLv2+ >+LICENSE_FILE= ${WRKSRC}/COPYING >+ >+USES= gmake localbase >+USE_XORG= x11 xext xpm >+ >+CONFIGURE_ENV= X_CFLAGS="${CFLAGS}" > GNU_CONFIGURE= yes >-USE_XORG= x11 xpm >-USES= gmake > >-CPPFLAGS+= -I${LOCALBASE}/include >- > PLIST_FILES= bin/wmwifi > > .include <bsd.port.mk> >Index: files/patch-configure.in >=================================================================== >--- files/patch-configure.in (revision 447956) >+++ files/patch-configure.in (nonexistent) >@@ -1,11 +0,0 @@ >---- configure.in.orig Sat Jul 2 14:29:13 2005 >-+++ configure.in Sat Jul 2 14:29:20 2005 >-@@ -11,7 +11,7 @@ >- AC_PATH_XTRA >- AC_PATH_X >- dnl echo $X_CFLAGS $X_LIBS >--CFLAGS="$X_CFLAGS $X_LIBS" >-+CFLAGS="$CFLAGS $X_CFLAGS $X_LIBS" >- AC_CHECK_LIB(X11, XCopyArea, [], [], $X_LIBS) >- AC_CHECK_LIB(Xext, XShapeCombineMask, [], [], $X_LIBS) >- AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData, [], [], $X_LIBS) > >Property changes on: files/patch-configure.in >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: files/patch-wireless.c >=================================================================== >--- files/patch-wireless.c (revision 447956) >+++ files/patch-wireless.c (working copy) >@@ -1,5 +1,5 @@ >---- src/wireless.c.orig 2004-03-09 20:39:17.000000000 +0100 >-+++ src/wireless.c 2007-11-01 17:58:13.170763665 +0100 >+--- src/wireless.c.orig 2004-03-09 19:39:17 UTC >++++ src/wireless.c > @@ -25,7 +25,13 @@ > #include <net/if_mib.h> > #include <net/if_var.h> >@@ -14,7 +14,14 @@ > #else > #error "sorry, your OS is not supported yet" > #endif >-@@ -143,6 +149,7 @@ >+@@ -138,11 +144,13 @@ int get_wlaniface(int old, int dir) >+ int i, max, step, found, index; >+ struct ifmibdata ifmd; >+ struct ifmediareq ifmr; >+- int name[6], len, s; >++ int name[6], s; >++ size_t len; >+ char *iface[IFNAMSIZ]; > > max = get_max_ifs(); > step = 0; >@@ -22,7 +29,7 @@ > > if (old > max) > old = max; /* just be sure to not be out of bounds */ >-@@ -178,8 +185,8 @@ >+@@ -178,8 +186,8 @@ int get_wlaniface(int old, int dir) > len = sizeof(ifmd); > sysctl(name, 6, &ifmd, &len, NULL, 0); > >@@ -33,7 +40,7 @@ > continue; > > s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); >-@@ -193,9 +200,11 @@ >+@@ -193,9 +201,11 @@ int get_wlaniface(int old, int dir) > > if (ioctl(s, SIOCGIFMEDIA, (caddr_t) &ifmr) < 0) > { >@@ -47,7 +54,7 @@ > } > close(s); > /* we cannot monitor interfaces in hostap mode, so just >-@@ -207,6 +216,10 @@ >+@@ -207,12 +217,17 @@ int get_wlaniface(int old, int dir) > found++; > } > } >@@ -58,7 +65,21 @@ > return index; > } > /* how many interfaces do we have? this includes non-wireless! */ >-@@ -224,9 +237,18 @@ >+ int get_max_ifs(void) >+ { >+- int count, len; >++ int count; >++ size_t len; >+ >+ len = sizeof(count); >+ sysctlbyname("net.link.generic.system.ifcount", &count, &len, NULL, 0); >+@@ -220,13 +235,23 @@ int get_max_ifs(void) >+ } >+ int wifi_info(struct wifi *wfi) >+ { >+- int name[6], len; /* interface name */ >++ int name[6]; /* interface name */ >++ size_t len; > struct ifmibdata ifmd; > > struct ifreq ifr; /* interface stats */ >@@ -77,7 +98,7 @@ > /* lets find the current interface name */ > name[0] = CTL_NET; > name[1] = PF_LINK; >-@@ -247,13 +269,38 @@ >+@@ -247,13 +272,38 @@ int wifi_info(struct wifi *wfi) > perror("socket"); > exit(1); > } >@@ -117,7 +138,7 @@ > strncpy(ifr.ifr_name, wfi->ifname, strlen(wfi->ifname)); > wireq.wi_type = WI_RID_COMMS_QUALITY; > wireq.wi_len = WI_MAX_DATALEN; >-@@ -272,7 +319,7 @@ >+@@ -272,7 +322,7 @@ int wifi_info(struct wifi *wfi) > * wi_val[2] = noise > */ > wfi->link = (int) wireq.wi_val[1];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
tobik
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 221531
: 185413