Compare commits

..
3 Commits
Author SHA1 Message Date
Mike Frysinger b1cec5003b build system: use pkg-config to look up selinux libs
Newer versions of libselinux has started linking against more libs.
Rather than continuing hardcoding things, switch to using pkg-config
to query for its dependencies.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-10-20 15:30:25 -04:00
Mike Frysinger 246ea72843 include sys/resource.h where needed
We use functions from sys/resource.h in misc applets, but don't include
the header.  This breaks building with newer glibc versions, so add the
include where needed.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
(cherry picked from commit c5fe9f7b72)
2012-10-20 15:29:28 -04:00
Tias Guns 5a5dfcad6b inetd: fix build failure in Android
Signed-off-by: Tias Guns <tias@ulyssis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
(cherry picked from commit 64f763b42a)
2012-10-20 15:28:42 -04:00
9 changed files with 20 additions and 1 deletions

No files matched your search

+1
View File
@@ -297,6 +297,7 @@ NM = $(CROSS_COMPILE)nm
STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
AWK = awk
GENKSYMS = scripts/genksyms/genksyms
DEPMOD = /sbin/depmod
+11 -1
View File
@@ -74,6 +74,12 @@ ARCH_FPIC ?= -fpic
ARCH_FPIE ?= -fpie
ARCH_PIE ?= -pie
# Usage: $(eval $(call pkg_check_modules,VARIABLE-PREFIX,MODULES))
define pkg_check_modules
$(1)_CFLAGS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --cflags $(2))
$(1)_LIBS := $(shell $(PKG_CONFIG) $(PKG_CONFIG_FLAGS) --libs $(2))
endef
ifeq ($(CONFIG_BUILD_LIBBUSYBOX),y)
# on i386: 14% smaller libbusybox.so
# (code itself is 9% bigger, we save on relocs/PLT/GOT)
@@ -85,6 +91,7 @@ endif
ifeq ($(CONFIG_STATIC),y)
CFLAGS_busybox += -static
PKG_CONFIG_FLAGS += --static
endif
ifeq ($(CONFIG_PIE),y)
@@ -127,7 +134,10 @@ LDLIBS += pam pam_misc pthread
endif
ifeq ($(CONFIG_SELINUX),y)
LDLIBS += selinux sepol
SELINUX_PC_MODULES = libselinux libsepol
$(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES)))
CPPFLAGS += $(SELINUX_CFLAGS)
LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%))
endif
ifeq ($(CONFIG_EFENCE),y)
+1
View File
@@ -15,6 +15,7 @@
#include "libbb.h"
#include <syslog.h>
#include <sys/resource.h> /* setrlimit */
static void nuke_str(char *str)
{
+1
View File
@@ -16,6 +16,7 @@
//usage: "\n -v Verbose"
#include "libbb.h"
#include <sys/resource.h> /* getrusage */
/* Information on the resources used by a child process. */
typedef struct {
+2
View File
@@ -165,6 +165,8 @@
//usage: "\n (default: 0 - disabled)"
#include <syslog.h>
#include <sys/resource.h> /* setrlimit */
#include <sys/socket.h> /* un.h may need this */
#include <sys/un.h>
#include "libbb.h"
+1
View File
@@ -46,6 +46,7 @@
#include "libbb.h"
#include <math.h>
#include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
#include <sys/resource.h> /* setpriority */
#include <sys/timex.h>
#ifndef IPTOS_LOWDELAY
# define IPTOS_LOWDELAY 0x10
+1
View File
@@ -7,6 +7,7 @@
*/
#include "libbb.h"
#include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
#include <sys/resource.h> /* setpriority */
#ifndef IPTOS_LOWDELAY
# define IPTOS_LOWDELAY 0x10
#endif
+1
View File
@@ -91,6 +91,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//usage: "\n a SIGXCPU after N seconds"
#include "libbb.h"
#include <sys/resource.h> /* getrlimit */
/*
Five applets here: chpst, envdir, envuidgid, setuidgid, softlimit.
+1
View File
@@ -18,6 +18,7 @@
*/
#include "libbb.h"
#include "shell_common.h"
#include <sys/resource.h> /* getrlimit */
const char defifsvar[] ALIGN1 = "IFS= \t\n";