42ity / fty-sensor-gpio

Agent to manage GPIO sensors and devices
Other
0 stars 9 forks source link

Portability: struct map template #4

Closed jimklimov closed 2 months ago

jimklimov commented 7 years ago

Note: this component is rather hardware-specific, so its portability in particular may be a lesser issue.

This error is reported in several files of the component:

  CXX      src/src_fty_sensor_gpio-fty_sensor_gpio.o
In file included from /tmp/FTY/.install/SunOS-i86pc-czmq_3/usr/include/czmq_prelude.h:590:0,
                 from /tmp/FTY/.install/SunOS-i86pc-czmq_3/usr/include/czmq_library.h:24,
                 from /tmp/FTY/.install/SunOS-i86pc-czmq_3/usr/include/czmq.h:30,
                 from ../../../.srcclone/SunOS-i86pc-czmq_3/fty-sensor-gpio/src/../include/fty_sensor_gpio_library.h:33,
                 from ../../../.srcclone/SunOS-i86pc-czmq_3/fty-sensor-gpio/src/../include/fty_sensor_gpio.h:33,
                 from ../../../.srcclone/SunOS-i86pc-czmq_3/fty-sensor-gpio/src/fty_sensor_gpio_classes.h:33,
                 from ../../../.srcclone/SunOS-i86pc-czmq_3/fty-sensor-gpio/src/libgpio.cc:29:
/usr/include/net/if.h:97:9: error: template argument required for 'struct map'
  struct map *if_memmap;  /* rmap for interface specific memory */
         ^
gmake[2]: *** [Makefile:1030: src/src_libfty_sensor_gpio_la-libgpio.lo] Error 1
aquette commented 7 years ago

@jimklimov : strange! Isn't this reported the same way in other agent since this is a czmq issue?

jimklimov commented 7 years ago

Strangely - no. Maybe this originates from specific things used by this C source, or happens to have a naming overlap...

I posted all such portability problems found by attempting to build FTY on another platform, and really there are not many left. Whether it would run is another matter :) but obedience of code, including system headers, to specific standards, varies from OS to OS and might bite if we are to e.g. deliver packages for other distros at some point. So at least something to be aware of...