forked from Firmware/Firmwares
adds missing symbols and sources for libwrap
This commit is contained in:
parent
9c0047b3ea
commit
eeb17437ee
@ -24,16 +24,36 @@ LIBWRAP_SRCS := \
|
||||
sys/times.c \
|
||||
sys/sbrk.c \
|
||||
sys/_exit.c \
|
||||
sys/puts.c \
|
||||
misc/write_hex.c \
|
||||
sys/printf.c
|
||||
|
||||
LIBWRAP_SRCS := $(foreach f,$(LIBWRAP_SRCS),$(LIBWRAP_DIR)/$(f))
|
||||
LIBWRAP_OBJS := $(LIBWRAP_SRCS:.c=.o)
|
||||
|
||||
LIBWRAP_SYMS := malloc free \
|
||||
open lseek read write fstat stat close link unlink \
|
||||
execve fork getpid kill wait \
|
||||
isatty times sbrk _exit
|
||||
LIBWRAP_SYMS := \
|
||||
malloc \
|
||||
open \
|
||||
lseek _lseek\
|
||||
read _read\
|
||||
write _write\
|
||||
fstat _fstat\
|
||||
stat \
|
||||
close _close\
|
||||
link \
|
||||
unlink \
|
||||
execve \
|
||||
fork \
|
||||
getpid \
|
||||
kill \
|
||||
wait \
|
||||
isatty \
|
||||
times \
|
||||
sbrk _sbrk\
|
||||
_exit \
|
||||
puts _puts\
|
||||
printf \
|
||||
sprintf
|
||||
|
||||
LIBWRAP := libwrap.a
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user