|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75293 AI_NUMERICSERV’ undeclared
Submitted: 2017-09-30 00:13 UTC Modified: 2017-09-30 00:50 UTC
From: php-bugs-2017 at ryandesign dot com Assigned:
Status: Closed Package: Sockets related
PHP Version: 7.2.0RC3 OS: Mac OS X 10.5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
6 - 5 = ?
Subscribe to this entry?

 [2017-09-30 00:13 UTC] php-bugs-2017 at ryandesign dot com
The sockets module from php 7.2.0RC3 (and earlier RCs and betas) fails to build on Mac OS X 10.5 and earlier:

ext/sockets/sockets.c: In function ‘zm_startup_sockets’:
ext/sockets/sockets.c:805: error: ‘AI_NUMERICSERV’ undeclared (first use in this function)

Here's a full build log:

The php 7.1.x and earlier versions of the sockets module build fine on the same system.

AI_NUMERICSERV was introduced in Mac OS X 10.6. If you want to use it but remain compatible with older systems, you can apparently define it to 0 if it's not defined:

Note that sapi/phpdbg/phpdbg_io.h already contains these lines:

/* Older versions of glibc <= 2.3.0 and <= OS X 10.5 do not have this constant defined */

The same lines could be added somewhere for the sockets module.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-30 00:50 UTC] php-bugs-2017 at ryandesign dot com
Sorry, I hit the Submit button twice. Duplicate of #75292.
 [2017-09-30 00:50 UTC] php-bugs-2017 at ryandesign dot com
-Status: Open +Status: Closed
 [2017-09-30 00:50 UTC] php-bugs-2017 at ryandesign dot com
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun Dec 10 13:01:26 2023 UTC