reallocarray.h (456B)
- // utils-std: Collection of commonly available Unix tools
- // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- // SPDX-License-Identifier: 0BSD
- #ifndef _BSD_SOURCE
- # if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 202405L
- # error reallocarray needs: define _POSIX_C_SOURCE 202405L or define _BSD_SOURCE
- # endif
- #endif
- #include <stdlib.h> // reallocarray
- void *utils_reallocarray(void *ptr, size_t m, size_t n);