RE: Tproxy patch

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Mon, 17 Jul 2006 09:57:49 +0200

mån 2006-07-17 klockan 14:43 +0800 skrev Steven Wilton:

> I'm compiling under Debian (stable and unstable), and we are still seeing
> the fd set limited to 1024. It's coming in the following path:
>
> /usr/include/sys/capability.h
> /usr/include/linux/types.h
> /usr/include/linux/posix_types.h
>
> Is it safe to include these all headers in squid.h before __FD_SETSIZE is
> redefined? Or is this specific to the debian include files?

That would be a bit messy. The problem is that those two linux headers
isn't supposed to be included at all in userspace applications (only
kernel). glibc provides it's own types.

I suppose we could use the same glue as Fedora already has in it's
sys/capability.h...

--- libcap-1.10/libcap/include/sys/capability.h.foo Fri Nov 9
16:26:25 2001
+++ libcap-1.10/libcap/include/sys/capability.h Fri Nov 9 16:28:47 2001
@@ -21,6 +21,16 @@
  */

 #include <sys/types.h>
+#include <stdint.h>
+
+/*
+ * Make sure we can be included from userland by preventing
+ * capability.h from including other kernel headers
+ */
+#define _LINUX_TYPES_H
+#define _LINUX_FS_H
+typedef unsigned int __u32;
+
 #include <linux/capability.h>

 /*

or maybe move all capability related code out to a separate file.

Regards
Henrik

Received on Mon Jul 17 2006 - 01:57:53 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Aug 01 2006 - 12:00:02 MDT