[MacPorts] #71025: php74-odbc, php80-odbc: error: incompatible function pointer types (was: php74-odbc & php80-odbc fail to compile)

MacPorts noreply at macports.org
Fri Oct 4 00:48:58 UTC 2024


#71025: php74-odbc, php80-odbc: error: incompatible function pointer types
------------------------------------+----------------------------
  Reporter:  BjarneDMat             |      Owner:  ryandesign
      Type:  defect                 |     Status:  accepted
  Priority:  Normal                 |  Milestone:
 Component:  ports                  |    Version:
Resolution:                         |   Keywords:  sonoma sequoia
      Port:  php80-odbc php74-odbc  |
------------------------------------+----------------------------
Changes (by ryandesign):

 * owner:  (none) => ryandesign
 * keywords:  Sonoma => sonoma sequoia
 * status:  new => accepted


Comment:

 For php74-odbc the error in the log is:

 {{{
 php-7.4.33/ext/pdo_odbc/odbc_stmt.c:889:2: error: incompatible function
 pointer types initializing 'pdo_stmt_get_col_data_func' (aka 'int
 (*)(struct _pdo_stmt_t *, int, char **, unsigned long *, int *)') with an
 expression of type 'int (pdo_stmt_t *, int, char **, zend_ulong *, int *)'
 (aka 'int (struct _pdo_stmt_t *, int, char **, unsigned long long *, int
 *)') [-Wincompatible-function-pointer-types]
   889 |         odbc_stmt_get_col,
       |         ^~~~~~~~~~~~~~~~~
 }}}

 For php80-odbc it looks the same:

 {{{
 php-8.0.30/ext/pdo_odbc/odbc_stmt.c:887:2: error: incompatible function
 pointer types initializing 'pdo_stmt_get_col_data_func' (aka 'int
 (*)(struct _pdo_stmt_t *, int, char **, unsigned long *, int *)') with an
 expression of type 'int (pdo_stmt_t *, int, char **, zend_ulong *, int *)'
 (aka 'int (struct _pdo_stmt_t *, int, char **, unsigned long long *, int
 *)') [-Wincompatible-function-pointer-types]
   887 |         odbc_stmt_get_col,
       |         ^~~~~~~~~~~~~~~~~
 }}}

 Indeed the reason I keep even EOL PHP versions available in MacPorts is
 because people may need them for old projects. This used to be easier to
 do. Unfortunately in recent years Apple has been releasing compilers that
 consider more and more old code practices to be errors. We now get to
 either disable those errors or identify and backport fixes for the code.

-- 
Ticket URL: <https://trac.macports.org/ticket/71025#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list