From 12f94f27703032f1cd17924b352158a723a4ef7c Mon Sep 17 00:00:00 2001 From: seyko Date: Sun, 25 Oct 2015 00:19:12 +0300 Subject: [PATCH] include/stddef.h: define NULL only if undefined --- include/stddef.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/stddef.h b/include/stddef.h index 9e43de9..791ba31 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -20,7 +20,10 @@ typedef unsigned int uint32_t; typedef unsigned long long int uint64_t; #endif +#ifndef NULL #define NULL ((void*)0) +#endif + #define offsetof(type, field) ((size_t)&((type *)0)->field) void *alloca(size_t size);