newlib: stub sysconf()

This commit is contained in:
Giacomo Tesio 2019-11-13 18:14:27 +01:00
parent fef0609608
commit bba2bd97b3
2 changed files with 27 additions and 2 deletions

View File

@ -8,7 +8,7 @@ if MAY_SUPPLY_SYSCALLS
extra_objs = syscalls.o libposix_conf.o chown.o getrusage.o ids.o \
chmod.o sigsets.o sigaction.o sigsuspend.o sigwaitinfo.o \
sigtimedwait.o sigwait.o alarm.o sigqueue.o siglongjmp.o \
termios.o ioctl.o
termios.o ioctl.o sysconf.o
else
extra_objs =
endif
@ -21,7 +21,7 @@ lib_a_LIBADD = $(extra_objs)
EXTRA_lib_a_SOURCES = libposix_conf.c syscalls.c chown.c getrusage.c \
ids.c chmod.c sigsets.c sigaction.c sigsuspend.c sigwaitinfo.c \
sigtimedwait.c sigwait.c alarm.c sigqueue.c siglongjmp.c \
termios.c ioctl.c
termios.c ioctl.c sysconf.c
lib_a_DEPENDENCIES = $(extra_objs)
lib_a_CCASFLAGS = $(AM_CCASFLAGS)
lib_a_CFLAGS = $(AM_CFLAGS)

View File

@ -0,0 +1,25 @@
/*
* This file is part of Jehanne.
*
* Copyright (C) 2019 Giacomo Tesio <giacomo@tesio.it>
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, version 3 of the License.
*
* Jehanne is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with Jehanne. If not, see <http://www.gnu.org/licenses/>.
*/
#include <errno.h>
long sysconf(int name)
{
/* TODO: implement. */
errno = ENOSYS;
return -1;
}