FDH2 / UxPlay

AirPlay Unix mirroring server
GNU General Public License v3.0
1.53k stars 78 forks source link

Add wrapper to accomodate API changes in libplist-2.5.0 : DONE (was: cannot build source when using libplist 2.5.0) #294

Closed tiloburgey closed 4 months ago

tiloburgey commented 4 months ago

Hi,

I downgraded the version of libplist to version 2.4.0 and the build was possible, but once I used the latest(2.5.0) libplist version the build failed here is an example of the error output.

UxPlay/lib/raop_handlers.h:285:41: error: passing argument 2 of ‘plist_get_data_val’ from incompatible pointer type [-Wincompatible-pointer-types]
  285 |         plist_get_data_val(req_pk_node, &client_pk, &client_pk_len);
      |                                         ^~~~~~~~~~
      |                                         |
      |                                         char **
/usr/include/plist/plist.h:758:63: note: expected ‘uint8_t **’ {aka ‘unsigned char **’} but argument is of type ‘char **’
  758 |     PLIST_API void plist_get_data_val(plist_t node, uint8_t **val, uint64_t * length);
      | 

UxPlay/lib/raop_handlers.h:626:43: error: passing argument 2 of ‘plist_get_data_val’ from incompatible pointer type [-Wincompatible-pointer-types]
  626 |         plist_get_data_val(req_ekey_node, &ekey, &ekey_len);
      |                                           ^~~~~
      |                                           |
      |                                           char **
/usr/include/plist/plist.h:758:63: note: expected ‘uint8_t **’ {aka ‘unsigned char **’} but argument is of type ‘char **’
  758 |     PLIST_API void plist_get_data_val(plist_t node, uint8_t **val, uint64_t * length);
fduncanh commented 4 months ago

Thanks for alerting us.

I have asked the libplist maintainer to revert this gratuitous and unnecessary change. If it doesn't get reverted, some cmake code to check the libplist version will be needed.

fduncanh commented 4 months ago

This is now fixed in uxplay (github code) with detection of libplist >= 2.5.0 and a wrapper.

fduncanh commented 4 months ago

the libplist maintainer has now reverted the changes and released libplist-2.6.0