Loading tools/include/nolibc/sys.h +23 −0 Original line number Diff line number Diff line Loading @@ -1365,6 +1365,29 @@ ssize_t write(int fd, const void *buf, size_t count) return ret; } /* * int memfd_create(const char *name, unsigned int flags); */ static __attribute__((unused)) int sys_memfd_create(const char *name, unsigned int flags) { return my_syscall2(__NR_memfd_create, name, flags); } static __attribute__((unused)) int memfd_create(const char *name, unsigned int flags) { ssize_t ret = sys_memfd_create(name, flags); if (ret < 0) { SET_ERRNO(-ret); ret = -1; } return ret; } /* make sure to include all global symbols */ #include "nolibc.h" Loading Loading
tools/include/nolibc/sys.h +23 −0 Original line number Diff line number Diff line Loading @@ -1365,6 +1365,29 @@ ssize_t write(int fd, const void *buf, size_t count) return ret; } /* * int memfd_create(const char *name, unsigned int flags); */ static __attribute__((unused)) int sys_memfd_create(const char *name, unsigned int flags) { return my_syscall2(__NR_memfd_create, name, flags); } static __attribute__((unused)) int memfd_create(const char *name, unsigned int flags) { ssize_t ret = sys_memfd_create(name, flags); if (ret < 0) { SET_ERRNO(-ret); ret = -1; } return ret; } /* make sure to include all global symbols */ #include "nolibc.h" Loading