Add missing includes (#131)
authorJames Price <jrprice@google.com>
Fri, 4 Dec 2020 21:31:14 +0000 (16:31 -0500)
committerGitHub <noreply@github.com>
Fri, 4 Dec 2020 21:31:14 +0000 (16:31 -0500)
* Add missing includes

This is causing problems with recent Xcode version on macOS.

* Enable macOS in GitHub Actions

.github/workflows/presubmit.yml
loader/linux/icd_linux_envvars.c
test/loader_test/icd_test_match.c

index 72ffef519fb464c2f5e13daf2a3dfd6d3ae99a4c..d520ae921a4cdeb6ed6d643dc24179e107b3dd27 100644 (file)
@@ -7,7 +7,7 @@ jobs:
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
-        os: [ubuntu-20.04] # TODO: add macos-11.0
+        os: [ubuntu-20.04, macos-11.0]
 
     steps:
       - uses: actions/checkout@v2
index 4af5a082d8606ae6a789d1945746af039dd2348d..bfac87c2b0a36d2b0442d8761c3c88f28860ea27 100644 (file)
@@ -24,6 +24,7 @@
 #include "icd_cmake_config.h"
 
 #include <stdlib.h>
+#include <unistd.h>
 
 char *khrIcd_getenv(const char *name) {
     // No allocation of memory necessary for Linux.
index a8330b4a26c22fac79c32930ea412573caaba1b5..c9207a3715c08b070899b310a92eae3345e73604 100644 (file)
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #ifndef __APPLE__
 #include <malloc.h>