Description:
The functions in my_list.h (/usr/include/mysql/my_list.h on my system) do not have a prefix of my_ or mysql_. This causes name clashes when compiling an application with libmysql which uses the same function names.
From my_list.h:
struct st_list *prev,*next;
void *data;
} LIST;
typedef int (*list_walk_action)(void *,void *);
extern LIST *list_add(LIST *root,LIST *element);
extern LIST *list_delete(LIST *root,LIST *element);
extern LIST *list_cons(void *data,LIST *root);
extern LIST *list_reverse(LIST *root);
extern void list_free(LIST *root,pbool free_data);
extern uint list_length(LIST *list);
extern int list_walk(LIST *list,list_walk_action action,gptr argument);
#define rest(a) ((a)->next)
#define list_push(a,b) (a)=list_cons((b),(a))
#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
How to repeat:
try to compile a program with libmysql-4.1.0-alpha (of course #include <mysql/mysql.h>), that itself has a function from the list above (e.g. list_add)
Suggested fix:
Add a prefix (my_ or mysql_) to the functions and macros.