mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-03-11 18:13:41 +00:00
fix for gcc 10 multiple definition errors
This commit is contained in:
34
src/logging.c
Normal file
34
src/logging.c
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
# #
|
||||||
|
# uStreamer - Lightweight and fast MJPG-HTTP streamer. #
|
||||||
|
# #
|
||||||
|
# Copyright (C) 2018 Maxim Devaev <mdevaev@gmail.com> #
|
||||||
|
# #
|
||||||
|
# This program is free software: you can redistribute it and/or modify #
|
||||||
|
# it under the terms of the GNU General Public License as published by #
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or #
|
||||||
|
# (at your option) any later version. #
|
||||||
|
# #
|
||||||
|
# This program is distributed in the hope that it will be useful, #
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
|
||||||
|
# GNU General Public License for more details. #
|
||||||
|
# #
|
||||||
|
# You should have received a copy of the GNU General Public License #
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>. #
|
||||||
|
# #
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#include "logging.h"
|
||||||
|
|
||||||
|
|
||||||
|
enum log_level_t log_level;
|
||||||
|
|
||||||
|
bool log_colored;
|
||||||
|
|
||||||
|
pthread_mutex_t log_mutex;
|
||||||
@@ -37,16 +37,19 @@
|
|||||||
#include "threading.h"
|
#include "threading.h"
|
||||||
|
|
||||||
|
|
||||||
enum {
|
enum log_level_t {
|
||||||
LOG_LEVEL_INFO,
|
LOG_LEVEL_INFO,
|
||||||
LOG_LEVEL_PERF,
|
LOG_LEVEL_PERF,
|
||||||
LOG_LEVEL_VERBOSE,
|
LOG_LEVEL_VERBOSE,
|
||||||
LOG_LEVEL_DEBUG,
|
LOG_LEVEL_DEBUG,
|
||||||
} log_level;
|
};
|
||||||
|
|
||||||
bool log_colored;
|
|
||||||
|
|
||||||
pthread_mutex_t log_mutex;
|
extern enum log_level_t log_level;
|
||||||
|
|
||||||
|
extern bool log_colored;
|
||||||
|
|
||||||
|
extern pthread_mutex_t log_mutex;
|
||||||
|
|
||||||
|
|
||||||
#define LOGGING_INIT { \
|
#define LOGGING_INIT { \
|
||||||
|
|||||||
Reference in New Issue
Block a user