mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-17 03:08:07 +02:00
../../src/util/strndup.h:37:1: warning: declaration of 'strndup' shadows a built-in function [-Wshadow]
37 | strndup(const char *str, size_t max)
| ^~~~~~~
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37289>
27 lines
348 B
C
27 lines
348 B
C
/*
|
|
* Copyright (c) 2015 Intel Corporation
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#ifndef STRNDUP_H
|
|
#define STRNDUP_H
|
|
|
|
#if defined(_WIN32)
|
|
|
|
#include <stdlib.h> // size_t
|
|
#include <string.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
char *
|
|
strndup(const char *str, size_t max);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _WIN32 */
|
|
|
|
#endif /* STRNDUP_H */
|