Define Linux-specific O_PATH and MAP_LOCKED flags to 0 on FreeBSD

This commit is contained in:
Gleb Popov 2021-02-24 19:01:51 +03:00 committed by Wim Taymans
parent 3faf388821
commit c5e42aa9db
2 changed files with 7 additions and 0 deletions

View file

@ -36,6 +36,9 @@
#if HAVE_PWD_H
#include <pwd.h>
#endif
#ifdef __FreeBSD__
#define O_PATH 0
#endif
#include <spa/utils/result.h>
#include <spa/utils/json.h>

View file

@ -60,6 +60,10 @@ static inline int memfd_create(const char *name, unsigned int flags)
#define HAVE_MEMFD_CREATE 1
#endif
#ifdef __FreeBSD__
#define MAP_LOCKED 0
#endif
/* memfd_create(2) flags */
#ifndef MFD_CLOEXEC