farsightsec / blog-code

Farsight Security Blog code
Apache License 2.0
10 stars 8 forks source link

sratesttool does not compile against current library version #5

Open jpicht opened 3 years ago

jpicht commented 3 years ago

Hi.

There are a few little problems compiling sratesttool agains the current lib version:

cc -Wall -Werror -g -O0   -c -o sratesttool.o sratesttool.c
sratesttool.c: In function ‘srvr_connect’:
sratesttool.c:252:30: error: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
  252 |     if (!axa_parse_ch(&emsg, &channel.ch, channel_str,
      |                              ^~~~~~~~~~~
sratesttool.c: In function ‘srvr_wait_resp’:
sratesttool.c:331:22: error: too few arguments to function ‘axa_client_hello’
  331 |                 if (!axa_client_hello(&emsg, &client, NULL))
      |                      ^~~~~~~~~~~~~~~~
In file included from sratesttool.c:22:
/usr/include/axa/client.h:244:13: note: declared here
  244 | extern bool axa_client_hello(axa_emsg_t *emsg, axa_client_t *client,
      |             ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [<builtin>: sratesttool.o] Error 1

I circumvented them for now, but it would be great if you could officially fix them.

rafaelvanoni commented 3 years ago

@jpicht Thanks for reporting this. Which version of libaxa do you have installed (and where did you download it from)?