Skip to content

Commit dedcfe8

Browse files
committed
poll: fix compilation issues
1 parent 406ff32 commit dedcfe8

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

main/poll/poll_backend_poll.c

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

1515
#include "php_poll_internal.h"
1616

17-
#include <poll.h>
18-
#include <stdlib.h>
19-
#include <string.h>
20-
2117
typedef struct {
2218
php_poll_fd_table *fd_table;
2319
struct pollfd *temp_fds;

main/poll/poll_core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,11 +351,11 @@ php_poll_error php_poll_errno_to_error(int err)
351351
#ifdef ENOSYS
352352
case ENOSYS:
353353
#endif
354-
#ifdef EOPNOTSUPP
355-
case EOPNOTSUPP:
356-
#endif
357-
#ifdef ENOTSUP
354+
#if ENOTSUP
358355
case ENOTSUP:
356+
#endif
357+
#if defined(EOPNOTSUPP) && EOPNOTSUPP != ENOTSUP
358+
case EOPNOTSUPP:
359359
#endif
360360
return PHP_POLL_ERR_NOSUPPORT;
361361

main/poll/poll_fd_table.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ php_poll_fd_table *php_poll_fd_table_init(int initial_capacity, bool persistent)
3434
void php_poll_fd_table_cleanup(php_poll_fd_table *table)
3535
{
3636
if (table) {
37-
zend_ulong fd;
3837
zval *zv;
3938

40-
ZEND_HASH_FOREACH_NUM_KEY_VAL(&table->entries_ht, fd, zv)
39+
ZEND_HASH_FOREACH_VAL(&table->entries_ht, zv)
4140
{
4241
php_poll_fd_entry *entry = Z_PTR_P(zv);
4342
pefree(entry, table->persistent);

0 commit comments

Comments
 (0)