drm-shim: Allow drm-shim to work with glibc fortify.

Signed-off-by: David Riley <davidriley@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18558>
This commit is contained in:
David Riley 2022-07-08 13:23:23 -07:00 committed by Marge Bot
parent e2eb1d083c
commit 4031c9428f

View file

@ -293,6 +293,13 @@ PUBLIC int open(const char *path, int flags, ...)
}
PUBLIC int open64(const char*, int, ...) __attribute__((alias("open")));
/* __open64_2 isn't declared unless _FORTIFY_SOURCE is defined. */
PUBLIC int __open64_2(const char *path, int flags);
PUBLIC int __open64_2(const char *path, int flags)
{
return open(path, flags, 0);
}
PUBLIC int close(int fd)
{
init_shim();