patches for linux clang
This commit is contained in:
parent
86a08130d9
commit
87201120eb
2
Makefile
2
Makefile
@ -1,5 +1,5 @@
|
|||||||
CC=clang
|
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
|
OBJECTS=refuse.o deque.o
|
||||||
LIB=librefuse.a
|
LIB=librefuse.a
|
||||||
|
|
||||||
|
6
refuse.c
6
refuse.c
@ -4,6 +4,10 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "refuse.h"
|
#include "refuse.h"
|
||||||
|
|
||||||
|
#ifndef __unused
|
||||||
|
#define __unused __attribute__((unused))
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline refhdr_t* _refuse_header(void* ptr)
|
static inline refhdr_t* _refuse_header(void* ptr)
|
||||||
{
|
{
|
||||||
return (refhdr_t*)((char*)ptr - sizeof(refhdr_t));
|
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);
|
refhdr_t* hdr = _refuse_header(ptr);
|
||||||
refdeque_push_back(refuse->dec, hdr);
|
refdeque_push_back(refuse->dec, hdr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user