[coreboot-gerrit] New patch to review for coreboot: include/stddef: Ensure NULL is not redefined

Furquan Shaikh (furquan@google.com) gerrit at coreboot.org
Thu Dec 8 05:36:27 CET 2016


Furquan Shaikh (furquan at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17773

-gerrit

commit e4b49d7ff0dbc1c288a68fb6d40d44d7ee396116
Author: Furquan Shaikh <furquan at chromium.org>
Date:   Wed Dec 7 20:34:32 2016 -0800

    include/stddef: Ensure NULL is not redefined
    
    Some third party libraries might define NULL and so it is important to
    ensure that NULL is not redefined by stddef. Thus, add a check before
    defining NULL.
    
    Change-Id: I600083c5d8f672518beaa1119f14f67728a433aa
    Signed-off-by: Furquan Shaikh <furquan at chromium.org>
---
 src/include/stddef.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/include/stddef.h b/src/include/stddef.h
index d0308d2..e6ed703 100644
--- a/src/include/stddef.h
+++ b/src/include/stddef.h
@@ -19,7 +19,9 @@ typedef __SIZE_TYPE__ ssize_t;
 typedef int wchar_t;
 typedef unsigned int wint_t;
 
+#ifndef NULL
 #define NULL ((void *)0)
+#endif
 
 #ifdef __PRE_RAM__
 #define ROMSTAGE_CONST const



More information about the coreboot-gerrit mailing list