Bug 23347

Summary: [0.8] asyncns.c uses non-portable getrlimit
Product: Telepathy Reporter: Thomas Klausner <tk>
Component: gabbleAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: 0.8   
Hardware: Other   
OS: NetBSD   
i915 platform: i915 features:
Attachments: Patch fixing the problem.
Patch fixing compilation problem with 0.9.2

Description Thomas Klausner 2009-08-16 11:16:35 UTC
Created attachment 28670 [details] [review]
Patch fixing the problem.

asyncns.c doesn't compile on NetBSD-5.99.15/amd64:
asyncns.c: In function 'close_allv':
asyncns.c:206: error: storage size of 'rl' isn't known
asyncns.c:277: warning: implicit declaration of function 'getrlimit'
asyncns.c:277: error: 'RLIMIT_NOFILE' undeclared (first use in this function)
asyncns.c:277: error: (Each undeclared identifier is reported only once
asyncns.c:277: error: for each function it appears in.)
asyncns.c:206: warning: unused variable 'rl'

The attached patch fixes the problem.
Comment 1 Simon McVittie 2009-08-24 13:23:04 UTC
I'd prefer not to patch asyncns, since it's imported from elsewhere. Does the version from <http://0pointer.de/lennart/projects/libasyncns/> compile correctly on NetBSD? If so, we just need to update our copy; if not, please report the bug to Lennart.
Comment 2 Thomas Klausner 2009-08-24 13:30:26 UTC
libasyncns-0.7 compiles fine.
Its config.h contains:
libasyncns-0.7/config.h:#define HAVE_PTHREAD 1
I don't see that define when compiling telepathy-gabble.
Comment 3 Simon McVittie 2010-06-23 03:18:34 UTC
This bug only affects the 0.8 stable branch; 0.9 uses GibberResolver. I'd recommend using 0.9.x on non-Linux OSs.
Comment 4 Simon McVittie 2010-06-23 03:19:18 UTC
(In reply to comment #3)
> 0.9 uses GibberResolver

... by which I meant GResolver; GibberResolver was the old non-portable code.
Comment 5 Thomas Klausner 2010-06-24 13:16:39 UTC
Created attachment 36477 [details] [review]
Patch fixing compilation problem with 0.9.2

pkgsrc contains 0.9.2 now, but still needs a patch for asyncns.c to compile (attached).
Comment 6 Simon McVittie 2010-06-25 02:59:53 UTC
(In reply to comment #5)
> Created an attachment (id=36477) [details]
> Patch fixing compilation problem with 0.9.2
> pkgsrc contains 0.9.2 now, but still needs a patch for asyncns.c to compile
> (attached).

The current version is 0.9.14, which no longer contains this code, so from our point of view, this isn't an issue for the 0.9 series. If you need to continue to ship an older release for some reason, that patch looks fine for any POSIX OS, but I'd recommend upgrading; if there are other issues that prevent you from using the latest 0.9.x release, please open bugs for them.
Comment 7 Thomas Klausner 2010-06-27 15:43:41 UTC
I'll update to a later version in a few weeks and open new bug reports if I find problems.

Thanks for your help!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.