1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

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 #ifndef _my_alloc_h
#define _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_TO_DROP 4096
#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10 #define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10

View File

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

View File

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

View File

@@ -1,8 +1,8 @@
extern "C" { extern "C" {
typedef unsigned int PSI_memory_key;
} }
extern "C" { extern "C" {
struct PSI_thread; struct PSI_thread;
typedef unsigned int PSI_memory_key;
struct PSI_memory_info_v2 struct PSI_memory_info_v2
{ {
int placeholder; 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 #ifdef __cplusplus
} }
#endif #endif

View File

@@ -53,13 +53,6 @@ extern "C" {
struct PSI_thread; 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 #ifdef HAVE_PSI_1
/** /**