libcap/libcap-1.10.diff

105 lines
2.7 KiB
Diff
Raw Normal View History

--- Make.Rules-dist 1999-11-18 07:06:02.000000000 +0100
+++ Make.Rules 2006-12-19 18:18:57.000000000 +0100
@@ -14,17 +14,21 @@
# Otherwise binaries and libraraies are installed in /{lib,sbin}/,
# header files in /usr/include/ and documentation in /usr/man/man?/.
+ifndef lib
+lib=lib
+endif
+
ifdef prefix
exec_prefix=$(prefix)
lib_prefix=$(exec_prefix)
inc_prefix=$(lib_prefix)
-man_prefix=$(prefix)
+man_prefix=$(prefix)/share
else
prefix=/usr
exec_prefix=
lib_prefix=$(exec_prefix)
inc_prefix=$(prefix)
-man_prefix=$(prefix)
+man_prefix=$(prefix)/share
endif
# Target directories
@@ -32,7 +36,7 @@
MANDIR=$(FAKEROOT)$(man_prefix)/man
SBINDIR=$(FAKEROOT)$(exec_prefix)/sbin
INCDIR=$(FAKEROOT)$(inc_prefix)/include
-LIBDIR=$(FAKEROOT)$(lib_prefix)/lib
+LIBDIR=$(FAKEROOT)$(lib_prefix)/$(lib)
# common defines for libcap (suitable for 2.2.1+ Linux kernels)
VERSION=1
@@ -43,11 +47,11 @@
CC=gcc
COPTFLAGS=-O2
-DEBUG=-g #-DDEBUG
-WARNINGS=-ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
+DEBUG=-O2 -g #-DDEBUG
+WARNINGS=-D_POSIX_SOURCE -Wall -Wwrite-strings \
-Wpointer-arith -Wcast-qual -Wcast-align \
- -Wtraditional -Wstrict-prototypes -Wmissing-prototypes \
- -Wnested-externs -Winline -Wshadow -pedantic
+ -Wstrict-prototypes -Wmissing-prototypes \
+ -Wnested-externs -Winline -Wshadow
LD=ld
LDFLAGS=-s #-g
--- libcap/Makefile-dist 1999-04-18 00:16:31.000000000 +0200
+++ libcap/Makefile 2006-12-19 18:18:44.000000000 +0100
@@ -32,7 +32,7 @@
LIBNAME=libcap.so
#
-FILES=cap_alloc cap_proc cap_extint cap_flag cap_text cap_sys
+FILES=cap_alloc cap_proc cap_extint cap_flag cap_text cap_sys #cap_sys2
# for later when there is filesystem support for cap's:
#FILES += cap_file
@@ -63,6 +63,9 @@
%.o: %.c $(INCLS)
$(CC) $(CFLAGS) -c $< -o $@
+cap_sys2.o: cap_sys2.c $(INCLS)
+ $(CC) -Wall -O2 -c $< -o $@
+
install: all
mkdir -p -m 0755 $(INCDIR)/sys
install -m 0644 include/sys/capability.h $(INCDIR)/sys
--- libcap/cap_sys.c-dist 1999-04-18 00:16:31.000000000 +0200
+++ libcap/cap_sys.c 2006-12-19 18:18:44.000000000 +0100
@@ -11,6 +11,8 @@
#define __LIBRARY__
#include <linux/unistd.h>
+
+#if 0
_syscall2(int, capget,
cap_user_header_t, header,
cap_user_data_t, data)
@@ -18,6 +20,7 @@ _syscall2(int, capget,
_syscall2(int, capset,
cap_user_header_t, header,
const cap_user_data_t, data)
+#endif
/*
* $Log: cap_sys.c,v $
--- libcap/cap_sys2.c-dist 2006-12-19 18:18:44.000000000 +0100
+++ libcap/cap_sys2.c 2006-12-19 18:18:44.000000000 +0100
@@ -0,0 +1,10 @@
+#include <linux/unistd.h>
+#include <linux/capability.h>
+
+_syscall2(int, capget,
+ cap_user_header_t, header,
+ cap_user_data_t, data)
+
+_syscall2(int, capset,
+ cap_user_header_t, header,
+ const cap_user_data_t, data)