Fix clang -Wtypedef-redefinition

Fixup for commit 77c184df7c
This commit is contained in:
Marko Mäkelä 2022-03-11 15:33:59 +02:00
parent 3c9f415e52
commit 33c30da165
6 changed files with 12 additions and 10 deletions

View file

@ -20,7 +20,7 @@
#ifndef _my_alloc_h
#define _my_alloc_h
typedef unsigned int PSI_memory_key;
#include "mysql/psi/psi_base.h"
#define ALLOC_MAX_BLOCK_TO_DROP 4096
#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10

View file

@ -238,7 +238,9 @@ typedef struct st_mysql_field {
typedef char **MYSQL_ROW;
typedef unsigned int MYSQL_FIELD_OFFSET;
typedef unsigned long long my_ulonglong;
extern "C" {
typedef unsigned int PSI_memory_key;
}
extern "C" {
typedef struct st_used_mem
{

View file

@ -1,8 +1,8 @@
extern "C" {
typedef unsigned int PSI_memory_key;
}
extern "C" {
struct PSI_thread;
typedef unsigned int PSI_memory_key;
struct PSI_memory_info_v1
{
PSI_memory_key *m_key;

View file

@ -1,8 +1,8 @@
extern "C" {
typedef unsigned int PSI_memory_key;
}
extern "C" {
struct PSI_thread;
typedef unsigned int PSI_memory_key;
struct PSI_memory_info_v2
{
int placeholder;

View file

@ -164,6 +164,13 @@ extern "C" {
/** @} */
/**
Instrumented memory key.
To instrument memory, a memory key must be obtained using @c register_memory.
Using a zero key always disable the instrumentation.
*/
typedef unsigned int PSI_memory_key;
#ifdef __cplusplus
}
#endif

View file

@ -53,13 +53,6 @@ extern "C" {
struct PSI_thread;
/**
Instrumented memory key.
To instrument memory, a memory key must be obtained using @c register_memory.
Using a zero key always disable the instrumentation.
*/
typedef unsigned int PSI_memory_key;
#ifdef HAVE_PSI_1
/**