mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Guard functions by SO_PASSCRED
This commit is contained in:
parent
37d0c7b0e4
commit
2134cc25d2
1 changed files with 5 additions and 0 deletions
|
@ -441,6 +441,8 @@ static void from_zval_write_sa_family(const zval *arr_value, char *field, ser_co
|
|||
ival = (sa_family_t)lval;
|
||||
memcpy(field, &ival, sizeof(ival));
|
||||
}
|
||||
|
||||
#ifdef SO_PASSCRED
|
||||
static void from_zval_write_pid_t(const zval *arr_value, char *field, ser_context *ctx)
|
||||
{
|
||||
zend_long lval;
|
||||
|
@ -488,6 +490,7 @@ static void from_zval_write_uid_t(const zval *arr_value, char *field, ser_contex
|
|||
ival = (uid_t)lval;
|
||||
memcpy(field, &ival, sizeof(ival));
|
||||
}
|
||||
#endif
|
||||
|
||||
void to_zval_read_int(const char *data, zval *zv, res_context *ctx)
|
||||
{
|
||||
|
@ -524,6 +527,7 @@ static void to_zval_read_sa_family(const char *data, zval *zv, res_context *ctx)
|
|||
|
||||
ZVAL_LONG(zv, (zend_long)ival);
|
||||
}
|
||||
#ifdef SO_PASSCRED
|
||||
static void to_zval_read_pid_t(const char *data, zval *zv, res_context *ctx)
|
||||
{
|
||||
pid_t ival;
|
||||
|
@ -538,6 +542,7 @@ static void to_zval_read_uid_t(const char *data, zval *zv, res_context *ctx)
|
|||
|
||||
ZVAL_LONG(zv, (zend_long)ival);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* CONVERSIONS for sockaddr */
|
||||
static void from_zval_write_sin_addr(const zval *zaddr_str, char *inaddr, ser_context *ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue