mgdm / Mosquitto-PHP

A wrapper for the Eclipse Mosquitto™ MQTT client library for PHP.
BSD 3-Clause "New" or "Revised" License
528 stars 146 forks source link

Error on Ubuntu 20 with PHP8 #120

Open giorgiopagnoni opened 3 years ago

giorgiopagnoni commented 3 years ago

The command pecl install Mosquitto-alpha fails on Ubunutu 20 with php 8. Are php 8 and ubuntu 20 supported? Here's the error I get:

In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:118:95: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’
  118 | typedef int (*php_mosquitto_write_t)(mosquitto_message_object *mosquitto_object, zval *newval TSRMLS_DC);
      |                                                                                               ^~~~~~~~~
mgdm commented 3 years ago

It’s not working yet. I’m working on it in a branch but haven’t finished it off yet.

On 25 Jan 2021, at 11:42, Giorgio Pagnoni notifications@github.com wrote:

 The command pecl install Mosquitto-alpha fails on Ubunutu 20 with php 8. Are php 8 and ubuntu 20 supported? Here's the error I get:

In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12: /tmp/pear/temp/Mosquitto/php_mosquitto.h:118:95: error: expected ‘;’, ‘,’ or ‘)’ before ‘TSRMLS_DC’ 118 | typedef int (php_mosquitto_write_t)(mosquitto_message_object mosquitto_object, zval *newval TSRMLS_DC); | ^~~~~ — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

giorgiopagnoni commented 3 years ago

Thank you for your quick feedback!

alesinicio commented 3 years ago

Hi! Is there any chance that there will be an update for PHP8 compatibility in the foreseeable future? Can we help to make it happen, somehow?

decole commented 2 years ago

Tell me will there be a new version for php 8 in the foreseeable future. Can the community help you somehow?

mgdm commented 2 years ago

There is a branch for it: https://github.com/mgdm/Mosquitto-PHP/tree/php8

it would be great if you could check it out, and see if it works for your use. I can look into doing an actual release but any feedback I can get from trying that out will be great.

decole commented 2 years ago

I use this library for my pet project - smart home. I can check this way. I will listen and push mqtt messages on docker image with php8. Just describe what needs to be done to install a new library on php 8?

decole commented 2 years ago

There is a branch for it: https://github.com/mgdm/Mosquitto-PHP/tree/php8

it would be great if you could check it out, and see if it works for your use. I can look into doing an actual release but any feedback I can get from trying that out will be great.

how install https://github.com/mgdm/Mosquitto-PHP/tree/php8 on php 8 server this mosquitto lib verison?

decole commented 2 years ago

People help how to build this module and put it in php 8

decole commented 2 years ago

Using docker image php:8.1-fpm. execute:

 phpize
./configure --with-mosquitto=/path/to/libmosquitto
make
make install

Error:

Warning: PHP Startup: Unable to load dynamic library 'mosquitto.so' (tried: /usr/local/lib/php/extensions/no-debug-non-zts-20210902/mosquitto.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/mosquitto.so: cannot open shared object file: No such file or directory), /usr/local/lib/php/extensions/no-debug-non-zts-20210902/mosquitto.so.so (/usr/local/lib/php/extensions/no-debug-non-zts-20210902/mosquitto.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
downloading Mosquitto-0.4.0.tgz ...
Starting to download Mosquitto-0.4.0.tgz (23,804 bytes)
........done: 23,804 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version:         20210902
Zend Module Api No:      20210902
Zend Extension Api No:   420210902
Please provide the prefix of the libmosquitto installation [autodetect] : 
building in /tmp/pear/temp/pear-build-defaultuserCqFJVt/Mosquitto-0.4.0
running: /tmp/pear/temp/Mosquitto/configure --with-php-config=/usr/local/bin/php-config --with-mosquitto
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20210902
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for mosquitto support... yes, shared
checking for mosquitto files in default path... checking /usr... found in /usr
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for a sed that does not truncate output... /bin/sed
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking the maximum length of command line arguments... 1572864
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC
checking if cc PIC flag -fPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no

creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-defaultuserCqFJVt/Mosquitto-0.4.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/Mosquitto -I/tmp/pear/temp/pear-build-defaultuserCqFJVt/Mosquitto-0.4.0/include -I/tmp/pear/temp/pear-build-defaultuserCqFJVt/Mosquitto-0.4.0/main -I/tmp/pear/temp/Mosquitto -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2    -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/Mosquitto/mosquitto.c -o mosquitto.lo  -MMD -MF mosquitto.dep -MT mosquitto.lo
mkdir .libs
 cc -I. -I/tmp/pear/temp/Mosquitto -I/tmp/pear/temp/pear-build-defaultuserCqFJVt/Mosquitto-0.4.0/include -I/tmp/pear/temp/pear-build-defaultuserCqFJVt/Mosquitto-0.4.0/main -I/tmp/pear/temp/Mosquitto -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -DZEND_COMPILE_DL_EXT=1 -c /tmp/pear/temp/Mosquitto/mosquitto.c -MMD -MF mosquitto.dep -MT mosquitto.lo  -fPIC -DPIC -o .libs/mosquitto.o
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:118:95: error: expected ';', ',' or ')' before 'TSRMLS_DC'
  118 | typedef int (*php_mosquitto_write_t)(mosquitto_message_object *mosquitto_object, zval *newval TSRMLS_DC);
      |                                                                                               ^~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:124:2: error: unknown type name 'php_mosquitto_write_t'
  124 |  php_mosquitto_write_t write_func;
      |  ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:236:53: error: expected ';', ',' or ')' before 'TSRMLS_DC'
  236 | void php_mosquitto_handle_errno(int retval, int err TSRMLS_DC);
      |                                                     ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:36:79: error: expected ';', ',' or ')' before 'TSRMLS_DC'
   36 | static inline mosquitto_client_object *mosquitto_client_object_get(zval *zobj TSRMLS_DC) {
      |                                                                               ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client___construct':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:156:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  156 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:157:44: error: expected ')' before 'TSRMLS_CC'
  157 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!b", &id, &id_len, &clean_session) == FAILURE) {
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:157:6: error: too few arguments to function 'zend_parse_parameters'
  157 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s!b", &id, &id_len, &clean_session) == FAILURE) {
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:158:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  158 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:161:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  161 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:166:58: error: expected ')' before 'TSRMLS_CC'
  166 |   zend_throw_exception(mosquitto_ce_exception, message, 1 TSRMLS_CC);
      |                                                          ^~~~~~~~~~
      |                                                          )
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_setTlsCertificates':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:185:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  185 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:186:44: error: expected ')' before 'TSRMLS_CC'
  186 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!|s!s!s!",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:186:6: error: too few arguments to function 'zend_parse_parameters'
  186 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!|s!s!s!",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:191:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  191 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:195:37: error: expected ')' before 'TSRMLS_CC'
  195 |  if ((php_check_open_basedir(ca_path TSRMLS_CC) < 0) ||
      |                                     ^~~~~~~~~~
      |                                     )
/tmp/pear/temp/Mosquitto/mosquitto.c:196:36: error: expected ')' before 'TSRMLS_CC'
  196 |   (php_check_open_basedir(cert_path TSRMLS_CC) < 0) ||
      |                                    ^~~~~~~~~~
      |                                    )
/tmp/pear/temp/Mosquitto/mosquitto.c:197:35: error: expected ')' before 'TSRMLS_CC'
  197 |   (php_check_open_basedir(key_path TSRMLS_CC) < 0))
      |                                   ^~~~~~~~~~
      |                                   )
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:199:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  199 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:203:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  203 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:205:49: error: expected ')' before 'TSRMLS_CC'
  205 |  php_stat(ca_path, ca_path_len, FS_IS_DIR, &stat TSRMLS_CC);
      |                                                 ^~~~~~~~~~
      |                                                 )
/tmp/pear/temp/Mosquitto/mosquitto.c:205:11: warning: passing argument 1 of 'php_stat' from incompatible pointer type [-Wincompatible-pointer-types]
  205 |  php_stat(ca_path, ca_path_len, FS_IS_DIR, &stat TSRMLS_CC);
      |           ^~~~~~~
      |           |
      |           char *
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:10:
/usr/local/include/php/ext/standard/php_filestat.h:44:35: note: expected 'zend_string *' {aka 'struct _zend_string *'} but argument is of type 'char *'
   44 | PHPAPI void php_stat(zend_string *filename, int type, zval *return_value);
      |                      ~~~~~~~~~~~~~^~~~~~~~
/usr/local/include/php/ext/standard/php_filestat.h:60:20: warning: passing argument 3 of 'php_stat' makes pointer from integer without a cast [-Wint-conversion]
   60 | #define FS_IS_DIR  13
      |                    ^~
      |                    |
      |                    int
/tmp/pear/temp/Mosquitto/mosquitto.c:205:33: note: in expansion of macro 'FS_IS_DIR'
  205 |  php_stat(ca_path, ca_path_len, FS_IS_DIR, &stat TSRMLS_CC);
      |                                 ^~~~~~~~~
/usr/local/include/php/ext/standard/php_filestat.h:44:61: note: expected 'zval *' {aka 'struct _zval_struct *'} but argument is of type 'int'
   44 | PHPAPI void php_stat(zend_string *filename, int type, zval *return_value);
      |                                                       ~~~~~~^~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:205:2: error: too many arguments to function 'php_stat'
  205 |  php_stat(ca_path, ca_path_len, FS_IS_DIR, &stat TSRMLS_CC);
      |  ^~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:10:
/usr/local/include/php/ext/standard/php_filestat.h:44:13: note: declared here
   44 | PHPAPI void php_stat(zend_string *filename, int type, zval *return_value);
      |             ^~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:220:2: warning: implicit declaration of function 'php_mosquitto_handle_errno' [-Wimplicit-function-declaration]
  220 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:220:43: error: expected ')' before 'TSRMLS_CC'
  220 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_setTlsInsecure':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:232:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  232 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:233:44: error: expected ')' before 'TSRMLS_CC'
  233 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &value) == FAILURE) {
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:233:6: error: too few arguments to function 'zend_parse_parameters'
  233 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "b", &value) == FAILURE) {
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:234:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  234 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:237:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  237 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:241:43: error: expected ')' before 'TSRMLS_CC'
  241 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_setTlsOptions':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:253:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  253 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:254:44: error: expected ')' before 'TSRMLS_CC'
  254 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|s!s!",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:254:6: error: too few arguments to function 'zend_parse_parameters'
  254 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|s!s!",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:259:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  259 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:262:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  262 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:266:43: error: expected ')' before 'TSRMLS_CC'
  266 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_setTlsPSK':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:279:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  279 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:280:44: error: expected ')' before 'TSRMLS_CC'
  280 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!s!|s!",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:280:6: error: too few arguments to function 'zend_parse_parameters'
  280 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!s!|s!",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:283:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  283 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:286:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  286 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:290:43: error: expected ')' before 'TSRMLS_CC'
  290 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_setCredentials':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:303:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  303 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:304:44: error: expected ')' before 'TSRMLS_CC'
  304 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &username, &username_len, &password, &password_len) == FAILURE) {
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:304:6: error: too few arguments to function 'zend_parse_parameters'
  304 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &username, &username_len, &password, &password_len) == FAILURE) {
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:305:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  305 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:308:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  308 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:311:43: error: expected ')' before 'TSRMLS_CC'
  311 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_setWill':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:325:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  325 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:326:44: error: expected ')' before 'TSRMLS_CC'
  326 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sslb",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:326:6: error: too few arguments to function 'zend_parse_parameters'
  326 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sslb",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:328:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  328 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:331:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  331 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:335:43: error: expected ')' before 'TSRMLS_CC'
  335 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_clearWill':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:345:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  345 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:347:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  347 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:350:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  350 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:354:43: error: expected ')' before 'TSRMLS_CC'
  354 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_setReconnectDelay':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:366:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  366 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:367:44: error: expected ')' before 'TSRMLS_CC'
  367 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|lb",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:367:6: error: too few arguments to function 'zend_parse_parameters'
  367 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|lb",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:369:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  369 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:372:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  372 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:376:43: error: expected ')' before 'TSRMLS_CC'
  376 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_connect':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:390:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  390 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:391:44: error: expected ')' before 'TSRMLS_CC'
  391 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lls!",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:391:6: error: too few arguments to function 'zend_parse_parameters'
  391 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lls!",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:395:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  395 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:398:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  398 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:406:43: error: expected ')' before 'TSRMLS_CC'
  406 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_disconnect':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:417:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  417 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:419:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  419 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:422:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  422 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:427:43: error: expected ')' before 'TSRMLS_CC'
  427 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_onConnect':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:438:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  438 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:439:44: error: expected ')' before 'TSRMLS_CC'
  439 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:439:6: error: too few arguments to function 'zend_parse_parameters'
  439 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:442:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  442 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:445:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  445 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:448:74: error: expected ')' before 'TSRMLS_CC'
  448 |   zend_throw_exception(mosquitto_ce_exception, "Need a valid callback", 0 TSRMLS_CC);
      |                                                                          ^~~~~~~~~~
      |                                                                          )
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_onDisconnect':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:467:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  467 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:468:44: error: expected ')' before 'TSRMLS_CC'
  468 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:468:6: error: too few arguments to function 'zend_parse_parameters'
  468 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:471:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  471 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:474:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  474 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:477:74: error: expected ')' before 'TSRMLS_CC'
  477 |   zend_throw_exception(mosquitto_ce_exception, "Need a valid callback", 0 TSRMLS_CC);
      |                                                                          ^~~~~~~~~~
      |                                                                          )
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_onLog':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:496:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  496 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:497:44: error: expected ')' before 'TSRMLS_CC'
  497 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:497:6: error: too few arguments to function 'zend_parse_parameters'
  497 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:500:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  500 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:503:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  503 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:506:74: error: expected ')' before 'TSRMLS_CC'
  506 |   zend_throw_exception(mosquitto_ce_exception, "Need a valid callback", 0 TSRMLS_CC);
      |                                                                          ^~~~~~~~~~
      |                                                                          )
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_onSubscribe':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:525:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  525 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:526:44: error: expected ')' before 'TSRMLS_CC'
  526 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:526:6: error: too few arguments to function 'zend_parse_parameters'
  526 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:529:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  529 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:532:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  532 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:535:74: error: expected ')' before 'TSRMLS_CC'
  535 |   zend_throw_exception(mosquitto_ce_exception, "Need a valid callback", 0 TSRMLS_CC);
      |                                                                          ^~~~~~~~~~
      |                                                                          )
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_onUnsubscribe':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:554:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  554 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:555:44: error: expected ')' before 'TSRMLS_CC'
  555 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:555:6: error: too few arguments to function 'zend_parse_parameters'
  555 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:558:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  558 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:561:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  561 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:564:74: error: expected ')' before 'TSRMLS_CC'
  564 |   zend_throw_exception(mosquitto_ce_exception, "Need a valid callback", 0 TSRMLS_CC);
      |                                                                          ^~~~~~~~~~
      |                                                                          )
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_onMessage':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:583:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  583 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:584:44: error: expected ')' before 'TSRMLS_CC'
  584 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:584:6: error: too few arguments to function 'zend_parse_parameters'
  584 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:587:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  587 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:590:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  590 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:593:74: error: expected ')' before 'TSRMLS_CC'
  593 |   zend_throw_exception(mosquitto_ce_exception, "Need a valid callback", 0 TSRMLS_CC);
      |                                                                          ^~~~~~~~~~
      |                                                                          )
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_onPublish':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:612:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  612 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:613:44: error: expected ')' before 'TSRMLS_CC'
  613 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:613:6: error: too few arguments to function 'zend_parse_parameters'
  613 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "f!",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:616:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  616 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:619:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  619 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:622:74: error: expected ')' before 'TSRMLS_CC'
  622 |   zend_throw_exception(mosquitto_ce_exception, "Need a valid callback", 0 TSRMLS_CC);
      |                                                                          ^~~~~~~~~~
      |                                                                          )
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_getSocket':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:639:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  639 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:641:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  641 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:644:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  644 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_setMaxInFlightMessages':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:657:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  657 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:658:44: error: expected ')' before 'TSRMLS_CC'
  658 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &max)  == FAILURE) {
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:658:6: error: too few arguments to function 'zend_parse_parameters'
  658 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &max)  == FAILURE) {
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:659:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  659 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:662:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  662 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:666:43: error: expected ')' before 'TSRMLS_CC'
  666 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_setMessageRetry':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:676:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  676 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:677:44: error: expected ')' before 'TSRMLS_CC'
  677 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &retry)  == FAILURE) {
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:677:6: error: too few arguments to function 'zend_parse_parameters'
  677 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &retry)  == FAILURE) {
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:678:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  678 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:681:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  681 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_publish':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:697:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  697 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:698:44: error: expected ')' before 'TSRMLS_CC'
  698 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|lb",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:698:6: error: too few arguments to function 'zend_parse_parameters'
  698 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|lb",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:700:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  700 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:703:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  703 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:707:43: error: expected ')' before 'TSRMLS_CC'
  707 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_subscribe':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:722:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  722 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:723:44: error: expected ')' before 'TSRMLS_CC'
  723 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:723:6: error: too few arguments to function 'zend_parse_parameters'
  723 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:725:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  725 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:728:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  728 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:732:43: error: expected ')' before 'TSRMLS_CC'
  732 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_unsubscribe':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:746:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  746 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:747:44: error: expected ')' before 'TSRMLS_CC'
  747 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:747:6: error: too few arguments to function 'zend_parse_parameters'
  747 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:749:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  749 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:752:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  752 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:756:43: error: expected ')' before 'TSRMLS_CC'
  756 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_loop':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:769:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  769 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:770:44: error: expected ')' before 'TSRMLS_CC'
  770 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ll",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:770:6: error: too few arguments to function 'zend_parse_parameters'
  770 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ll",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:772:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  772 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:775:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  775 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:778:43: error: expected ')' before 'TSRMLS_CC'
  778 |  php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                           ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_loopForever':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:789:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  789 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:790:44: error: expected ')' before 'TSRMLS_CC'
  790 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ll",
      |                                            ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:790:6: error: too few arguments to function 'zend_parse_parameters'
  790 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ll",
      |      ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/php/main/php.h:35,
                 from /tmp/pear/temp/Mosquitto/mosquitto.c:5:
/usr/local/include/php/Zend/zend_API.h:335:22: note: declared here
  335 | ZEND_API zend_result zend_parse_parameters(uint32_t num_args, const char *type_spec, ...);
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:792:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  792 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:795:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  795 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:801:44: error: expected ')' before 'TSRMLS_CC'
  801 |   php_mosquitto_handle_errno(retval, errno TSRMLS_CC);
      |                                            ^~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:12:
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zim_Mosquitto_Client_exitLoop':
/tmp/pear/temp/Mosquitto/php_mosquitto.h:129:106: error: expected ')' before 'TSRMLS_CC'
  129 |  zend_replace_error_handling(EH_THROW, mosquitto_ce_exception, &MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                                                          ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:815:2: note: in expansion of macro 'PHP_MOSQUITTO_ERROR_HANDLING'
  815 |  PHP_MOSQUITTO_ERROR_HANDLING();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:817:3: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  817 |   PHP_MOSQUITTO_RESTORE_ERRORS();
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/php_mosquitto.h:132:72: error: expected ')' before 'TSRMLS_CC'
  132 |  zend_restore_error_handling(&MQTTG(mosquitto_original_error_handling) TSRMLS_CC)
      |                                                                        ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:820:2: note: in expansion of macro 'PHP_MOSQUITTO_RESTORE_ERRORS'
  820 |  PHP_MOSQUITTO_RESTORE_ERRORS();
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c: At top level:
/tmp/pear/temp/Mosquitto/mosquitto.c:851:78: error: expected ';', ',' or ')' before 'TSRMLS_DC'
  851 | static void mosquitto_client_object_destroy(zend_object *object ZO_HANDLE_DC TSRMLS_DC)
      |                                                                              ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:876:62: error: expected ';', ',' or ')' before 'TSRMLS_DC'
  876 | static void mosquitto_client_object_free(zend_object *object TSRMLS_DC) {
      |                                                              ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:936:53: error: expected ';', ',' or ')' before 'TSRMLS_DC'
  936 | void php_mosquitto_handle_errno(int retval, int err TSRMLS_DC) {
      |                                                     ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'php_mosquitto_connect_callback':
/tmp/pear/temp/Mosquitto/mosquitto.c:991:83: error: expected ')' before 'TSRMLS_CC'
  991 |  if (zend_call_function(&object->connect_callback, &object->connect_callback_cache TSRMLS_CC) == FAILURE) {
      |                                                                                   ^~~~~~~~~~
      |                                                                                   )
/tmp/pear/temp/Mosquitto/mosquitto.c:993:53: error: expected ')' before 'TSRMLS_CC'
  993 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke connect callback %s()", mosquitto_finfo_name(&object->connect_callback));
      |                                                     ^~~~~~~~~~
      |                                                     )
/tmp/pear/temp/Mosquitto/mosquitto.c:993:4: error: too few arguments to function 'zend_throw_exception_ex'
  993 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke connect callback %s()", mosquitto_finfo_name(&object->connect_callback));
      |    ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:8:
/usr/local/include/php/Zend/zend_exceptions.h:61:33: note: declared here
   61 | ZEND_API ZEND_COLD zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'php_mosquitto_disconnect_callback':
/tmp/pear/temp/Mosquitto/mosquitto.c:1044:89: error: expected ')' before 'TSRMLS_CC'
 1044 |  if (zend_call_function(&object->disconnect_callback, &object->disconnect_callback_cache TSRMLS_CC) == FAILURE) {
      |                                                                                         ^~~~~~~~~~
      |                                                                                         )
/tmp/pear/temp/Mosquitto/mosquitto.c:1046:53: error: expected ')' before 'TSRMLS_CC'
 1046 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke disconnect callback %s()", mosquitto_finfo_name(&object->disconnect_callback));
      |                                                     ^~~~~~~~~~
      |                                                     )
/tmp/pear/temp/Mosquitto/mosquitto.c:1046:4: error: too few arguments to function 'zend_throw_exception_ex'
 1046 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke disconnect callback %s()", mosquitto_finfo_name(&object->disconnect_callback));
      |    ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:8:
/usr/local/include/php/Zend/zend_exceptions.h:61:33: note: declared here
   61 | ZEND_API ZEND_COLD zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'php_mosquitto_log_callback':
/tmp/pear/temp/Mosquitto/mosquitto.c:1100:75: error: expected ')' before 'TSRMLS_CC'
 1100 |  if (zend_call_function(&object->log_callback, &object->log_callback_cache TSRMLS_CC) == FAILURE) {
      |                                                                           ^~~~~~~~~~
      |                                                                           )
/tmp/pear/temp/Mosquitto/mosquitto.c:1102:53: error: expected ')' before 'TSRMLS_CC'
 1102 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke log callback %s()", mosquitto_finfo_name(&object->log_callback));
      |                                                     ^~~~~~~~~~
      |                                                     )
/tmp/pear/temp/Mosquitto/mosquitto.c:1102:4: error: too few arguments to function 'zend_throw_exception_ex'
 1102 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke log callback %s()", mosquitto_finfo_name(&object->log_callback));
      |    ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:8:
/usr/local/include/php/Zend/zend_exceptions.h:61:33: note: declared here
   61 | ZEND_API ZEND_COLD zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'php_mosquitto_message_callback':
/tmp/pear/temp/Mosquitto/mosquitto.c:1164:83: error: expected ')' before 'TSRMLS_CC'
 1164 |  if (zend_call_function(&object->message_callback, &object->message_callback_cache TSRMLS_CC) == FAILURE) {
      |                                                                                   ^~~~~~~~~~
      |                                                                                   )
/tmp/pear/temp/Mosquitto/mosquitto.c:1166:53: error: expected ')' before 'TSRMLS_CC'
 1166 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke message callback %s()", mosquitto_finfo_name(&object->message_callback));
      |                                                     ^~~~~~~~~~
      |                                                     )
/tmp/pear/temp/Mosquitto/mosquitto.c:1166:4: error: too few arguments to function 'zend_throw_exception_ex'
 1166 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke message callback %s()", mosquitto_finfo_name(&object->message_callback));
      |    ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:8:
/usr/local/include/php/Zend/zend_exceptions.h:61:33: note: declared here
   61 | ZEND_API ZEND_COLD zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'php_mosquitto_publish_callback':
/tmp/pear/temp/Mosquitto/mosquitto.c:1214:83: error: expected ')' before 'TSRMLS_CC'
 1214 |  if (zend_call_function(&object->publish_callback, &object->publish_callback_cache TSRMLS_CC) == FAILURE) {
      |                                                                                   ^~~~~~~~~~
      |                                                                                   )
/tmp/pear/temp/Mosquitto/mosquitto.c:1216:53: error: expected ')' before 'TSRMLS_CC'
 1216 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke publish callback %s()", mosquitto_finfo_name(&object->publish_callback));
      |                                                     ^~~~~~~~~~
      |                                                     )
/tmp/pear/temp/Mosquitto/mosquitto.c:1216:4: error: too few arguments to function 'zend_throw_exception_ex'
 1216 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke publish callback %s()", mosquitto_finfo_name(&object->publish_callback));
      |    ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:8:
/usr/local/include/php/Zend/zend_exceptions.h:61:33: note: declared here
   61 | ZEND_API ZEND_COLD zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'php_mosquitto_subscribe_callback':
/tmp/pear/temp/Mosquitto/mosquitto.c:1275:87: error: expected ')' before 'TSRMLS_CC'
 1275 |  if (zend_call_function(&object->subscribe_callback, &object->subscribe_callback_cache TSRMLS_CC) == FAILURE) {
      |                                                                                       ^~~~~~~~~~
      |                                                                                       )
