Mesa (staging/20.0): util/os_socket: fix header unavailable on windows

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 5 17:05:47 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: 26adf4b5326ce3188e9133af17eb63386c1c8a84
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=26adf4b5326ce3188e9133af17eb63386c1c8a84

Author: Eric Engestrom <eric at engestrom.ch>
Date:   Tue Feb  4 16:23:59 2020 +0000

util/os_socket: fix header unavailable on windows

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2464
Fixes: e62c3cf350a8b169e640 ("util/os_socket: Include unistd.h to fix build error")
Signed-off-by: Eric Engestrom <eric at engestrom.ch>
Reviewed-by: Krzysztof Raszkowski <krzysztof.raszkowski at intel.com>
(cherry picked from commit d1165ad18b5e1d8b137daff1b1ad3d11ba4445e4)

---

 .pick_status.json    | 2 +-
 src/util/os_socket.h | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index ebda662f3d4..4793aae05b8 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -481,7 +481,7 @@
         "description": "util/os_socket: fix header unavailable on windows",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "e62c3cf350a8b169e6401d5f1e1f17388cdc4b77"
     },
diff --git a/src/util/os_socket.h b/src/util/os_socket.h
index db0dc905a2b..70b195184fa 100644
--- a/src/util/os_socket.h
+++ b/src/util/os_socket.h
@@ -10,10 +10,11 @@
 
 #include <stdio.h>
 #include <stdbool.h>
-#include <unistd.h>
 #ifdef _MSC_VER
 #include <BaseTsd.h>
 typedef SSIZE_T ssize_t;
+#else
+#include <unistd.h>
 #endif
 
 #ifdef __cplusplus



More information about the mesa-commit mailing list