Bug 116757 - net/ushare is broken for amd64
Summary: net/ushare is broken for amd64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Stefan Walter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-30 06:20 UTC by josh.carroll
Modified: 2007-10-03 10:20 UTC (History)
0 users

See Also:


Attachments
file.diff (299 bytes, patch)
2007-09-30 06:20 UTC, josh.carroll
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description josh.carroll 2007-09-30 06:20:01 UTC
The ushare port has a bug in the code that prevents it from working properly on an amd64 installation of 6.2-RELEASE.

When ushare is run, it fails with:

pflog# /usr/local/etc/rc.d/ushare start
Starting ushare.
sysctl: No such file or directory

I tracked this down to the sysctl calls in ushare.c, which are passing &len with len defined as an int. In fact, the compiler generates warnings for these:

ushare.c: In function `create_udn':
ushare.c:413: warning: passing arg 4 of `sysctl' from incompatible pointer type
ushare.c:420: warning: passing arg 4 of `sysctl' from incompatible pointer type

len should be of type size_t, not int. Defining len as size_t fixes the problem.

Thanks,
Josh

Fix: Attached is a patch which changes the type of len from int to size_t in the create_udn function.

Patch attached with submission follows:
How-To-Repeat: cd /usr/ports/net/ushare
make && make install
/usr/local/etc/rc.d/ushare forcestart
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-09-30 06:31:18 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 2 Volker Theile 2007-10-01 07:28:35 UTC
Hello Edwin,

i approve the patch, so you can commit it finally.

Greetings
Volker

-------- Original-Nachricht --------
> Datum: Sun, 30 Sep 2007 05:31:15 UT
> Von: Edwin Groothuis <edwin@FreeBSD.org>
> An: votdev@gmx.de
> Betreff: Re: ports/116757: net/ushare is broken for amd64

> Maintainer of net/ushare,
> 
> Please note that PR ports/116757 has just been submitted.
> 
> If it contains a patch for an upgrade, an enhancement or a bug fix
> you agree on, reply to this email stating that you approve the patch
> and a committer will take care of it.
> 
> The full text of the PR can be found at:
>     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/116757
> 
> -- 
> Edwin Groothuis
> edwin@FreeBSD.org

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
Comment 3 Stefan Walter freebsd_committer freebsd_triage 2007-10-03 10:06:17 UTC
State Changed
From-To: feedback->open

Maintainer's feedback received. 


Comment 4 Stefan Walter freebsd_committer freebsd_triage 2007-10-03 10:06:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->stefan

Take.
Comment 5 dfilter service freebsd_committer freebsd_triage 2007-10-03 10:14:28 UTC
stefan      2007-10-03 09:14:22 UTC

  FreeBSD ports repository

  Modified files:
    net/ushare           Makefile 
  Added files:
    net/ushare/files     patch-src_ushare.c 
  Log:
  Make ushare work on amd64 by fixing a variable declaration.
  
  PR:             116757
  Submitted by:   Josh Carroll <josh.carroll@gmail.com>
  Approved by:    maintainer
  
  Revision  Changes    Path
  1.10      +1 -1      ports/net/ushare/Makefile
  1.1       +12 -0     ports/net/ushare/files/patch-src_ushare.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Stefan Walter freebsd_committer freebsd_triage 2007-10-03 10:17:22 UTC
State Changed
From-To: open->closed

Committed, thanks!