Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37766910
en ru br
ALT Linux repos
S:2.27.0.2.ac1e-alt4
5.0: 2.15-alt2
4.1: 1.10-alt16
4.0: 1.10-alt16
3.0: 1.10-alt12

Group :: System/Libraries
RPM: libcap

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: libcap-1.10-alt-userland.patch
Download


--- libcap-1.10/libcap/include/sys/capability.h.orig	1999-11-18 09:19:21 +0300
+++ libcap-1.10/libcap/include/sys/capability.h	2003-08-27 21:09:51 +0400
@@ -4,6 +4,7 @@
  * 
  * Copyright (C) 1997   Aleph One
  * Copyright (C) 1997-8 Andrew G. Morgan <morgan@linux.kernel.org>
+ * Copyright (C) 2002-2003 Dmitry V. Levin <ldv@altlinux.org>
  *
  * defunct POSIX.1e Standard: 25.2 Capabilities           <sys/capability.h>
  */
@@ -21,8 +22,47 @@
  */
 
 #include <sys/types.h>
+
+/*
+ * Make sure we can be included from userland by preventing
+ * capability.h from including other kernel headers
+ */
+#ifndef __KERNEL__
+
+#undef _SYSCAP_OWN_LINUX_TYPES_H
+#undef _SYSCAP_OWN_LINUX_FS_H
+
+#ifndef _LINUX_TYPES_H
+#define _LINUX_TYPES_H
+#define _SYSCAP_OWN_LINUX_TYPES_H
+
+#include <stdint.h>
+typedef uint32_t __u32;
+typedef __u32 __le32;
+
+#endif /* _LINUX_TYPES_H */
+
+#ifndef _LINUX_FS_H
+#define _LINUX_FS_H
+#define _SYSCAP_OWN_LINUX_FS_H
+#endif /* _LINUX_FS_H */
+
+#endif /* __KERNEL__ */
+
 #include <linux/capability.h>
 
+#ifndef __KERNEL__
+
+#ifdef _SYSCAP_OWN_LINUX_TYPES_H
+#undef _LINUX_TYPES_H
+#endif /* _SYSCAP_OWN_LINUX_TYPES_H */
+
+#ifdef _SYSCAP_OWN_LINUX_FS_H
+#undef _LINUX_FS_H
+#endif /* _SYSCAP_OWN_LINUX_FS_H */
+
+#endif /* __KERNEL__ */
+
 /*
  * POSIX capability types
  */
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin