Skip to content

Commit 7eb972c

Browse files
devnexencmb69
authored andcommitted
Fix Solaris builds of ext/sockets
We enable the proper ancillary data handling layout and API. Closes GH-7859.
1 parent 1d9a1f9 commit 7eb972c

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ PHP NEWS
1313
- Pcntl:
1414
. Fixed bug GH-8142 (Compilation error on cygwin). (David Carlier)
1515

16+
- Sockets:
17+
. Fixed Solaris builds. (David Carlier)
18+
1619
- SPL:
1720
. Fixed bug GH-8121 (SplFileObject - seek and key with csv file inconsistent).
1821
(cmb)

ext/sockets/conversions.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#ifdef __sun
2+
/* to enable 'new' ancillary data layout instead */
3+
# define _XPG4_2
4+
#endif
15
#include "sockaddr_conv.h"
26
#include "conversions.h"
37
#include "sendrecvmsg.h" /* for ancillary registry */

ext/sockets/sendrecvmsg.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
+----------------------------------------------------------------------+
1515
*/
1616

17+
#ifdef __sun
18+
/* to enable 'new' ancillary data layout instead */
19+
# define _XPG4_2
20+
#endif
1721
#include <php.h>
1822
#include "php_sockets.h"
1923
#include "sendrecvmsg.h"

0 commit comments

Comments
 (0)