swoole / ext-postgresql

🐘 Coroutine-based client for PostgreSQL
65 stars 21 forks source link

error: 'sw_reactor' was not declared in this scope #4

Closed KKdayIsaacTseng closed 5 years ago

KKdayIsaacTseng commented 5 years ago

I cannot make correctly and get error below.

/tmp/ext-postgresql/swoole_postgresql_coro.cc: In function 'void zim_swoole_postgresql_coro_connect(zend_execute_data*, zval*)':
/tmp/ext-postgresql/swoole_postgresql_coro.cc:228:45: error: 'sw_reactor' was not declared in this scope
     if (!swReactor_isset_handler(sw_reactor(), PHP_SWOOLE_FD_POSTGRESQL))
                                             ^
/tmp/ext-postgresql/swoole_postgresql_coro.cc:235:20: error: 'sw_reactor' was not declared in this scope
     if (sw_reactor()->add(sw_reactor(), fd, PHP_SWOOLE_FD_POSTGRESQL | SW_EVENT_WRITE) < 0)
                    ^
/tmp/ext-postgresql/swoole_postgresql_coro.cc:259:50: error: 'sw_reactor' was not declared in this scope
     swSocket *_socket = swReactor_get(sw_reactor(), fd);
                                                  ^
/tmp/ext-postgresql/swoole_postgresql_coro.cc: In function 'int swoole_pgsql_coro_onWrite(swReactor*, swEvent*)':
/tmp/ext-postgresql/swoole_postgresql_coro.cc:400:45: error: 'sw_reactor' was not declared in this scope
         return swReactor_onWrite(sw_reactor(), event);
                                             ^
/tmp/ext-postgresql/swoole_postgresql_coro.cc: In function 'int swoole_postgresql_coro_close(zval*)':
/tmp/ext-postgresql/swoole_postgresql_coro.cc:1326:20: error: 'sw_reactor' was not declared in this scope
     if (sw_reactor())
make: *** [Makefile:194: swoole_postgresql_coro.lo] Error 1

I'm using swoole 4.4.5

deminy commented 5 years ago

For Swoole 4.4.5, please use commit 1ccd2ffbdc6e6d1f7b067509817f4bf93fe1982a instead of the latest one from the master branch, as specified here.