adds missing symbols and sources for libwrap

This commit is contained in:
2023-09-28 11:51:20 +02:00
parent e91ce0148b
commit aab4d1f2a0
7 changed files with 43 additions and 4 deletions

View File

@ -2,8 +2,12 @@
#include <errno.h>
#include "stub.h"
#include "weak_under_alias.h"
int __wrap_close(int fd)
{
return _stub(EBADF);
}
weak_under_alias(close);

View File

@ -4,6 +4,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include "stub.h"
#include "weak_under_alias.h"
int __wrap_fstat(int fd, struct stat* st)
{
@ -14,3 +15,5 @@ int __wrap_fstat(int fd, struct stat* st)
return _stub(EBADF);
}
weak_under_alias(fstat);

View File

@ -4,6 +4,7 @@
#include <unistd.h>
#include <sys/types.h>
#include "stub.h"
#include "weak_under_alias.h"
off_t __wrap_lseek(int fd, off_t ptr, int dir)
{
@ -12,3 +13,6 @@ off_t __wrap_lseek(int fd, off_t ptr, int dir)
return _stub(EBADF);
}
weak_under_alias(lseek);

View File

@ -7,6 +7,7 @@
#include "platform.h"
#include "stub.h"
#include "weak_under_alias.h"
ssize_t __wrap_read(int fd, void* ptr, size_t len)
{
@ -28,3 +29,5 @@ ssize_t __wrap_read(int fd, void* ptr, size_t len)
return _stub(EBADF);
}
weak_under_alias(read);

View File

@ -1,6 +1,7 @@
/* See LICENSE of license details. */
#include <stddef.h>
#include "weak_under_alias.h"
void *__wrap_sbrk(ptrdiff_t incr)
{
@ -14,3 +15,5 @@ void *__wrap_sbrk(ptrdiff_t incr)
curbrk += incr;
return curbrk - incr;
}
weak_under_alias(sbrk);

View File

@ -7,6 +7,7 @@
#include "platform.h"
#include "stub.h"
#include "weak_under_alias.h"
ssize_t __wrap_write(int fd, const void* ptr, size_t len)
{
@ -27,3 +28,4 @@ ssize_t __wrap_write(int fd, const void* ptr, size_t len)
return _stub(EBADF);
}
weak_under_alias(write);