From f2299abab53a7c3b05c7ec8060ce30cb331818c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 19 Jul 2012 10:56:49 +0200 Subject: [PATCH] libports: remove passwd functions from libc Removes getpwent.c from build because the passwd facilities provided by the FreeBSD libc will not be used anyway and add stub functions instead. Now services which need these functions have to implement their own (e.g. libc_noux). --- libports/lib/mk/libc-gen.inc | 2 +- libports/src/lib/libc/dummies.cc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libports/lib/mk/libc-gen.inc b/libports/lib/mk/libc-gen.inc index edf8af319c..9471ac35b9 100644 --- a/libports/lib/mk/libc-gen.inc +++ b/libports/lib/mk/libc-gen.inc @@ -1,7 +1,7 @@ LIBC_GEN_DIR = $(LIBC_DIR)/libc/gen # this file produces a warning about a missing header file, lets drop it -FILTER_OUT_C += getosreldate.c sem.c valloc.c +FILTER_OUT_C += getosreldate.c sem.c valloc.c getpwent.c SRC_C = $(filter-out $(FILTER_OUT_C),$(notdir $(wildcard $(LIBC_GEN_DIR)/*.c))) diff --git a/libports/src/lib/libc/dummies.cc b/libports/src/lib/libc/dummies.cc index 7f36207ef6..c391aeba06 100644 --- a/libports/src/lib/libc/dummies.cc +++ b/libports/src/lib/libc/dummies.cc @@ -36,6 +36,7 @@ DUMMY(-1, dup) DUMMY( 0, __default_hash) DUMMY(-1, _dup2) DUMMY(-1, dup2) +DUMMY( 0, endpwent) DUMMY(-1, _execve) DUMMY(-1, execve) DUMMY(-1, fchmod) @@ -67,6 +68,9 @@ DUMMY(-1, getsid) DUMMY(-1, getppid) DUMMY(-1, getpgrp) DUMMY(-1, getpriority) +DUMMY( 0, getpwent) +DUMMY( 0, getpwnam) +DUMMY( 0, getpwuid) DUMMY(-1, __getpty) DUMMY(-1, _getpty) DUMMY(-1, getrusage) @@ -112,8 +116,10 @@ DUMMY(-1, setgid) DUMMY(-1, setuid) DUMMY(-1, setgroups) DUMMY(-1, setitimer) +DUMMY(-1, setpassent) DUMMY(-1, setpgid) DUMMY(-1, setpriority) +DUMMY( 0, setpwent) DUMMY(-1, setregid) DUMMY(-1, setreuid) DUMMY(-1, setrlimit)