mirror of
https://github.com/shadow-maint/shadow.git
synced 2024-11-23 18:14:07 +08:00
69f74dbf8a
This makes it much simpler and portable. Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 lines
294 B
C
16 lines
294 B
C
// SPDX-FileCopyrightText: 2022-2024, Alejandro Colomar <alx@kernel.org>
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
#ifndef SHADOW_INCLUDE_LIB_CAST_H_
|
|
#define SHADOW_INCLUDE_LIB_CAST_H_
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
#define const_cast(T, p) _Generic(p, const T: (T) (p))
|
|
|
|
|
|
#endif // include guard
|