[Mesa-dev] [PATCH] util: include missing stdlib header

Juan A. Suarez Romero jasuarez at igalia.com
Wed May 1 07:18:01 UTC 2019


Fixes scons/mingw building:

src/util/os_file.c: In function ‘os_read_file’:
src/util/os_file.c:126:11: error: ‘NULL’ undeclared (first use in this function); did you mean ‘_DLL’?
    return NULL;
           ^~~~
           _DLL
src/util/os_file.c:126:11: note: each undeclared identifier is reported only once for each function it appears in

Fixes: 316964709e2 ("util: add os_read_file() helper")
CC: Eric Engestrom <eric.engestrom at intel.com>
---
 src/util/os_file.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/util/os_file.h b/src/util/os_file.h
index 2f97c19ed55..97c42b0aefc 100644
--- a/src/util/os_file.h
+++ b/src/util/os_file.h
@@ -12,6 +12,7 @@
 extern "C" {
 #endif
 
+#include <stdlib.h>
 /*
  * Read a file.
  * Returns a char* that the caller must free(), or NULL and sets errno.
-- 
2.20.1



More information about the mesa-dev mailing list