Opened 10 years ago
Closed 10 years ago
#5275 closed Bug (fixed)
fix compilation on solaris
Reported by: | spaam | Owned by: | jordan |
---|---|---|---|
Priority: | High | Milestone: | 2.81 |
Component: | libtransmission | Version: | 2.80+ |
Severity: | Normal | Keywords: | solaris |
Cc: | taem@…, christian.kuehnke@… |
Description
When quotactl was introduced into libT/platform.c it failed to compile on solaris.
Attachments (3)
Change History (11)
Changed 10 years ago by spaam
comment:1 Changed 10 years ago by taem
comment:2 Changed 10 years ago by taem
- Cc taem@… added
Changed 10 years ago by spaam
comment:3 Changed 10 years ago by spaam
Fixed that and added some starting { to the other if statements so we can avoid some ifdefs.
comment:4 Changed 10 years ago by jordan
- Milestone None Set deleted
- Status changed from new to assigned
- Version 2.76 deleted
comment:5 Changed 10 years ago by jordan
- Resolution set to fixed
- Status changed from assigned to closed
Patch applied in r13975.
I changed the "#if sun" on line 17 to "#if defined (sun)" because the former generated an undefined reference warning on non-sun boxen.
Thanks for the patch!
comment:6 Changed 10 years ago by taem
Hi spaam,
According to http://uw714doc.sco.com/en/man/html.4/mnttab.4.html, in your patch, on line 752 should be returned 'mnt_special' instead of 'mnt_fstype'?
And on line 799 should be used 'mnt_special' instead of 'mnt_mountp'?
Thanks.
comment:7 Changed 10 years ago by godot
- Cc christian.kuehnke@… added
- Milestone set to 2.81
- Priority changed from Normal to High
- Resolution fixed deleted
- Status changed from closed to reopened
- Version set to 2.80+
The fix for this problem did not work for me. I got core dumps on solaris 2.11 using a binary compiled with 64bit ABI.
On Solaris, getment does not provide memory for the mntent structure itself. You have to allocate it yourself and pass an appropriate pointer to getmntent. See http://docs.oracle.com/cd/E19082-01/819-2243/getmntent-3c/index.html
This makes checking the return values cumbersome. I have thus remove the corresponding checks from the "return" line.
comment:8 Changed 10 years ago by jordan
- Resolution set to fixed
- Status changed from reopened to closed
Patch applied in r14120. Thanks!
Hi,
Thanks for your patch. On lines 17, 872 please use
With
compiler reports warnings that __sun is not defined on systems other than Solaris.
In getquota(), file handle 'fd' should be closed before exiting from function.