Opened 10 years ago

Closed 10 years ago

#46968 closed defect (fixed)

opusfile @0.6 does not build on 10.5.8

Reported by: janstary (Jan Starý) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mopihopi
Port: opusfile

Description

On MacOSX 10.5.8, audio/opusfile does not build, because this version of MacOSX does not have AI_NUMERICSERV defined, and src/http.c fails to compile.

:info:build src/http.c: In function 'op_resolve':
:info:build src/http.c:725: error: 'AI_NUMERICSERV' undeclared (first use in this function)

It appears exactly once:

#if !defined(_WIN32)
  hints.ai_flags=AI_NUMERICSERV;
#endif

What's the right thing to do here? Can we just drop these three lines on older darwins?

(Does someone know when exactly AI_NUMERICSERV became #defined in MacOSX's netdb.h?)

Another solution is to just --disable-http for the appropriate darwin versions, which seems like overkill.

Attachments (3)

Portfile.diff (683 bytes) - added by janstary (Jan Starý) 10 years ago.
patch-src-http.c.diff (467 bytes) - added by janstary (Jan Starý) 10 years ago.
Don't try to set AI_NUMERICSERV if the system doesn't recognize it
patch-opusfile.diff (1.2 KB) - added by dbevans (David B. Evans) 10 years ago.
Proposed patch revised

Download all attachments as: .zip

Change History (10)

comment:1 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to devans@…

In the future, please Cc the port maintainers (port info --maintainers opusfile), if any.

Changed 10 years ago by janstary (Jan Starý)

Attachment: Portfile.diff added

Changed 10 years ago by janstary (Jan Starý)

Attachment: patch-src-http.c.diff added

Don't try to set AI_NUMERICSERV if the system doesn't recognize it

comment:2 Changed 10 years ago by janstary (Jan Starý)

The attached diff to the Portfile and to src/http.c make opusfile compile on my 10.5.8

The "darwin 8" and "darwin 9" is a blind shot, I don't know when exactly AI_NUMERICSERV was introduced into MacOSX; someone please correct me.

comment:3 Changed 10 years ago by mopihopi

Cc: mopihopi@… added

Cc Me!

comment:4 Changed 10 years ago by mopihopi

AI_NUMERICSERV is defined on OS X 10.6.8. However it might be better to just change the #if to #if defined(AI_NUMERICSERV), as that should work everywhere.

comment:5 Changed 10 years ago by dbevans (David B. Evans)

Status: newassigned
Version: 2.3.3

Attached is my proposed patch to implement the fix as suggested in comment:3. If you can confirm that this fixes your issue, I'll go ahead and commit the fix. I've incremented the revision so that it will rebuild on all buildbots to ensure it works on 10.6+ but works for me on Mavericks and Yosemite.

Changed 10 years ago by dbevans (David B. Evans)

Attachment: patch-opusfile.diff added

Proposed patch revised

comment:6 in reply to:  5 Changed 10 years ago by janstary (Jan Starý)

Replying to devans@…:

Attached is my proposed patch to implement the fix as suggested in comment:3. If you can confirm that this fixes your issue, I'll go ahead and commit the fix. I've incremented the revision so that it will rebuild on all buildbots to ensure it works on 10.6+ but works for me on Mavericks and Yosemite.

Yes, this fixes my issue (and I agree it is a much better fix) Thanks!

comment:7 Changed 10 years ago by dbevans (David B. Evans)

Resolution: fixed
Status: assignedclosed

Committed in r133349, thanks to all for the report and the fix. I'm really dependent on you to help with these older systems since mine died some time ago.

Note: See TracTickets for help on using tickets.