/tmp/pear/temp/Mosquitto/mosquitto.c:1277:53: error: expected ')' before 'TSRMLS_CC'
 1277 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke subscribe callback %s()", mosquitto_finfo_name(&object->subscribe_callback));
      |                                                     ^~~~~~~~~~
      |                                                     )
/tmp/pear/temp/Mosquitto/mosquitto.c:1277:4: error: too few arguments to function 'zend_throw_exception_ex'
 1277 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke subscribe callback %s()", mosquitto_finfo_name(&object->subscribe_callback));
      |    ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:8:
/usr/local/include/php/Zend/zend_exceptions.h:61:33: note: declared here
   61 | ZEND_API ZEND_COLD zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'php_mosquitto_unsubscribe_callback':
/tmp/pear/temp/Mosquitto/mosquitto.c:1330:91: error: expected ')' before 'TSRMLS_CC'
 1330 |  if (zend_call_function(&object->unsubscribe_callback, &object->unsubscribe_callback_cache TSRMLS_CC) == FAILURE) {
      |                                                                                           ^~~~~~~~~~
      |                                                                                           )
/tmp/pear/temp/Mosquitto/mosquitto.c:1332:53: error: expected ')' before 'TSRMLS_CC'
 1332 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke unsubscribe callback %s()", mosquitto_finfo_name(&object->unsubscribe_callback));
      |                                                     ^~~~~~~~~~
      |                                                     )
/tmp/pear/temp/Mosquitto/mosquitto.c:1332:4: error: too few arguments to function 'zend_throw_exception_ex'
 1332 |    zend_throw_exception_ex(mosquitto_ce_exception, 0 TSRMLS_CC, "Failed to invoke unsubscribe callback %s()", mosquitto_finfo_name(&object->unsubscribe_callback));
      |    ^~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:8:
/usr/local/include/php/Zend/zend_exceptions.h:61:33: note: declared here
   61 | ZEND_API ZEND_COLD zend_object *zend_throw_exception_ex(zend_class_entry *exception_ce, zend_long code, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'php_mosquitto_pw_callback':
/tmp/pear/temp/Mosquitto/mosquitto.c:1349:2: warning: implicit declaration of function 'TSRMLS_FETCH'; did you mean 'TSRMLS_CACHE'? [-Wimplicit-function-declaration]
 1349 |  TSRMLS_FETCH();
      |  ^~~~~~~~~~~~
      |  TSRMLS_CACHE
/tmp/pear/temp/Mosquitto/mosquitto.c: In function 'zm_startup_mosquitto':
/tmp/pear/temp/Mosquitto/mosquitto.c:1435:44: error: 'mosquitto_client_object_free' undeclared (first use in this function); did you mean 'mosquitto_client_object_new'?
 1435 |  mosquitto_std_object_handlers.free_obj  = mosquitto_client_object_free;
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                            mosquitto_client_object_new
/tmp/pear/temp/Mosquitto/mosquitto.c:1435:44: note: each undeclared identifier is reported only once for each function it appears in
/tmp/pear/temp/Mosquitto/mosquitto.c:1436:44: error: 'mosquitto_client_object_destroy' undeclared (first use in this function); did you mean 'mosquitto_client_object_new'?
 1436 |  mosquitto_std_object_handlers.dtor_obj  = mosquitto_client_object_destroy;
      |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                            mosquitto_client_object_new
/tmp/pear/temp/Mosquitto/mosquitto.c:1440:63: error: expected ')' before 'TSRMLS_CC'
 1440 |  mosquitto_ce_client = zend_register_internal_class(&client_ce TSRMLS_CC);
      |                                                               ^~~~~~~~~~
      |                                                               )
