From 99c2f4f0d474e043227666fa88a010fbaa40bad9 Mon Sep 17 00:00:00 2001 From: damage Date: Sun, 25 May 2025 16:19:28 +0200 Subject: [PATCH] prevent multi include --- controller/ringbuffer.c | 2 ++ controller/ringbuffer.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/controller/ringbuffer.c b/controller/ringbuffer.c index 03c76cd..bdf7660 100644 --- a/controller/ringbuffer.c +++ b/controller/ringbuffer.c @@ -1,4 +1,6 @@ +#ifndef RINGBUFFER_H #include "ringbuffer.h" +#endif void _ringBufferIncReader(struct ringBuffer *buf) { buf->reader += buf->blockSize; diff --git a/controller/ringbuffer.h b/controller/ringbuffer.h index 4c19bd3..ac91cd6 100644 --- a/controller/ringbuffer.h +++ b/controller/ringbuffer.h @@ -6,6 +6,8 @@ #include #endif +#define RINGBUFFER_H + struct ringBuffer { void *buffer; int blocks;