[ARGUS] argus-clients and mysql8

Andreas Hasenack andreas at canonical.com
Mon Aug 10 11:06:14 EDT 2020


On Mon, Aug 10, 2020 at 11:53 AM Andreas Hasenack <andreas at canonical.com> wrote:
>
> Hi,
>
> On Mon, Aug 10, 2020 at 11:13 AM Andreas Hasenack <andreas at canonical.com> wrote:
> >
> > That failed to build with mysql5.7:
> > ./rasql.c: In function ‘RaMySQLInit’:
> > ../../include/argus_mysql.h:10:20: error: unknown type name ‘bool’;
> > did you mean ‘_Bool’?
> >  #   define my_bool bool
> >                     ^
> > It shouldn't be trying to redefine my_bool with mysql 5.7. Looks like
> > the "if !defined(my_bool)" didn't work as expected.
> > In mysql5.7 my_bool is a typedef to char, would that explain it?
> >
> > Switching that clause to #ifndef my_bool seemed to work in both
> > mysql5.7 and 8. Weird, I thought these #if's were the same:
>
> Scratch that, it's not working either way. I don't know yet, but the
> my_bool check is always returning as if it's not defined.

Ok, we can't use #ifdef checks for my_bool because it's not something
that is #define'd, it's a typedef (in the case of mysql 5.7). This
probably needs a configure.ac check.


More information about the argus mailing list