cmake: Set a value for each portability define.

Submitted by Vinson Lee on May 5, 2018, 11:44 p.m.

Details

Message ID 20180505234435.26633-1-vlee@freedesktop.org
State New
Headers show
Series "cmake: Set a value for each portability define." ( rev: 2 ) in Piglit

Not browsing as part of any series.

Commit Message

Vinson Lee May 5, 2018, 11:44 p.m.
Fix macOS 10.13 build error with HAVE_UNISTD_H having no value.

In file included from tests/util/piglit-util-cl.c:26:
In file included from tests/util/piglit-util-cl.h:29:
In file included from tests/util/piglit-util-cl-enum.h:34:
In file included from /System/Library/Frameworks/OpenCL.framework/Headers/opencl.h:16:
In file included from /System/Library/Frameworks/OpenCL.framework/Headers/gcl.h:23:
/usr/include/dispatch/dispatch.h:38:45: error: expected value in expression
#if !defined(HAVE_UNISTD_H) || HAVE_UNISTD_H
                                            ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
---
 tests/util/config.h.in | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/util/config.h.in b/tests/util/config.h.in
index c6e23db1a766..6bb6b2db93fd 100644
--- a/tests/util/config.h.in
+++ b/tests/util/config.h.in
@@ -1,13 +1,13 @@ 
-#cmakedefine HAVE_ASPRINTF
-#cmakedefine HAVE_FFS
-#cmakedefine HAVE_STRCHRNUL
-#cmakedefine HAVE_FOPEN_S
-#cmakedefine HAVE_SETRLIMIT
-#cmakedefine HAVE_STRNDUP
+#cmakedefine HAVE_ASPRINTF 1
+#cmakedefine HAVE_FFS 1
+#cmakedefine HAVE_STRCHRNUL 1
+#cmakedefine HAVE_FOPEN_S 1
+#cmakedefine HAVE_SETRLIMIT 1
+#cmakedefine HAVE_STRNDUP 1
 
-#cmakedefine HAVE_FCNTL_H
-#cmakedefine HAVE_SYS_STAT_H
-#cmakedefine HAVE_SYS_TYPES_H
-#cmakedefine HAVE_SYS_TIME_H
-#cmakedefine HAVE_SYS_RESOURCE_H
-#cmakedefine HAVE_UNISTD_H
+#cmakedefine HAVE_FCNTL_H 1
+#cmakedefine HAVE_SYS_STAT_H 1
+#cmakedefine HAVE_SYS_TYPES_H 1
+#cmakedefine HAVE_SYS_TIME_H 1
+#cmakedefine HAVE_SYS_RESOURCE_H 1
+#cmakedefine HAVE_UNISTD_H 1