mirror of
https://github.com/php/php-src.git
synced 2026-04-22 07:28:09 +02:00
Make socket support compile under Solaris 8 with the Sun WorkShop compiler.
PR: 8468
This commit is contained in:
+12
-1
@@ -26,9 +26,14 @@
|
||||
|
||||
/* This hopefully will fix some compile errors on other platforms --
|
||||
* the usage of msg_control/msg_controllen are X/Open Extended attributes,
|
||||
* or so it seems, by reading HP/UX 10.20 manual pages. */
|
||||
* or so it seems, by reading HP/UX 10.20 manual pages.
|
||||
*
|
||||
* The second two defines are for Solaris 8 with the Sun WorkShop compiler.
|
||||
*/
|
||||
|
||||
#define _XOPEN_SOURCE_EXTENDED
|
||||
#define _XPG4_2
|
||||
#define __EXTENSIONS__
|
||||
|
||||
#include "ext/standard/info.h"
|
||||
#include "php_sockets.h"
|
||||
@@ -66,6 +71,12 @@ php_sockets_globals sockets_globals;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Solaris 8 doesn't appear to define SUN_LEN in <sys/un.h> */
|
||||
#ifndef SUN_LEN
|
||||
#define SUN_LEN(su) \
|
||||
(sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
|
||||
#endif
|
||||
|
||||
/* Use the read() wrapper, stopping at '\n', '\r', or '\0'. */
|
||||
#define PHP_NORMAL_READ 0x0001
|
||||
/* Use the read() wrapper, but read until the entire buffer is filled. */
|
||||
|
||||
Reference in New Issue
Block a user