patches for linux clang

This commit is contained in:
Jeremy Tregunna 2017-10-06 12:10:11 -06:00
parent 86a08130d9
commit 87201120eb
Signed by: jer
GPG Key ID: 1278B36BA6F5D5E4
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,5 @@
CC=clang
CFLAGS=-Wall -Wextra -Werror -Os -I/usr/local/include
CFLAGS=-Wall -Wextra -Werror -Os -I/usr/local/include -fblocks
OBJECTS=refuse.o deque.o
LIB=librefuse.a

View File

@ -4,6 +4,10 @@
#include <string.h>
#include "refuse.h"
#ifndef __unused
#define __unused __attribute__((unused))
#endif
static inline refhdr_t* _refuse_header(void* ptr)
{
return (refhdr_t*)((char*)ptr - sizeof(refhdr_t));
@ -87,4 +91,4 @@ void refuse_release(refuse_t* refuse, void* ptr)
{
refhdr_t* hdr = _refuse_header(ptr);
refdeque_push_back(refuse->dec, hdr);
}
}