diff options
author | Brian Paul <[email protected]> | 2017-10-23 15:25:24 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-10-24 08:17:15 -0600 |
commit | 7a6c6e73a827471b73cafc897bb706b16afaadd7 (patch) | |
tree | cb0140c4f4c8daaaaf372aa53f7122be57904c08 | |
parent | de3555f83497498201aeea111292654e95fb5bd4 (diff) |
gallium/util: use util_snprintf() in u_socket_connect()
Instead of plain snprintf(). To fix the MSVC build.
snprintf() is used in various places in Mesa/gallium, but apparently,
not in code built with MSVC.
Reviewed-by: Eric Engestrom <[email protected]>
-rw-r--r-- | src/gallium/auxiliary/util/u_network.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_network.c b/src/gallium/auxiliary/util/u_network.c index a7a4d28abcd..203205dc621 100644 --- a/src/gallium/auxiliary/util/u_network.c +++ b/src/gallium/auxiliary/util/u_network.c @@ -2,6 +2,7 @@ #include "pipe/p_compiler.h" #include "util/u_network.h" #include "util/u_debug.h" +#include "util/u_string.h" #include <stdio.h> #if defined(PIPE_SUBSYSTEM_WINDOWS_USER) @@ -120,7 +121,7 @@ u_socket_connect(const char *hostname, uint16_t port) hints.ai_family = AF_UNSPEC; // AF_INET or AF_INET6 to force version hints.ai_socktype = SOCK_STREAM; - snprintf(portString, sizeof(portString), "%d", port); + util_snprintf(portString, sizeof(portString), "%d", port); r = getaddrinfo(hostname, portString, NULL, &addr); if (r != 0) { |