/tmp/pear/temp/Mosquitto/mosquitto.c:1444:101: error: 'TSRMLS_C' undeclared (first use in this function); did you mean 'TSRM_H'?
 1444 |  mosquitto_ce_exception = zend_register_internal_class_ex(&exception_ce, zend_exception_get_default(TSRMLS_C)
      |                                                                                                     ^~~~~~~~
      |                                                                                                     TSRM_H
/tmp/pear/temp/Mosquitto/mosquitto.c:1444:74: error: too many arguments to function 'zend_exception_get_default'
 1444 |  mosquitto_ce_exception = zend_register_internal_class_ex(&exception_ce, zend_exception_get_default(TSRMLS_C)
      |                                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/Mosquitto/mosquitto.c:8:
/usr/local/include/php/Zend/zend_exceptions.h:51:28: note: declared here
   51 | ZEND_API zend_class_entry *zend_exception_get_default(void);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1451:102: error: expected ')' before 'TSRMLS_CC'
 1451 |  zend_declare_class_constant_long(mosquitto_ce_client, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); \
      |                                                                                                      ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1454:2: note: in expansion of macro 'REGISTER_MOSQUITTO_LONG_CONST'
 1454 |  REGISTER_MOSQUITTO_LONG_CONST("LOG_INFO", MOSQ_LOG_INFO);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1451:102: error: expected ')' before 'TSRMLS_CC'
 1451 |  zend_declare_class_constant_long(mosquitto_ce_client, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); \
      |                                                                                                      ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1455:2: note: in expansion of macro 'REGISTER_MOSQUITTO_LONG_CONST'
 1455 |  REGISTER_MOSQUITTO_LONG_CONST("LOG_NOTICE", MOSQ_LOG_NOTICE);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1451:102: error: expected ')' before 'TSRMLS_CC'
 1451 |  zend_declare_class_constant_long(mosquitto_ce_client, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); \
      |                                                                                                      ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1456:2: note: in expansion of macro 'REGISTER_MOSQUITTO_LONG_CONST'
 1456 |  REGISTER_MOSQUITTO_LONG_CONST("LOG_WARNING", MOSQ_LOG_WARNING);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1451:102: error: expected ')' before 'TSRMLS_CC'
 1451 |  zend_declare_class_constant_long(mosquitto_ce_client, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); \
      |                                                                                                      ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1457:2: note: in expansion of macro 'REGISTER_MOSQUITTO_LONG_CONST'
 1457 |  REGISTER_MOSQUITTO_LONG_CONST("LOG_ERR", MOSQ_LOG_ERR);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1451:102: error: expected ')' before 'TSRMLS_CC'
 1451 |  zend_declare_class_constant_long(mosquitto_ce_client, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); \
      |                                                                                                      ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1458:2: note: in expansion of macro 'REGISTER_MOSQUITTO_LONG_CONST'
 1458 |  REGISTER_MOSQUITTO_LONG_CONST("LOG_DEBUG", MOSQ_LOG_DEBUG);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1451:102: error: expected ')' before 'TSRMLS_CC'
 1451 |  zend_declare_class_constant_long(mosquitto_ce_client, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); \
      |                                                                                                      ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1460:2: note: in expansion of macro 'REGISTER_MOSQUITTO_LONG_CONST'
 1460 |  REGISTER_MOSQUITTO_LONG_CONST("SSL_VERIFY_NONE", 0);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1451:102: error: expected ')' before 'TSRMLS_CC'
 1451 |  zend_declare_class_constant_long(mosquitto_ce_client, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC); \
      |                                                                                                      ^~~~~~~~~
/tmp/pear/temp/Mosquitto/mosquitto.c:1461:2: note: in expansion of macro 'REGISTER_MOSQUITTO_LONG_CONST'
 1461 |  REGISTER_MOSQUITTO_LONG_CONST("SSL_VERIFY_PEER", 1);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:202: mosquitto.lo] Error 1
ERROR: `make' failed
sophiejacquin commented 9 months ago

hello, I am getting the exact same error on debian bookworm with php8.2, is there a fix?

nismoryco commented 9 months ago

I have a forked version with PHP 8 support.

https://github.com/nismoryco/Mosquitto-PHP

sophiejacquin commented 9 months ago

this works thank you

jeroendesloovere commented 6 months ago

I have the same error while trying to build my docker container.

Dockerfile:

FROM php:8.2-fpm-bullseye as php_base

RUN apt-get -y update && apt-get upgrade -y

RUN apt-get update && apt-get install -y  \
    libyaml-dev \
    libicu-dev \
    libzip-dev \
    zip \
    acl \
    librabbitmq-dev \
    libssh-dev \
    libpng-dev \
    libmosquitto-dev \
    && rm -rf /var/lib/apt/lists/*

# configure, install and enable all php packages
# HERE IT FAILS, at Mosquitto-alpha (same errors as mentioned by previous user)
RUN pecl install yaml amqp redis Mosquitto-alpha && \
    docker-php-ext-enable yaml \
        amqp \
        redis

How can I fix it? I don't understand how I can implement @nismoryco his forked version?

jeroendesloovere commented 6 months ago

@mgdm any news about the fix?

nismoryco commented 6 months ago

I don't use Docker so I can't help with that but I can say that my PR has been merged into the PHP8 branch here.