All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Jean <sj-netfilter@cookinglinux.org>
To: Harald Welte <laforge@netfilter.org>
Cc: netfilter-devel@lists.netfilter.org, John Hill <jhill@noach.com>
Subject: [POSSIBLE PATCH] DECLARE_MUTEX while not in __KERNEL__ (Was: Re: [Fwd: RE: Second Request for help!!])
Date: Mon, 07 Feb 2005 18:52:05 -0500	[thread overview]
Message-ID: <4207FF25.1060404@cookinglinux.org> (raw)
In-Reply-To: <57143.142.169.215.10.1107791547.squirrel@142.169.215.10>

I wrote on the behalf of john:
>>On Mon, February 7, 2005 9:57 am, John Hill said:
>>
>>>Kernel 2.4.29
>>>Patch-0-Matic 2005 02 01 patched for fixes and pptp
>>>iptables-1.3.0rc1
> 
> [...]
> 
>>>I have had these errors on all iptables except 1.2.11 and

Actually, I can't get iptables-1.2.11 to compile up on linux-2.4.29-bk8 too.
John, you sure you did ?

--

Harald,

I don't know if this patch breaks something, but at least am sure of something:

Into ip_tables.h, DECLARE_MUTEX is used outside of __KERNEL__ compilation.
However, DECLARE_MUTEX exists only when #ifdef __KERNEL__
according to asm/.../semaphore.h.

I couldn't track when and why this semaphore had been introduced, but linux-2.4.26
for sure doesn't use it.

May you explain me the purpose, maybe I missed something..

Thanks!

Samuel

--
Signed-off-by: Samuel Jean <sjean@cookinglinux.org>

--- include/linux/netfilter_ipv4/ip_tables.h.orig       2005-02-07 18:25:32.000000000 -0500
+++ include/linux/netfilter_ipv4/ip_tables.h    2005-02-07 18:26:17.000000000 -0500
@@ -336,9 +336,9 @@ ipt_get_target(struct ipt_entry *e)
  /*
   *     Main firewall chains definitions and global var's definitions.
   */
-static DECLARE_MUTEX(ipt_mutex);
  #ifdef __KERNEL__

+static DECLARE_MUTEX(ipt_mutex);
  #include <linux/init.h>
  extern void ipt_init(void) __init;


> ---------------------------- Original Message ----------------------------
> Subject: RE: Second Request for help!!
> From:    "John Hill" <jhill@noach.com>
> Date:    Mon, February 7, 2005 10:28 am
> To:      "'Samuel Jean'" <sj-netfilter@cookinglinux.org>
> --------------------------------------------------------------------------
> 
> I don't have access to post on the developers list.
> 
> Here is the whole compile report.
> Thanks
> --john
> 
> 
> Extensions found: IPv4:recent IPv6:ah IPv6:esp IPv6:frag IPv6:ipv6header
> IPv6:hbh IPv6:dst IPv6:rt
> cc -O2 -Wall -Wunused -I/usr/src/linux/include -Iinclude/
> -DIPTABLES_VERSION=\"1.3.0rc1\"  -fPIC -o extensions/libipt_ah_sh.o -c
> extensions/libipt_ah.c
> In file included from include/libiptc/libiptc.h:6,
>                  from include/iptables.h:5,
>                  from extensions/libipt_ah.c:8:
> /usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:339: warning: type
> defaults to `int' in declaration of `DECLARE_MUTEX'
> /usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:339: warning:
> parameter names (without types) in function declaration
> /usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:339: warning:
> `DECLARE_MUTEX' declared `static' but never defined
> ld -shared  -o extensions/libipt_ah.so extensions/libipt_ah_sh.o
 > [...]

  reply	other threads:[~2005-02-07 23:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-07 15:52 [Fwd: RE: Second Request for help!!] Samuel Jean
2005-02-07 23:52 ` Samuel Jean [this message]
2005-02-08  0:17   ` [POSSIBLE PATCH] DECLARE_MUTEX while not in __KERNEL__ (Was: Re: [Fwd: RE: Second Request for help!!]) Pablo Neira
2005-02-08  6:54     ` Patrick McHardy
2005-02-08 21:51       ` [PATCH] DECLARE_MUTEX in ip6_tables.h just like ip_tables.h Samuel Jean
2005-02-08 23:02         ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4207FF25.1060404@cookinglinux.org \
    --to=sj-netfilter@cookinglinux.org \
    --cc=jhill@noach.com \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=sjean@cookinglinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.