Skip to content

3.0-git: upnp: FTBFS

As of a8e6a381, builds fail on Debian unstable:

../../modules/services_discovery/upnp.cpp: In function ‘bool necessaryFlagsSetOnInterface(ifaddrs*)’:
../../modules/services_discovery/upnp.cpp:1607:37: error: invalid use of incomplete type ‘struct ifaddrs’
 1607 |     unsigned int flags = anInterface->ifa_flags;
      |                                     ^~
../../modules/services_discovery/upnp.cpp:1605:49: note: forward declaration of ‘struct ifaddrs’
 1605 | inline bool necessaryFlagsSetOnInterface(struct ifaddrs *anInterface)
      |                                                 ^~~~~~~
../../modules/services_discovery/upnp.cpp: In function ‘char* getPreferedAdapter()’:
../../modules/services_discovery/upnp.cpp:1618:15: error: ‘getifaddrs’ was not declared in this scope; did you mean ‘ifaddrs’?
 1618 |     int ret = getifaddrs(&listOfInterfaces);
      |               ^~~~~~~~~~
      |               ifaddrs
../../modules/services_discovery/upnp.cpp:1629:45: error: invalid use of incomplete type ‘struct ifaddrs’
 1629 |             adapterName = strdup(anInterface->ifa_name);
      |                                             ^~
../../modules/services_discovery/upnp.cpp:1605:49: note: forward declaration of ‘struct ifaddrs’
 1605 | inline bool necessaryFlagsSetOnInterface(struct ifaddrs *anInterface)
      |                                                 ^~~~~~~
../../modules/services_discovery/upnp.cpp:1633:34: error: invalid use of incomplete type ‘struct ifaddrs’
 1633 |         anInterface = anInterface->ifa_next;
      |                                  ^~
../../modules/services_discovery/upnp.cpp:1605:49: note: forward declaration of ‘struct ifaddrs’
 1605 | inline bool necessaryFlagsSetOnInterface(struct ifaddrs *anInterface)
      |                                                 ^~~~~~~
../../modules/services_discovery/upnp.cpp:1635:5: error: ‘freeifaddrs’ was not declared in this scope; did you mean ‘ifaddrs’?
 1635 |     freeifaddrs(listOfInterfaces);
      |     ^~~~~~~~~~~
      |     ifaddrs
../../modules/services_discovery/upnp.cpp: In member function ‘bool Access::MediaServer::addItem(IXML_Element*)’:
../../modules/services_discovery/upnp.cpp:1087:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1087 |                 if (!p_item) {
      |                 ^~
../../modules/services_discovery/upnp.cpp:1091:13: note: here
 1091 |             case ItemDescriptionHolder::VIDEO:
      |             ^~~~
make[4]: *** [Makefile:26740: services_discovery/libupnp_plugin_la-upnp.lo] Error 1

See also https://code.videolan.org/videolan/vlc-3.0/-/jobs/416777.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information